]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
ceph-mgr: run mgr_modules.yml only on the first mgr host
authorwumingqiao <wumingqiao@beyondcent.com>
Fri, 8 Mar 2019 06:56:55 +0000 (14:56 +0800)
committermergify[bot] <mergify[bot]@users.noreply.github.com>
Thu, 14 Mar 2019 20:16:33 +0000 (20:16 +0000)
the task will be delegated to mons[0] for all mgr hosts, so we can just run it on the first host and have the same effect.

Signed-off-by: wumingqiao <wumingqiao@beyondcent.com>
roles/ceph-mgr/tasks/main.yml

index 11f1e8230019f13428ba57e1718c3832c4543c40..8a1310a68ca2718440ca2874cfdb1889e097f2c4 100644 (file)
@@ -17,4 +17,6 @@
 
 - name: include mgr_modules.yml
   include_tasks: mgr_modules.yml
-  when: ceph_mgr_modules|length > 0
\ No newline at end of file
+  when:
+    - ceph_mgr_modules|length > 0
+    - inventory_hostname == groups[mgr_group_name][0]
\ No newline at end of file