Add support for 'Endpoint' in Wireguard role
This commit is contained in:
parent
0fbcd687d3
commit
5c7360aded
1 changed files with 5 additions and 2 deletions
|
@ -1,12 +1,15 @@
|
||||||
# {{ ansible_managed }}
|
# {{ ansible_managed }}
|
||||||
|
|
||||||
[Interface]
|
[Interface]
|
||||||
Address = {{ item.addrs | join(",") }}
|
|
||||||
PrivateKey = {{ item.private_key }}
|
PrivateKey = {{ item.private_key }}
|
||||||
ListenPort = {{ item.listen_port }}
|
ListenPort = {{ item.listen_port }}
|
||||||
|
|
||||||
{% for peer in item.peers %}
|
{% for peer in item.peers %}
|
||||||
[Peer]
|
[Peer]
|
||||||
PublicKey = {{ peer.public_key }}
|
PublicKey = {{ peer.public_key }}
|
||||||
AllowedIps = {{ peer.allowed_addrs | join(",") }}
|
AllowedIps = {{ peer.allowed_addrs | join(", ") }}
|
||||||
|
PersistentKeepalive = {{ peer.keepalive }}
|
||||||
|
{% if 'endpoint' in peer %}
|
||||||
|
Endpoint = {{ peer.endpoint }}
|
||||||
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
Loading…
Reference in a new issue