]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
Improve regex syntax 242/head
authorSébastien Han <sebastien.han@enovance.com>
Mon, 30 Mar 2015 20:13:29 +0000 (22:13 +0200)
committerSébastien Han <sebastien.han@enovance.com>
Mon, 30 Mar 2015 20:13:29 +0000 (22:13 +0200)
Chain sed commands with ';' and add '-s' to grep for quiet output

Signed-off-by: Sébastien Han <sebastien.han@enovance.com>
rolling_update.yml

index 607096a22d42533ae15a1170514ab4b425cbb297..1b3d96b9050d804d894ec9ef46215399dbda142a 100644 (file)
@@ -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
 
     - 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