mirror of https://github.com/ceph/ceph-ansible.git
use hostvars for monitor interface in ceph.conf if available, else, fallback to just the plain monitor_interface var
parent
a39bd9f2a6
commit
dd65c5ebb1
|
@ -91,7 +91,7 @@
|
||||||
{% if hostvars[host]['ansible_hostname'] is defined %}
|
{% if hostvars[host]['ansible_hostname'] is defined %}
|
||||||
[mon.{{ hostvars[host]['ansible_hostname'] }}]
|
[mon.{{ hostvars[host]['ansible_hostname'] }}]
|
||||||
host = {{ hostvars[host]['ansible_hostname'] }}
|
host = {{ hostvars[host]['ansible_hostname'] }}
|
||||||
mon addr = {{ hostvars[host]['ansible_' + hostvars[host]['monitor_interface']]['ipv4']['address'] }}
|
mon addr = {{ hostvars[host]['ansible_' + (hostvars[host]['monitor_interface'] if hostvars[host]['monitor_interface'] is defined else monitor_interface) ]['ipv4']['address'] }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue