hosts.j2 787 B

1234567891011121314151617181920212223242526
  1. {% if ansible_controlled is defined and ansible_controlled != "" %}
  2. #
  3. # {{ ansible_controlled }}
  4. #
  5. {% endif %}
  6. 127.0.0.1 localhost.localdomain localhost
  7. {% if hosts_fqdn and ansible_default_ipv4.address is defined %}
  8. {{ ansible_default_ipv4.address }} {{ ansible_fqdn }} {{ ansible_hostname }}
  9. {% endif %}
  10. {% if hosts_fqdn and ansible_default_ipv6.address is defined %}
  11. {{ ansible_default_ipv6.address }} {{ ansible_fqdn }} {{ ansible_hostname }}
  12. {% endif %}
  13. {% if hosts_static_lookup %}
  14. {% for h in hosts_static_lookup %}
  15. {{ h }}
  16. {% endfor %}
  17. {%endif %}
  18. # The following lines are desirable for IPv6 capable hosts
  19. ::1 localhost ip6-localhost ip6-loopback
  20. fe00::0 ip6-localnet
  21. ff00::0 ip6-mcastprefix
  22. ff02::1 ip6-allnodes
  23. ff02::2 ip6-allrouters
  24. ff02::3 ip6-allhosts