From: Guillaume Abrioux Date: Thu, 11 Aug 2022 08:28:41 +0000 (+0200) Subject: facts: set is_rgw_instances_defined from configure_dashboard X-Git-Tag: v4.0.70.15 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=694be0dce95084f758e1e6ac465589ef927e88d6;p=ceph-ansible.git 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 (cherry picked from commit 33ac715cfb8ebf8efc50ee403bd334c202bf7ea2) --- diff --git a/roles/ceph-facts/tasks/set_radosgw_address.yml b/roles/ceph-facts/tasks/set_radosgw_address.yml index 25cca63a1..3e15bc98a 100644 --- a/roles/ceph-facts/tasks/set_radosgw_address.yml +++ b/roles/ceph-facts/tasks/set_radosgw_address.yml @@ -74,9 +74,12 @@ - name: set_fact is_rgw_instances_defined set_fact: - is_rgw_instances_defined: "{{ rgw_instances is defined }}" + is_rgw_instances_defined: "{{ hostvars[ceph_dashboard_call_item | default(inventory_hostname)]['rgw_instances'] is defined }}" + delegate_to: "{{ ceph_dashboard_call_item if ceph_dashboard_call_item is defined else inventory_hostname }}" + delegate_facts: "{{ true if ceph_dashboard_call_item is defined else false }}" when: - - inventory_hostname in groups.get(rgw_group_name, []) + - inventory_hostname in groups.get(rgw_group_name, []) or + ceph_dashboard_call_item is defined - rgw_multisite | bool - name: set_fact rgw_instances with rgw multisite