From: Guillaume Abrioux Date: Thu, 19 Oct 2017 13:39:43 +0000 (+0200) Subject: mgr: play 'enable modules' sequence only on luminous X-Git-Tag: beta-3.1.0~96^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5b1087f1e5a672284d7445689355db00bcaab732;p=ceph-ansible.git 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 (cherry picked from commit 3f3d4b9c727d06154c422d445fc2a245aceaed89) --- diff --git a/roles/ceph-mgr/tasks/main.yml b/roles/ceph-mgr/tasks/main.yml index f017f8892..e578e2017 100644 --- a/roles/ceph-mgr/tasks/main.yml +++ b/roles/ceph-mgr/tasks/main.yml @@ -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']