Skip to content

Commit d7bf53a

Browse files
committed
facts: set is_rgw_instances_defined from configure_dashboard
When we come from configure_dashboard.yml, this fact should be set if `rgw_instances` is defined in group_vars/host_vars. Otherwise, the next task that set the fact `rgw_instances` will be run as it will assume it wasn't user defined. Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2117294 Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
1 parent 84a81a1 commit d7bf53a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

roles/ceph-facts/tasks/set_radosgw_address.yml

+5-2
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,12 @@
7575

7676
- name: set_fact is_rgw_instances_defined
7777
set_fact:
78-
is_rgw_instances_defined: "{{ rgw_instances is defined }}"
78+
is_rgw_instances_defined: "{{ hostvars[ceph_dashboard_call_item | default(inventory_hostname)]['rgw_instances'] is defined }}"
79+
delegate_to: "{{ ceph_dashboard_call_item if ceph_dashboard_call_item is defined else inventory_hostname }}"
80+
delegate_facts: "{{ true if ceph_dashboard_call_item is defined else false }}"
7981
when:
80-
- inventory_hostname in groups.get(rgw_group_name, [])
82+
- inventory_hostname in groups.get(rgw_group_name, []) or
83+
ceph_dashboard_call_item is defined
8184
- rgw_multisite | bool
8285

8386
- name: set_fact rgw_instances with rgw multisite

0 commit comments

Comments
 (0)