]> 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)
committerGuillaume Abrioux <gabrioux@redhat.com>
Mon, 19 Jul 2021 16:23:38 +0000 (18:23 +0200)
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>
roles/ceph-mgr/tasks/common.yml
roles/ceph-mgr/tasks/main.yml
roles/ceph-mgr/tasks/mgr_modules.yml

index 056638852751e073880553df1fd8e4d5503415b8..d0690d1317f50c3de40fd68d23a13117b6b545fb 100644 (file)
@@ -90,3 +90,8 @@
     group: "{{ ceph_uid if containerized_deployment | bool 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 c67c0833f6d0804bf4d39e4e4b1c3f907a50adb6..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 | bool
+    - 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 31ddf5ef8852b9dbb231e4d7eeefa8bf6db08332..0f1c542830a503382ba95353937d6f7d94fbe647 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