make sure a running mon to check when upgrade mon

pull/250/head
Yin Jifeng 2015-04-17 10:04:52 +08:00
parent 95ca89695c
commit 154c5aa4b5
1 changed files with 6 additions and 1 deletions

View File

@ -56,6 +56,11 @@
state=restarted state=restarted
args=mon 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... - name: Waiting for the monitor to join the quorum...
shell: > shell: >
ceph -s | grep monmap | sed 's/.*quorum//' | egrep -sq {{ ansible_hostname }} ceph -s | grep monmap | sed 's/.*quorum//' | egrep -sq {{ ansible_hostname }}
@ -63,7 +68,7 @@
until: result.rc == 0 until: result.rc == 0
retries: 5 retries: 5
delay: 10 delay: 10
delegate_to: "{{ groups.mons[0] }}" delegate_to: "{{ mon_host }}"
- hosts: osds - hosts: osds