]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
ceph-mgr: move mgr module list to common
authorDimitri Savineau <dsavinea@redhat.com>
Thu, 15 Jul 2021 19:38:07 +0000 (15:38 -0400)
committerDimitri Savineau <savineau.dimitri@gmail.com>
Mon, 19 Jul 2021 19:02:55 +0000 (15:02 -0400)
Populating the ceph_mgr_modules list in the mgr_modules doesn't make sense
since that file is only executed if the list isn't empty or we're using the
dashboard.

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit cd06e7c046b3e56920b1f9bdc1907429382bee5c)

roles/ceph-mgr/tasks/common.yml
roles/ceph-mgr/tasks/main.yml
roles/ceph-mgr/tasks/mgr_modules.yml

index 9af64abf97c84e92bf30468c86f7e835d6df8b39..87f8f7c9a9f517f3f5e3eb772982d5e4ebc23a02 100644 (file)
@@ -83,3 +83,8 @@
     group: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
     mode: "{{ ceph_keyring_permissions }}"
   when: cephx | bool
+
+- name: append dashboard modules to ceph_mgr_modules
+  set_fact:
+    ceph_mgr_modules: "{{ ceph_mgr_modules | union(['dashboard', 'prometheus']) }}"
+  when: dashboard_enabled | bool
index 0c60b026a3393a1d19910ba94db857c47d2c5592..0395a9cd2989721ecedc285993a326bc7b76156d 100644 (file)
@@ -21,6 +21,6 @@
 - name: include mgr_modules.yml
   include_tasks: mgr_modules.yml
   when:
-    - ceph_mgr_modules | length > 0 or dashboard_enabled
+    - ceph_mgr_modules | length > 0
     - ((groups[mgr_group_name] | default([]) | length == 0 and inventory_hostname == groups[mon_group_name] | last) or
       (groups[mgr_group_name] | default([]) | length > 0 and inventory_hostname == groups[mgr_group_name] | last))
index 18cac848a24c65679bc75e537c0d506dc9a0ad28..e908eb8a23819552b6e1427e0a61f85ec02aa8e9 100644 (file)
@@ -1,9 +1,4 @@
 ---
-- name: append dashboard modules to ceph_mgr_modules
-  set_fact:
-    ceph_mgr_modules: "{{ ceph_mgr_modules | union(['dashboard', 'prometheus']) }}"
-  when: dashboard_enabled | bool
-
 - name: wait for all mgr to be up
   command: "{{ hostvars[groups[mon_group_name][0]]['container_exec_cmd'] | default('') }} ceph --cluster {{ cluster }} mgr dump -f json"
   register: mgr_dump