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>
(cherry picked from commit c1e4529b0e
)
pull/3850/head
parent
f5f8d264e2
commit
2581c4d511
|
@ -172,8 +172,8 @@
|
|||
name: ceph-mgr@{{ ansible_hostname }}
|
||||
masked: yes
|
||||
when:
|
||||
- inventory_hostname in groups[mgr_group_name]
|
||||
or groups[mgr_group_name] | length == 0
|
||||
- inventory_hostname in groups[mgr_group_name] | default([])
|
||||
or groups[mgr_group_name] | default([]) | length == 0
|
||||
|
||||
- import_role:
|
||||
name: ceph-handler
|
||||
|
|
Loading…
Reference in New Issue