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.

75 lines
1.9 KiB

  1. ---
  2. - name: Kubernetes Apps | Wait for kube-apiserver
  3. uri:
  4. url: "{{ kube_apiserver_endpoint }}/healthz"
  5. validate_certs: no
  6. client_cert: "{{ kube_apiserver_client_cert }}"
  7. client_key: "{{ kube_apiserver_client_key }}"
  8. register: result
  9. until: result.status == 200
  10. retries: 10
  11. delay: 2
  12. when: inventory_hostname == groups['kube-master'][0]
  13. - name: Kubernetes Apps | Cleanup DNS
  14. import_tasks: tasks/cleanup_dns.yml
  15. when:
  16. - inventory_hostname == groups['kube-master'][0]
  17. tags:
  18. - upgrade
  19. - dnsmasq
  20. - coredns
  21. - kubedns
  22. - name: Kubernetes Apps | CoreDNS
  23. import_tasks: "tasks/coredns.yml"
  24. when:
  25. - dns_mode in ['coredns', 'coredns_dual']
  26. - inventory_hostname == groups['kube-master'][0]
  27. tags:
  28. - coredns
  29. - name: Kubernetes Apps | KubeDNS
  30. import_tasks: "tasks/kubedns.yml"
  31. when:
  32. - dns_mode in ['kubedns', 'dnsmasq_kubedns']
  33. - inventory_hostname == groups['kube-master'][0]
  34. tags:
  35. - dnsmasq
  36. - name: Kubernetes Apps | Start Resources
  37. kube:
  38. name: "{{ item.item.name }}"
  39. namespace: "kube-system"
  40. kubectl: "{{ bin_dir }}/kubectl"
  41. resource: "{{ item.item.type }}"
  42. filename: "{{ kube_config_dir }}/{{ item.item.file }}"
  43. state: "latest"
  44. with_items:
  45. - "{{ kubedns_manifests.results | default({}) }}"
  46. - "{{ coredns_manifests.results | default({}) }}"
  47. - "{{ coredns_secondary_manifests.results | default({}) }}"
  48. when:
  49. - dns_mode != 'none'
  50. - inventory_hostname == groups['kube-master'][0]
  51. - not item|skipped
  52. register: resource_result
  53. until: resource_result|succeeded
  54. retries: 4
  55. delay: 5
  56. tags:
  57. - dnsmasq
  58. - coredns
  59. - kubedns
  60. - name: Kubernetes Apps | Netchecker
  61. import_tasks: tasks/netchecker.yml
  62. when: deploy_netchecker
  63. tags:
  64. - netchecker
  65. - name: Kubernetes Apps | Dashboard
  66. import_tasks: tasks/dashboard.yml
  67. when: dashboard_enabled
  68. tags:
  69. - dashboard