mirror of https://github.com/ceph/ceph-ansible.git
update: fix undefined error when no mgr group is declared
if mgr group isn't defined in inventory, that task will fail with undefined error. Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>pull/3791/head
parent
7e0adca7a4
commit
c1e4529b0e
|
@ -172,8 +172,8 @@
|
||||||
name: ceph-mgr@{{ ansible_hostname }}
|
name: ceph-mgr@{{ ansible_hostname }}
|
||||||
masked: yes
|
masked: yes
|
||||||
when:
|
when:
|
||||||
- inventory_hostname in groups[mgr_group_name]
|
- inventory_hostname in groups[mgr_group_name] | default([])
|
||||||
or groups[mgr_group_name] | length == 0
|
or groups[mgr_group_name] | default([]) | length == 0
|
||||||
|
|
||||||
- import_role:
|
- import_role:
|
||||||
name: ceph-handler
|
name: ceph-handler
|
||||||
|
|
Loading…
Reference in New Issue