# {{ ansible_managed }}
127.0.0.1   localhost
::1         localhost ip6-localhost ip6-loopback

# The following lines are desirable for IPv6 capable hosts.
fe00::0     ip6-localnet
ff00::0     ip6-mcastprefix
ff02::1     ip6-allnodes
ff02::2     ip6-allrouters

# Network nodes as generated through Ansible.
{% for host in groups.all %}
{% set short_name = host.split('.') %}
{% if 'ansible_default_ipv4' in hostvars[host] %}
{{ hostvars[host].ansible_default_ipv4.address }}   {{host}}    {{ short_name[0] }}
{% endif %}
{% endfor %}