diff --git a/roles/ceph-defaults/tasks/set_monitor_address.yml b/roles/ceph-defaults/tasks/set_monitor_address.yml index 799abd2f1..271f5cf22 100644 --- a/roles/ceph-defaults/tasks/set_monitor_address.yml +++ b/roles/ceph-defaults/tasks/set_monitor_address.yml @@ -41,4 +41,10 @@ - ip_version == 'ipv6' - hostvars[item]['monitor_address_block'] | default('subnet') == 'subnet' - hostvars[item]['monitor_address'] | default('0.0.0.0') == '0.0.0.0' - - hostvars[item]['monitor_interface'] | default('interface') != 'interface' \ No newline at end of file + - hostvars[item]['monitor_interface'] | default('interface') != 'interface' + +- name: set_fact _current_monitor_address + set_fact: + _current_monitor_address: "{{ item.addr }}" + with_items: "{{ _monitor_addresses }}" + when: inventory_hostname == item.name \ No newline at end of file