From 86170816649ccb1d0995ea3f0bd17275d4af2574 Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Wed, 27 Jan 2021 18:36:13 +0100 Subject: [PATCH] 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 --- roles/ceph-handler/tasks/main.yml | 8 +++++++- roles/ceph-rgw/tasks/main.yml | 4 +++- 2 files changed, 10 insertions(+), 2 deletions(-) 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 -- 2.47.3