mirror of https://github.com/ceph/ceph-ansible.git
mgr: improve/fix disabled modules check
Follow up on 36942af698
"disabled_modules" is always a list, it's the items in the list that
can be dicts in mimic. Many ways to fix this, here's one.
Signed-off-by: Dardo D Kleiner <dardokleiner@gmail.com>
pull/3037/head
parent
04df3f0802
commit
f6519e4003
|
@ -31,7 +31,7 @@
|
|||
|
||||
- name: set _disabled_ceph_mgr_modules fact
|
||||
set_fact:
|
||||
_disabled_ceph_mgr_modules: "{% if _ceph_mgr_modules | type_debug == 'list' %}[]{% elif _ceph_mgr_modules.disabled_modules | type_debug == 'dict' %}{{ _ceph_mgr_modules['disabled_modules'] }}{% else %}{{ _ceph_mgr_modules['disabled_modules'] | map(attribute='name') | list }}{% endif %}"
|
||||
_disabled_ceph_mgr_modules: "{% if _ceph_mgr_modules.disabled_modules | length == 0 %}[]{% elif _ceph_mgr_modules.disabled_modules[0] | type_debug != 'dict' %}{{ _ceph_mgr_modules['disabled_modules'] }}{% else %}{{ _ceph_mgr_modules['disabled_modules'] | map(attribute='name') | list }}{% endif %}"
|
||||
when:
|
||||
- ceph_release_num[ceph_release] >= ceph_release_num['luminous']
|
||||
|
||||
|
|
Loading…
Reference in New Issue