From 557c5790d933e185a8405bf422edcd4d29e83f75 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=A9bastien=20Han?= Date: Mon, 30 Mar 2015 22:13:29 +0200 Subject: [PATCH] Improve regex syntax MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Chain sed commands with ';' and add '-s' to grep for quiet output Signed-off-by: Sébastien Han --- rolling_update.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rolling_update.yml b/rolling_update.yml index 607096a22..1b3d96b90 100644 --- a/rolling_update.yml +++ b/rolling_update.yml @@ -54,7 +54,7 @@ - name: Waiting for the monitor to join the quorum... shell: > - ceph -s | grep monmap | sed 's/.*quorum//' | egrep -q {{ ansible_hostname }} + ceph -s | grep monmap | sed 's/.*quorum//' | egrep -sq {{ ansible_hostname }} register: result until: result.rc == 0 retries: 5 @@ -102,7 +102,7 @@ - name: Waiting for clean PGs... shell: > - test "$(ceph pg stat | sed 's/^.*pgs://' | sed 's/active+clean.*//' |sed 's/ //')" -eq "$(ceph pg stat | sed 's/pgs.*//' | sed 's/^.*://' | sed 's/ //')" && ceph health | egrep -q "HEALTH_OK|HEALTH_WARN" + test "$(ceph pg stat | sed 's/^.*pgs://;s/active+clean.*//;s/ //')" -eq "$(ceph pg stat | sed 's/pgs.*//;s/^.*://;s/ //')" && ceph health | egrep -sq "HEALTH_OK|HEALTH_WARN" register: result until: result.rc == 0 retries: 10 -- 2.39.5