From 2dc64901352d090d260d1ed746dd2fd1d957c345 Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Thu, 21 Apr 2022 10:06:56 +0200 Subject: [PATCH] facts: follow up on aa0cc93 when these variables are defined in the inventory host file, all tasks are skipped then because the node being played isn't aware about the values from the rgw nodes. Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2063029 Signed-off-by: Guillaume Abrioux (cherry picked from commit 93df3e53ab02eb112468b7c896db10d97b754cf3) --- roles/ceph-facts/tasks/set_radosgw_address.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/roles/ceph-facts/tasks/set_radosgw_address.yml b/roles/ceph-facts/tasks/set_radosgw_address.yml index a83032e2c..0bae58507 100644 --- a/roles/ceph-facts/tasks/set_radosgw_address.yml +++ b/roles/ceph-facts/tasks/set_radosgw_address.yml @@ -1,4 +1,13 @@ --- +- name: dashboard related tasks + when: ceph_dashboard_call_item is defined + block: + - name: set current radosgw_address_block, radosgw_address, radosgw_interface from node "{{ ceph_dashboard_call_item }}" + set_fact: + radosgw_address_block: "{{ hostvars[ceph_dashboard_call_item]['radosgw_address_block'] | default(radosgw_address_block) }}" + radosgw_address: "{{ hostvars[ceph_dashboard_call_item]['radosgw_address'] | default(radosgw_address) }}" + radosgw_interface: "{{ hostvars[ceph_dashboard_call_item]['radosgw_interface'] | default(radosgw_interface) }}" + - name: set_fact _radosgw_address to radosgw_address_block ipv4 set_fact: _radosgw_address: "{{ hostvars[inventory_hostname]['ansible_facts']['all_ipv4_addresses'] | ips_in_ranges(hostvars[inventory_hostname]['radosgw_address_block'].split(',')) | first }}"