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.

39 lines
1.3 KiB

  1. ---
  2. - name: Kubernetes Apps | Wait for kube-apiserver
  3. uri: url=http://localhost:8080/healthz
  4. register: result
  5. until: result.status == 200
  6. retries: 10
  7. delay: 6
  8. when: inventory_hostname == groups['kube-master'][0]
  9. - name: Kubernetes Apps | Lay Down KubeDNS Template
  10. template: src={{item.file}} dest={{kube_config_dir}}/{{item.file}}
  11. with_items:
  12. - {file: kubedns-rc.yml, type: rc}
  13. - {file: kubedns-svc.yml, type: svc}
  14. register: manifests
  15. when: dns_mode != 'none' and inventory_hostname == groups['kube-master'][0]
  16. tags: dnsmasq
  17. - name: Kubernetes Apps | Start Resources
  18. kube:
  19. name: kubedns
  20. namespace: "{{ system_namespace }}"
  21. kubectl: "{{bin_dir}}/kubectl"
  22. resource: "{{item.item.type}}"
  23. filename: "{{kube_config_dir}}/{{item.item.file}}"
  24. state: "{{item.changed | ternary('latest','present') }}"
  25. with_items: "{{ manifests.results }}"
  26. when: dns_mode != 'none' and inventory_hostname == groups['kube-master'][0]
  27. tags: dnsmasq
  28. - include: tasks/calico-policy-controller.yml
  29. when: ( enable_network_policy is defined and enable_network_policy == True ) or
  30. ( kube_network_plugin == 'canal' )
  31. tags: [network, canal]
  32. - name: Kubernetes Apps | Netchecker
  33. include: tasks/netchecker.yml
  34. when: deploy_netchecker
  35. tags: netchecker