edited hosts template to allow for vendor overrid/addition of named hosts to hosts file.

This commit is contained in:
2016-07-03 21:01:28 +12:00
parent 755b8c42ec
commit d63c9b0748

View File

@@ -6,8 +6,16 @@
{{ ansible_default_ipv4.address }} {{ ansible_hostname }}.{{ domain }} {{ ansible_hostname }}
{% if not vendors_hosts is none %}
{% for item in vendors_hosts %}
{# note: below block takes a list of ip -> name mappings
applying them to the hosts file should the variable be
populated.
#}
{% if vendors_hosts %}
#*** Vendor Additional Host Entries ***#
{% for item in vendors_hosts %}
{{ item.ip }} {{ item.name }}
{% endfor %}
{% endfor %}
#*** END Vendor Additional Host Entries ***#
{% endif %}