]> git.apps.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, 26 Jul 2021 15:50:35 +0000 (17:50 +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>
(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 0c8ae8a04e42249099b07f60dcd5d27daf4a96e1..64970e7e41fb903188caf24f0b3ef7bfc59146bb 100644 (file)
     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
+
+- name: append pg_autoscaler module to ceph_mgr_modules
+  set_fact:
+    ceph_mgr_modules: "{{ ceph_mgr_modules | union(['pg_autoscaler']) }}"
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 dd7fd615202a01145e5fda2028f0fc8bd3d0a0bd..e908eb8a23819552b6e1427e0a61f85ec02aa8e9 100644 (file)
@@ -1,13 +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: append pg_autoscaler module to ceph_mgr_modules
-  set_fact:
-    ceph_mgr_modules: "{{ ceph_mgr_modules | union(['pg_autoscaler']) }}"
-
 - 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