mirror of https://github.com/ceph/ceph-ansible.git
BugFix: Fix #1374
If a group of hosts is empty, (for instance 'mdss', in case of a deployment without any mds node), the playbook will fails when trying to restart service with `"'dict object' has no attribute u'XXX'"` error. The idea here is to force the `with_items` statements in all included handler tasks to get at least an empty array. Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>pull/1396/head
parent
bbe6f752e8
commit
a99e04a9b7
|
@ -6,7 +6,7 @@
|
||||||
# serial: 1 would be the proper solution here, but that can only be set on play level
|
# 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
|
# upstream issue: https://github.com/ansible/ansible/issues/12170
|
||||||
run_once: true
|
run_once: true
|
||||||
with_items: "{{ groups[mds_group_name] }}"
|
with_items: "{{ groups.get(mds_group_name, []) }}"
|
||||||
delegate_to: "{{ item }}"
|
delegate_to: "{{ item }}"
|
||||||
when:
|
when:
|
||||||
- socket.rc == 0
|
- socket.rc == 0
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
# serial: 1 would be the proper solution here, but that can only be set on play level
|
# 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
|
# upstream issue: https://github.com/ansible/ansible/issues/12170
|
||||||
run_once: true
|
run_once: true
|
||||||
with_items: "{{ groups[mon_group_name] }}"
|
with_items: "{{ groups.get(mon_group_name, []) }}"
|
||||||
delegate_to: "{{ item }}"
|
delegate_to: "{{ item }}"
|
||||||
when:
|
when:
|
||||||
- socket.rc == 0
|
- socket.rc == 0
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
# serial: 1 would be the proper solution here, but that can only be set on play level
|
# 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
|
# upstream issue: https://github.com/ansible/ansible/issues/12170
|
||||||
run_once: true
|
run_once: true
|
||||||
with_items: "{{ groups[osd_group_name] }}"
|
with_items: "{{ groups.get(osd_group_name, []) }}"
|
||||||
delegate_to: "{{ item }}"
|
delegate_to: "{{ item }}"
|
||||||
when:
|
when:
|
||||||
- socket.rc == 0
|
- socket.rc == 0
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
# serial: 1 would be the proper solution here, but that can only be set on play level
|
# 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
|
# upstream issue: https://github.com/ansible/ansible/issues/12170
|
||||||
run_once: true
|
run_once: true
|
||||||
with_items: "{{ groups[rgw_group_name] }}"
|
with_items: "{{ groups.get(rgw_group_name, []) }}"
|
||||||
delegate_to: "{{ item }}"
|
delegate_to: "{{ item }}"
|
||||||
when:
|
when:
|
||||||
- socketrgw.rc == 0
|
- socketrgw.rc == 0
|
||||||
|
|
Loading…
Reference in New Issue