From: Guillaume Abrioux Date: Wed, 27 Jan 2021 17:36:13 +0000 (+0100) Subject: rgw: avoid useless call to ceph-rgw X-Git-Tag: v6.0.0alpha7~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=86170816649ccb1d0995ea3f0bd17275d4af2574;p=ceph-ansible.git rgw: avoid useless call to ceph-rgw since `ceph-rgw` may be called from `ceph-handler` in some contexts we should avoid rerunning it unnecessarily. Signed-off-by: Guillaume Abrioux --- diff --git a/roles/ceph-handler/tasks/main.yml b/roles/ceph-handler/tasks/main.yml index c7b323e78..099ad3b30 100644 --- a/roles/ceph-handler/tasks/main.yml +++ b/roles/ceph-handler/tasks/main.yml @@ -68,4 +68,10 @@ 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 diff --git a/roles/ceph-rgw/tasks/main.yml b/roles/ceph-rgw/tasks/main.yml index a3e4b84a0..5811115b1 100644 --- a/roles/ceph-rgw/tasks/main.yml +++ b/roles/ceph-rgw/tasks/main.yml @@ -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