From 5b1087f1e5a672284d7445689355db00bcaab732 Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Thu, 19 Oct 2017 15:39:43 +0200 Subject: [PATCH] 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) --- roles/ceph-mgr/tasks/main.yml | 5 +++++ 1 file changed, 5 insertions(+) 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']