Skip to content
Snippets Groups Projects
Commit 9b6a4c2b authored by skorpy's avatar skorpy :construction_worker:
Browse files

Update dn42-interfaces-wireguard.j2

parent a7edc2ef
Branches
No related tags found
No related merge requests found
{%- for peer in pillar.dn42.get('peers', []) if peer.tunnel.type == 'wireguard' %}
{% if peer.name == "intern" %}
{% set iface_prefix = "tun" %}
{% else %}
{% set iface_prefix = "dn42" %}
{% endif %}
{%- if peer.name == "intern" %}
{%- set iface_prefix = "tun" %}
{%- else %}
{%- set iface_prefix = "dn42" %}
{%- endif %}
auto {{ iface_prefix }}_{{ peer.name }}
{%- if 'ip4' in peer.addr.local %}
......@@ -16,7 +15,7 @@ iface {{ iface_prefix }}_{{ peer.name }} inet static
post-down ip link del dev $IFACE
{%- endif %}
{%- if 'ip6' in peer.addr.local %}
{% if 'ip6' in peer.addr.local %}
iface {{ iface_prefix }}_{{ peer.name }} inet6 static
address {{ peer.addr.local.ip6.address }}/127
{%- endif %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment