diff --git a/templates/etc.hosts.j2 b/templates/etc.hosts.j2 index 1b2b9e9..b74a1e9 100644 --- a/templates/etc.hosts.j2 +++ b/templates/etc.hosts.j2 @@ -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 %}