fix 24.restore.yml

dev2
gjmzj 2021-02-01 11:57:48 +08:00
parent f2924ad39b
commit d19a7f27d2
1 changed files with 6 additions and 4 deletions

View File

@ -15,9 +15,9 @@
- hosts: kube-master - hosts: kube-master
tasks: tasks:
- name: 重启 kubernetes 服务 - name: 重启 kubernetes 服务
shell: "systemctl restart kube-apiserver && systemctl restart kubelet &&\ shell: "systemctl restart kube-apiserver && \
systemctl restart kube-controller-manager && systemctl restart kube-scheduler &&\ systemctl restart kube-controller-manager && \
systemctl restart kube-proxy" systemctl restart kube-scheduler"
- name: "Wait services start" - name: "Wait services start"
wait_for: timeout=5 wait_for: timeout=5
@ -31,6 +31,8 @@
# restart work node kubernetes service # restart work node kubernetes service
- hosts: - hosts:
- kube-master
- kube-node
tasks: tasks:
- name: 重启 kubernetes 服务 - name: 重启 kubernetes 服务
shell: "systemctl restart kubelet && systemctl restart kube-proxy" shell: "systemctl restart kubelet && systemctl restart kube-proxy"
@ -43,4 +45,4 @@
register: kubelet_status register: kubelet_status
until: '"running" in kubelet_status.stdout' until: '"running" in kubelet_status.stdout'
retries: 8 retries: 8
delay: 2 delay: 2