Revert "just use the hostname as the address here, because aws is weird with networking"

This reverts commit 7c1646d89358852faf5d6ef28c4e9232304af145.
This commit is contained in:
Rick Elrod 2020-02-06 19:12:00 +00:00 committed by Pierre-Yves Chibon
parent bc95213c59
commit a40e911e7b

View file

@ -13,7 +13,15 @@ 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 %}
{% else %}
address {{ host }}
{% endif %}
}
{% endif %}
{% endfor %}