35 lines
1.1 KiB
Django/Jinja
35 lines
1.1 KiB
Django/Jinja
{{ ansible_header | comment }}
|
|
|
|
{% set borne = hostvars[inventory_hostname]['ansible_' + borne_iface.stdout] %}
|
|
allow-hotplug {{ borne_iface.stdout }}
|
|
iface {{ borne_iface.stdout }} inet static
|
|
address {{ borne.ipv4.address }}
|
|
network {{ borne.ipv4.network }}
|
|
netmask {{ borne.ipv4.netmask }}
|
|
broadcast {{ borne.ipv4.broadcast }}
|
|
mtu 1496
|
|
dns-nameservers {{ borne_dns }}
|
|
dns-search borne.crans.org
|
|
up /sbin/ip link set $IFACE alias borne
|
|
{% if 'interfaces' in ansible_local %}
|
|
{% if 'sup_if_4' in ansible_local.interfaces %}
|
|
{% if borne_iface.stdout in ansible_local.interfaces.sup_if_4 %}
|
|
{% for line in ansible_local.interfaces.sup_if_4[borne_iface.stdout] %}
|
|
{{ line }}
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
iface {{ borne_iface.stdout }} inet6 static
|
|
address {{ borne.ipv6[0].address }}/{{ borne.ipv6[0].prefix }}
|
|
{% if 'interfaces' in ansible_local %}
|
|
{% if 'sup_if_6' in ansible_local.interfaces %}
|
|
{% if borne_iface.stdout in ansible_local.interfaces.sup_if_6 %}
|
|
{% for line in ansible_local.interfaces.sup_if_6[borne_iface.stdout] %}
|
|
{{ line }}
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% endif %}
|
|
{% endif %}
|