ansible-role-hostname/templates/hosts.j2
2020-11-04 23:02:23 +01:00

10 lines
416 B
Django/Jinja

127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
{% for n in vm['nics']|default([]) %}
{% for i in vm['nics'][n].protocol if vm['nics'][n].protocol[i].type == "static" %}
{{ vm['nics'][n].protocol[i].options['address'].split('/')[0] }} {{ inventory_hostname }} {{ inventory_hostname_short }}
{% endfor %}
{% endfor %}