mirror of https://github.com/ceph/ceph-ansible.git
defaults: add a fact '_current_monitor_address'
So we don't have to loop over `_monitor_addresses` when we need the monitor address of the current node being played. Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>pull/3285/head
parent
a2b2028212
commit
404712ef01
|
@ -41,4 +41,10 @@
|
||||||
- ip_version == 'ipv6'
|
- ip_version == 'ipv6'
|
||||||
- hostvars[item]['monitor_address_block'] | default('subnet') == 'subnet'
|
- hostvars[item]['monitor_address_block'] | default('subnet') == 'subnet'
|
||||||
- hostvars[item]['monitor_address'] | default('0.0.0.0') == '0.0.0.0'
|
- hostvars[item]['monitor_address'] | default('0.0.0.0') == '0.0.0.0'
|
||||||
- hostvars[item]['monitor_interface'] | default('interface') != 'interface'
|
- 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
|
Loading…
Reference in New Issue