Follow up on
36942af6983d60666f3f8a1a06b352a440a6c0da
"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>
- 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']