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
c1e4529b0e44329f561fc46ec96bd081cdd6d38c)
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