hosts.j2 797 B

12345678910111213141516171819202122232425
  1. {% if ansible_prolog -%}
  2. {% from 'templates/ansible/prolog.j2' import prolog with context %}
  3. {{ prolog() }}
  4. {% endif -%}
  5. 127.0.0.1 localhost.localdomain localhost
  6. {% if hosts_fqdn and ansible_default_ipv4.address is defined %}
  7. {{ ansible_default_ipv4.address }} {{ ansible_fqdn }} {{ ansible_hostname }}
  8. {% endif %}
  9. {% if hosts_fqdn and ansible_default_ipv6.address is defined %}
  10. {{ ansible_default_ipv6.address }} {{ ansible_fqdn }} {{ ansible_hostname }}
  11. {% endif %}
  12. {% if hosts_static_lookup %}
  13. {% for h in hosts_static_lookup %}
  14. {{ h }}
  15. {% endfor %}
  16. {%endif %}
  17. # The following lines are desirable for IPv6 capable hosts
  18. ::1 localhost ip6-localhost ip6-loopback
  19. fe00::0 ip6-localnet
  20. ff00::0 ip6-mcastprefix
  21. ff02::1 ip6-allnodes
  22. ff02::2 ip6-allrouters
  23. ff02::3 ip6-allhosts