From d19a7f27d28b433ff90305fad66185d699253430 Mon Sep 17 00:00:00 2001 From: gjmzj Date: Mon, 1 Feb 2021 11:57:48 +0800 Subject: [PATCH] fix 24.restore.yml --- 24.restore.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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