]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
make sure a running mon to check when upgrade mon 250/head
authorYin Jifeng <jifeng.yin@gmail.com>
Fri, 17 Apr 2015 02:04:52 +0000 (10:04 +0800)
committerYin Jifeng <jifeng.yin@gmail.com>
Fri, 17 Apr 2015 02:04:52 +0000 (10:04 +0800)
rolling_update.yml

index 741ca091e386d955c6438b3c94fa998f1d986508..0022bde0354c40364d109b449643c81a4e5e3925 100644 (file)
         state=restarted
         args=mon
 
+    - name: select a running monitor
+      set_fact: mon_host={{ item }}
+      with_items: groups.mons
+      when: item != inventory_hostname
+
     - name: Waiting for the monitor to join the quorum...
       shell: >
         ceph -s | grep monmap | sed 's/.*quorum//' | egrep -sq {{ ansible_hostname }}
@@ -63,7 +68,7 @@
       until: result.rc == 0
       retries: 5
       delay: 10
-      delegate_to: "{{ groups.mons[0] }}"
+      delegate_to: "{{ mon_host }}"
 
 
 - hosts: osds