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.

54 lines
1.2 KiB

  1. ---
  2. - name: Kubernetes Apps | Delete old CoreDNS resources
  3. kube:
  4. name: "coredns"
  5. namespace: "kube-system"
  6. kubectl: "{{ bin_dir }}/kubectl"
  7. resource: "{{ item }}"
  8. state: absent
  9. with_items:
  10. - 'deploy'
  11. - 'configmap'
  12. - 'svc'
  13. tags:
  14. - upgrade
  15. - name: Kubernetes Apps | Delete kubeadm CoreDNS
  16. kube:
  17. name: "coredns"
  18. namespace: "kube-system"
  19. kubectl: "{{ bin_dir }}/kubectl"
  20. resource: "deploy"
  21. state: absent
  22. when:
  23. - kubeadm_enabled|default(false)
  24. - kubeadm_init.changed|default(false)
  25. - inventory_hostname == groups['kube-master'][0]
  26. - name: Kubernetes Apps | Delete old KubeDNS resources
  27. kube:
  28. name: "kube-dns"
  29. namespace: "kube-system"
  30. kubectl: "{{ bin_dir }}/kubectl"
  31. resource: "{{ item }}"
  32. state: absent
  33. with_items:
  34. - 'deploy'
  35. - 'svc'
  36. tags:
  37. - upgrade
  38. - name: Kubernetes Apps | Delete kubeadm KubeDNS
  39. kube:
  40. name: "kube-dns"
  41. namespace: "kube-system"
  42. kubectl: "{{ bin_dir }}/kubectl"
  43. resource: "{{ item }}"
  44. state: absent
  45. with_items:
  46. - 'deploy'
  47. - 'svc'
  48. when:
  49. - kubeadm_enabled|default(false)
  50. - kubeadm_init.changed|default(false)
  51. - inventory_hostname == groups['kube-master'][0]