mgr: play 'enable modules' sequence only on luminous

This feature isn't available before luminous, therefore, we need to play
them only on luminous and after otherwise the playbook will fail.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 3f3d4b9c727d06154c422d445fc2a245aceaed89)
pull/2076/head
Guillaume Abrioux 2017-10-19 15:39:43 +02:00 committed by Sébastien Han
parent 982326373b
commit 5b1087f1e5
1 changed files with 5 additions and 0 deletions

View File

@ -17,6 +17,8 @@
command: "{{ docker_exec_cmd_mgr | default('') }} ceph --cluster {{ cluster }} --format json mgr module ls"
register: enabled_ceph_mgr_modules
delegate_to: "{{ groups[mon_group_name][0] }}"
when:
- ceph_release_num[ceph_release] >= ceph_release_num['luminous']
- name: disable ceph mgr enabled modules
command: "{{ docker_exec_cmd_mgr | default('') }} ceph --cluster {{ cluster }} mgr module disable {{ item }}"
@ -26,8 +28,11 @@
delegate_to: "{{ groups[mon_group_name][0] }}"
when:
- not enabled_ceph_mgr_modules.get('skipped')
- ceph_release_num[ceph_release] >= ceph_release_num['luminous']
- name: add modules to ceph-mgr
command: "{{ docker_exec_cmd_mgr | default('') }} ceph --cluster {{ cluster }} mgr module enable {{ item }}"
with_items: "{{ ceph_mgr_modules }}"
delegate_to: "{{ groups[mon_group_name][0] }}"
when:
- ceph_release_num[ceph_release] >= ceph_release_num['luminous']