2023-04-13 07:25:26 +00:00
|
|
|
# {{ ansible_managed }}
|
|
|
|
|
|
|
|
[Interface]
|
|
|
|
{% if item.listen_port is defined %}
|
|
|
|
ListenPort = {{ item.listen_port }}
|
|
|
|
{% endif %}
|
|
|
|
PrivateKey = {{ item.privkey }}
|
|
|
|
Address = {{ item.addresses | join(', ') }}
|
|
|
|
|
|
|
|
{% for peer in item.peers %}
|
|
|
|
[Peer]
|
|
|
|
# {{ peer.name }}
|
|
|
|
PublicKey = {{ peer.pubkey }}
|
2023-10-10 09:19:42 +00:00
|
|
|
{% if peer.endpoint is defined %}
|
2023-04-13 07:25:26 +00:00
|
|
|
Endpoint = {{ peer.endpoint }}
|
2023-10-10 09:19:42 +00:00
|
|
|
{% endif %}
|
2023-04-13 07:25:26 +00:00
|
|
|
AllowedIPs = {{ peer.allowed_ips | join(', ') }}
|
|
|
|
{% if peer.persistent_keepalive is defined %}
|
|
|
|
PersistentKeepalive = {{ peer.persistent_keepalive }}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% endfor %}
|