]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
mgr: play 'enable modules' sequence only on luminous
authorGuillaume Abrioux <gabrioux@redhat.com>
Thu, 19 Oct 2017 13:39:43 +0000 (15:39 +0200)
committerSébastien Han <seb@redhat.com>
Thu, 19 Oct 2017 18:54:23 +0000 (20:54 +0200)
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)

roles/ceph-mgr/tasks/main.yml

index f017f889218bb03ba7d84b2eb4761d1803049c76..e578e2017dbdb5da17821ae1301683933be79223 100644 (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 }}"
   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']