From cb3ba49163c342abd3d23755cf768cd6686e6ef9 Mon Sep 17 00:00:00 2001 From: rufus123456 <279245988@qq.com> Date: Fri, 21 Dec 2018 10:06:07 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=AD=89=E5=BE=85ETCD=E5=90=8C=E6=AD=A5?= =?UTF-8?q?=E5=AE=8C=E6=88=90=EF=BC=8C=E5=86=8D=E8=BF=94=E5=9B=9E=E6=88=90?= =?UTF-8?q?=E5=8A=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- roles/etcd/tasks/main.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/roles/etcd/tasks/main.yml b/roles/etcd/tasks/main.yml index cb43e0681..950dda907 100644 --- a/roles/etcd/tasks/main.yml +++ b/roles/etcd/tasks/main.yml @@ -39,4 +39,13 @@ - name: 开启etcd服务 shell: systemctl daemon-reload && systemctl restart etcd + ignore_errors: true + tags: upgrade_etcd + +- name: 以轮询的方式等待服务同步完成 + shell: "systemctl status etcd.service|grep Active" + register: etcd_status + until: '"running" in etcd_status.stdout' + retries: 8 + delay: 8 tags: upgrade_etcd