Ansible roles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

10 lines
404 B

127.0.0.1 localhost
::1 localhost6
{% if net_hosts is not defined or net_hosts | length < 1 %}
{{ ansible_default_ipv4.address }} {{ inventory_hostname }} {{ inventory_hostname | regex_replace('^([^\.]+)\..*','\\1') }}{% if system_hostname is defined %} {{ system_hostname }}{% endif %}
{% else %}
{% for host in net_hosts %}
{{ host.ip }} {{ host.aliases | join(' ') }}
{% endfor %}
{% endif %}