diff --git a/roles/kubernetes/preinstall/handlers/main.yml b/roles/kubernetes/preinstall/handlers/main.yml index 4c24b83a223..631ea743e9c 100644 --- a/roles/kubernetes/preinstall/handlers/main.yml +++ b/roles/kubernetes/preinstall/handlers/main.yml @@ -50,7 +50,7 @@ # FIXME(mattymo): Also restart for kubeadm mode - name: Preinstall | kube-apiserver configured stat: - path: "{{ kube_manifest_dir }}/kube-apiserver.manifest" + path: "{{ kube_manifest_dir }}/kube-apiserver.yaml" get_attributes: no get_checksum: no get_mime: no @@ -60,7 +60,7 @@ # FIXME(mattymo): Also restart for kubeadm mode - name: Preinstall | kube-controller configured stat: - path: "{{ kube_manifest_dir }}/kube-controller-manager.manifest" + path: "{{ kube_manifest_dir }}/kube-controller-manager.yaml" get_attributes: no get_checksum: no get_mime: no @@ -92,6 +92,7 @@ - inventory_hostname in groups['kube_control_plane'] - dns_mode != 'none' - resolvconf_mode == 'host_resolvconf' + - kube_apiserver_set.stat.exists - name: Preinstall | restart kube-apiserver crio/containerd shell: "{{ bin_dir }}/crictl pods --name kube-apiserver* -q | xargs -I% --no-run-if-empty bash -c '{{ bin_dir }}/crictl stopp % && {{ bin_dir }}/crictl rmp %'" @@ -104,6 +105,7 @@ - inventory_hostname in groups['kube_control_plane'] - dns_mode != 'none' - resolvconf_mode == 'host_resolvconf' + - kube_apiserver_set.stat.exists # When running this as the last phase ensure we wait for kube-apiserver to come up - name: Preinstall | wait for the apiserver to be running