look at monitor_interface in hostvars when choosing interface or address

This fixes a bug where monitor_interface might be set in your inventory
file and not by using group_vars or --extra-vars causing the template to
use the default address of 0.0.0.0 instead of the defined
monitor_interface.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
pull/701/head
Andrew Schoen 2016-04-08 14:23:12 -05:00
parent 7a5d4ce4e0
commit 5031234d66
1 changed files with 1 additions and 1 deletions

View File

@ -99,7 +99,7 @@ host = {{ hostvars[host]['ansible_fqdn'] }}
[mon.{{ hostvars[host]['ansible_hostname'] }}]
host = {{ hostvars[host]['ansible_hostname'] }}
{% endif %}
{% if monitor_interface != "interface" %}
{% if hostvars[host]['monitor_interface'] != "interface" %}
{% include 'mon_addr_interface.j2' %}
{% else %}
{% include 'mon_addr_address.j2' %}