ansible/roles/vpn/templates/wiregard.conf.j2

21 lines
486 B
Text
Raw Normal View History

2021-04-22 22:51:33 +02:00
{{ ansible_managed | comment }}
[Interface]
Address = {{ item.value.ip }}
2021-04-22 22:51:33 +02:00
PrivateKey = {{ item.value.private_key }}
ListenPort = {{ vpn_port }}
{% for peer in item.value.peers %}
[Peer]
2021-04-23 00:40:31 +02:00
{{ peer.comment | comment }}
2021-04-22 22:51:33 +02:00
Publickey = {{ peer.public_key }}
{% if peer.endpoint %}
Endpoint = {{ peer.endpoint }}:{{ vpn_port }}
2021-04-22 22:51:33 +02:00
{% endif %}
AllowedIPs = {{ peer.allowed_ips | join(", ") }}
2021-04-22 22:51:33 +02:00
{% endfor %}
{% if item.value.keepalive %}
PersistentKeepalive = {{ vpn_keepalive_period }}
{% endif %}