Add support for 'Endpoint' in Wireguard role

This commit is contained in:
jeltz 2021-02-20 21:02:24 +01:00
parent 0fbcd687d3
commit 5c7360aded

View file

@ -1,7 +1,6 @@
# {{ ansible_managed }}
[Interface]
Address = {{ item.addrs | join(",") }}
PrivateKey = {{ item.private_key }}
ListenPort = {{ item.listen_port }}
@ -9,4 +8,8 @@ ListenPort = {{ item.listen_port }}
[Peer]
PublicKey = {{ peer.public_key }}
AllowedIps = {{ peer.allowed_addrs | join(", ") }}
PersistentKeepalive = {{ peer.keepalive }}
{% if 'endpoint' in peer %}
Endpoint = {{ peer.endpoint }}
{% endif %}
{% endfor %}