]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
rgw: avoid useless call to ceph-rgw
authorGuillaume Abrioux <gabrioux@redhat.com>
Wed, 27 Jan 2021 17:36:13 +0000 (18:36 +0100)
committerDimitri Savineau <savineau.dimitri@gmail.com>
Thu, 28 Jan 2021 19:37:14 +0000 (14:37 -0500)
since `ceph-rgw` may be called from `ceph-handler` in some contexts we
should avoid rerunning it unnecessarily.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
roles/ceph-handler/tasks/main.yml
roles/ceph-rgw/tasks/main.yml

index c7b323e78cf6661a62767dd699cfbfe5470feead..099ad3b3039dc5be6b4fda0708d4ecfc69657351 100644 (file)
       import_role:
         name: ceph-rgw
         tasks_from: multisite.yml
-      when: rgw_multisite | bool
+      when:
+        - rgw_multisite | bool
+        - not multisite_called_from_handler_role | default(False) | bool
+
+    - name: set_fact multisite_called_from_handler_role
+      set_fact:
+        multisite_called_from_handler_role: true
index a3e4b84a0ec5763efcc53a579e46241273f00a20..5811115b1294b2e174d8b35204f7ad949bafb45e 100644 (file)
@@ -29,4 +29,6 @@
 
 - name: include_tasks multisite/main.yml
   include_tasks: multisite/main.yml
-  when: rgw_multisite | bool
+  when:
+    - rgw_multisite | bool
+    - not multisite_called_from_handler_role | default(False) | bool