2016-09-22 23:03:14 +08:00
|
|
|
---
|
|
|
|
- name: restart ceph mons
|
|
|
|
service:
|
|
|
|
name: ceph-mon@{{ monitor_name }}
|
|
|
|
state: restarted
|
|
|
|
# serial: 1 would be the proper solution here, but that can only be set on play level
|
|
|
|
# upstream issue: https://github.com/ansible/ansible/issues/12170
|
|
|
|
run_once: true
|
2017-03-23 23:00:02 +08:00
|
|
|
with_items: "{{ groups.get(mon_group_name, []) }}"
|
2016-09-22 23:03:14 +08:00
|
|
|
delegate_to: "{{ item }}"
|
|
|
|
when:
|
|
|
|
- socket.rc == 0
|
|
|
|
- mon_group_name in group_names
|
|
|
|
|
|
|
|
- name: validate monitors
|
|
|
|
include: validate-mon.yml
|
|
|
|
when: mon_group_name in group_names
|