diff --git a/roles/kubernetes-apps/ansible/tasks/cleanup_dns.yml b/roles/kubernetes-apps/ansible/tasks/cleanup_dns.yml index e77f1e799..a369e842e 100644 --- a/roles/kubernetes-apps/ansible/tasks/cleanup_dns.yml +++ b/roles/kubernetes-apps/ansible/tasks/cleanup_dns.yml @@ -22,6 +22,7 @@ state: absent when: - kubeadm_enabled|default(false) + - kubeadm_init is defined - kubeadm_init.changed|default(false) - inventory_hostname == groups['kube-master'][0] @@ -50,5 +51,6 @@ - 'svc' when: - kubeadm_enabled|default(false) + - kubeadm_init is defined - kubeadm_init.changed|default(false) - inventory_hostname == groups['kube-master'][0]