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
Dardo D Kleiner 2018-08-15 08:50:19 -04:00 committed by Sébastien Han
parent 04df3f0802
commit f6519e4003
1 changed files with 1 additions and 1 deletions

View File

@ -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']