This commit is contained in:
Nils Cant
2020-06-23 14:06:12 +02:00
parent 0249fac42b
commit aeb2cf7233
11 changed files with 189 additions and 0 deletions

16
templates/wg.conf.j2 Normal file
View File

@@ -0,0 +1,16 @@
[Interface]
PrivateKey = {{ priv_key.stdout }}
ListenPort = {{ wireguard_listenport }}
{% for peer in wireguard_peers %}
[Peer]
PublicKey = {{ peer.publickey }}
{% if peer.presharedkey is defined %}
PresharedKey = {{ peer.presharedkey }}
{% endif %}
{% if peer.endpoint is defined -%}
Endpoint = {{ peer.endpoint }}
{%- endif %}
AllowedIPs = {{ peer.allowedips | join(', ') }}
{% endfor %}