Merge pull request #389 from AcalephStorage/fix-for-different-monitor-interfaces

Fix for error when the nodes don't have the same interface name.
pull/396/head
Leseb 2015-08-31 14:27:17 +02:00
commit 0410f6a258
1 changed files with 1 additions and 1 deletions

View File

@ -91,7 +91,7 @@
{% if hostvars[host]['ansible_hostname'] is defined %}
[mon.{{ hostvars[host]['ansible_hostname'] }}]
host = {{ hostvars[host]['ansible_hostname'] }}
mon addr = {{ hostvars[host]['ansible_' + 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 %}
{% endfor %}