You've already forked ansible-role-common
edited hosts template to allow for vendor overrid/addition of named hosts to hosts file.
This commit is contained in:
@@ -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 %}
|
||||
|
||||
Reference in New Issue
Block a user