playbooks/compute/templates/hosts.j2
2024-06-07 13:43:00 -07:00

35 lines
832 B
Django/Jinja

#
# This file is managed by Ansible, do not edit manually.
#
# Loopback
127.0.0.1 localhost.localdomain
127.0.0.1 localhost
::1 localhost.localdomain
::1 localhost
# IPv4 addresses
{% if ansible_facts['all_ipv4_addresses'] %}
{% for ip in ansible_facts['all_ipv4_addresses'] %}
{{ ip }} {{ inventory_hostname}}
{{ ip }} {{ inventory_hostname }}.{{ domain_name }}
{% endfor %}
{% endif %}
# IPv6 addresses
{% if ansible_facts['all_ipv6_addresses'] %}
{% for ip in ansible_facts['all_ipv6_addresses'] %}
{% if not ip.startswith('fe80') %}
{{ ip }} {{ inventory_hostname}}
{{ ip }} {{ inventory_hostname }}.{{ domain_name }}
{% endif %}
{% endfor %}
{% endif %}
# 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
ff02::3 ip6-allhosts