You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
941 B

  1. - name: Kubernetes Apps | Lay Down Netchecker Template
  2. template: src={{item.file}} dest={{kube_config_dir}}/{{item.file}}
  3. with_items:
  4. - {file: netchecker-agent-ds.yml, type: ds, name: netchecker-agent}
  5. - {file: netchecker-agent-hostnet-ds.yml, type: ds, name: netchecker-agent-hostnet}
  6. - {file: netchecker-server-pod.yml, type: po, name: netchecker-server}
  7. - {file: netchecker-server-svc.yml, type: svc, name: netchecker-service}
  8. register: manifests
  9. when: inventory_hostname == groups['kube-master'][0]
  10. - name: Kubernetes Apps | Start Netchecker Resources
  11. kube:
  12. name: "{{item.item.name}}"
  13. namespace: "{{netcheck_namespace}}"
  14. kubectl: "{{bin_dir}}/kubectl"
  15. resource: "{{item.item.type}}"
  16. filename: "{{kube_config_dir}}/{{item.item.file}}"
  17. state: "{{item.changed | ternary('latest','present') }}"
  18. with_items: "{{ manifests.results }}"
  19. when: inventory_hostname == groups['kube-master'][0]