From: Guillaume Abrioux Date: Wed, 16 Jun 2021 07:39:18 +0000 (+0200) Subject: multisite: fix bug during switch2containers X-Git-Tag: v6.0.9~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0a26f118f1c57b4cb487cfaef003ec3d1095d859;p=ceph-ansible.git multisite: fix bug during switch2containers When running the switch-to-containers playbook with multisite enabled, the fact "rgw_instances" is only set for the node being processed (serial: 1), the consequence of that is that the set_fact of 'rgw_instances_all' can't iterate over all rgw node in order to look up each 'rgw_instances_host'. Adding a condition checking whether hostvars[item]["rgw_instances_host"] is defined fixes this issue. Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1967926 Signed-off-by: Guillaume Abrioux (cherry picked from commit 8279d14d328ad4bacafc01847f3ad9f385b4a3d5) --- diff --git a/roles/ceph-facts/tasks/set_radosgw_address.yml b/roles/ceph-facts/tasks/set_radosgw_address.yml index 81a0bac0a..dfb1ea2cf 100644 --- a/roles/ceph-facts/tasks/set_radosgw_address.yml +++ b/roles/ceph-facts/tasks/set_radosgw_address.yml @@ -81,4 +81,5 @@ run_once: true when: - inventory_hostname in groups.get(rgw_group_name, []) + - hostvars[item]["rgw_instances_host"] is defined - hostvars[item]["rgw_multisite"] | default(False) | bool