mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-08-06 16:46:54 +02:00
Update to 2021-12-01 19:13
This commit is contained in:
9
roles/network/templates/hosts.j2
Normal file
9
roles/network/templates/hosts.j2
Normal file
@@ -0,0 +1,9 @@
|
||||
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 %}
|
Reference in New Issue
Block a user