diff --git a/24.restore.yml b/24.restore.yml index 81b00d1..665e34c 100644 --- a/24.restore.yml +++ b/24.restore.yml @@ -15,9 +15,9 @@ - hosts: kube-master tasks: - name: 重启 kubernetes 服务 - shell: "systemctl restart kube-apiserver && systemctl restart kubelet &&\ - systemctl restart kube-controller-manager && systemctl restart kube-scheduler &&\ - systemctl restart kube-proxy" + shell: "systemctl restart kube-apiserver && \ + systemctl restart kube-controller-manager && \ + systemctl restart kube-scheduler" - name: "Wait services start" wait_for: timeout=5 @@ -31,6 +31,8 @@ # restart work node kubernetes service - hosts: + - kube-master + - kube-node tasks: - name: 重启 kubernetes 服务 shell: "systemctl restart kubelet && systemctl restart kube-proxy" @@ -43,4 +45,4 @@ register: kubelet_status until: '"running" in kubelet_status.stdout' retries: 8 - delay: 2 \ No newline at end of file + delay: 2