and a hack to get nagios working

This commit is contained in:
Stephen Smoogen 2017-10-09 19:56:15 +00:00
parent 7ae974bf4d
commit 2a81d35f4a
4 changed files with 6 additions and 6 deletions

View file

@ -13,12 +13,8 @@ define host {
{% else %}
alias {{ host }}
{% endif %}
{% if hostvars[host].eth0_ip is defined %}
address {{ hostvars[host].eth0_ip }}
{% elif hostvars[host].ansible_default_ipv4 is defined %}
{% if hostvars[host].ansible_default_ipv4.address is defined %}
address {{ hostvars[host].ansible_default_ipv4.address }}
{% endif %}
{% if hostvars[host].public_ip is defined %}
address {{ hostvars[host].public_ip }}
{% else %}
address {{ host }}
{% endif %}