From 2b131f11f9a33b40014112e3f1a09904d17e32a1 Mon Sep 17 00:00:00 2001 From: gjmzj Date: Thu, 19 Nov 2020 20:19:27 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E5=A4=87=E4=BB=BDetcd=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 23.backup.yml | 4 ++-- tools/01.addetcd.yml | 4 +--- tools/11.deletcd.yml | 4 +--- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/23.backup.yml b/23.backup.yml index c5b5950..fa5d483 100644 --- a/23.backup.yml +++ b/23.backup.yml @@ -20,10 +20,10 @@ register: ETCD_CLUSTER_STATUS ignore_errors: true - - debug: var="ETCD_CLUSTER_STATUS.stdout" + - debug: var="ETCD_CLUSTER_STATUS" - name: get a running ectd node - shell: 'echo -e "{{ ETCD_CLUSTER_STATUS.stdout }}"|grep "is healthy"|sed -n "1p"|cut -d: -f2|cut -d/ -f3' + shell: 'echo -e "{{ ETCD_CLUSTER_STATUS.stdout }} {{ ETCD_CLUSTER_STATUS.stderr }}"|grep "is healthy"|sed -n "1p"|cut -d: -f2|cut -d/ -f3' register: RUNNING_NODE - debug: var="RUNNING_NODE.stdout" diff --git a/tools/01.addetcd.yml b/tools/01.addetcd.yml index 9025a2f..c56d049 100644 --- a/tools/01.addetcd.yml +++ b/tools/01.addetcd.yml @@ -19,9 +19,7 @@ done' register: ETCD_CLUSTER_STATUS - - debug: var="ETCD_CLUSTER_STATUS.stdout" - - - debug: var="ETCD_CLUSTER_STATUS.stderr" + - debug: var="ETCD_CLUSTER_STATUS" - name: get a running ectd node shell: 'echo -e "{{ ETCD_CLUSTER_STATUS.stdout }}" \ diff --git a/tools/11.deletcd.yml b/tools/11.deletcd.yml index 71594dc..e4b32e7 100644 --- a/tools/11.deletcd.yml +++ b/tools/11.deletcd.yml @@ -32,9 +32,7 @@ register: ETCD_CLUSTER_STATUS ignore_errors: true - - debug: var="ETCD_CLUSTER_STATUS.stdout" - - - debug: var="ETCD_CLUSTER_STATUS.stderr" + - debug: var="ETCD_CLUSTER_STATUS" - name: get a running ectd node shell: 'echo -e "{{ ETCD_CLUSTER_STATUS.stdout }}" \