39 lines
1.2 KiB
Django/Jinja
39 lines
1.2 KiB
Django/Jinja
{{ ansible_header | comment }}
|
|
|
|
{% set adh = hostvars[inventory_hostname]['ansible_' + adh_iface.stdout] %}
|
|
auto {{ adh_iface.stdout }}
|
|
iface {{ adh_iface.stdout }} inet static
|
|
address {{ adh.ipv4.address }}
|
|
network {{ adh.ipv4.network }}
|
|
netmask {{ adh.ipv4.netmask }}
|
|
broadcast {{ adh.ipv4.broadcast }}
|
|
gateway {{ adh_gateway }}
|
|
mtu 1496
|
|
dns-nameservers {{ adh_dns }}
|
|
dns-search crans.org
|
|
up /sbin/ip link set $IFACE alias adh
|
|
{% if 'interfaces' in ansible_local %}
|
|
{% if 'sup_if_4' in ansible_local.interfaces %}
|
|
{% if adh_iface.stdout in ansible_local.interfaces.sup_if_4 %}
|
|
{% for line in ansible_local.interfaces.sup_if_4[adh_iface.stdout] %}
|
|
{{ line }}
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
iface {{ adh_iface.stdout }} inet6 static
|
|
address {{ adh.ipv6[0].address }}/{{ adh.ipv6[0].prefix }}
|
|
autoconf 1
|
|
accept_ra 2
|
|
up /sbin/sysctl net/ipv6/conf/$IFACE/accept_ra_defrtr=1
|
|
{% if 'interfaces' in ansible_local %}
|
|
{% if 'sup_if_6' in ansible_local.interfaces %}
|
|
{% if adh_iface.stdout in ansible_local.interfaces.sup_if_6 %}
|
|
{% for line in ansible_local.interfaces.sup_if_6[adh_iface.stdout] %}
|
|
{{ line }}
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% endif %}
|
|
{% endif %}
|