mgr: manage mgr modules when mgr and mon are collocated

When mgrs are implicitly collocated on monitors (no mgrs in mgrs group).
That include was skipped because of this condition :

`inventory_hostname == groups[mgr_group_name][0]`

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit cbfdbab177)
pull/3815/merge
Guillaume Abrioux 2019-04-08 13:56:01 +02:00
parent 3272c2347f
commit bf672f14fe
1 changed files with 3 additions and 2 deletions

View File

@ -18,5 +18,6 @@
- name: include mgr_modules.yml
include_tasks: mgr_modules.yml
when:
- ceph_mgr_modules|length > 0
- inventory_hostname == groups[mgr_group_name][0]
- ceph_mgr_modules | length > 0
- ((groups[mgr_group_name] | default([]) | length == 0 and inventory_hostname == groups[mon_group_name] | last) or
(groups[mgr_group_name] | default([]) | length > 0 and inventory_hostname == groups[mgr_group_name] | last))