[INFO] Créer le role

This commit is contained in:
2023-05-24 16:43:04 +02:00
parent f3cd65a0c7
commit 6f5443985a
6 changed files with 103 additions and 3 deletions
+28
View File
@@ -0,0 +1,28 @@
# {{ ansible_managed }}
{%- if inventory_hostname != inventory_hostname_short %}
{%- set host = inventory_hostname ~ ' ' ~ inventory_hostname_short %}
{%- else %}
{% set host = inventory_hostname_short %}
{%- endif %}
{%- if etc_hosts_local | length > 0 %}
{% set line = host ~ ' ' ~ (etc_hosts_local | join(' ')) %}
{%- else %}
{% set line = host %}
{%- endif +%}
127.0.0.1 {{ line }} localhost
# The following lines are desirable for IPv6 capable hosts
::1 {{ line }} localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
{% if etc_hosts_specifics | length > 0 %}
# The following lines are specified by instance configuration
{{ etc_hosts_specifics | join('\n') }}
{% endif %}