Skip to content

Commit

Permalink
rgw: avoid useless call to ceph-rgw
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
guits authored and dsavineau committed Jan 28, 2021
1 parent e835b08 commit 8617081
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 7 additions & 1 deletion roles/ceph-handler/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 3 additions & 1 deletion roles/ceph-rgw/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 8617081

Please sign in to comment.