diff options
Diffstat (limited to 'roles/wireguard/templates/wg0.conf')
-rw-r--r-- | roles/wireguard/templates/wg0.conf | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/roles/wireguard/templates/wg0.conf b/roles/wireguard/templates/wg0.conf new file mode 100644 index 0000000..9e6f4c6 --- /dev/null +++ b/roles/wireguard/templates/wg0.conf @@ -0,0 +1,15 @@ +[Interface] +PrivateKey = {{ wg_private_key }} +Address = {{ wg_addr4 }}, {{ wg_addr6 }} +ListenPort = {{ wg_listen_port }} +{% if wg_peers is defined %} +{% for peer in wg_peers %} + +[Peer] +PublicKey = {{ peer.public_key }} +{% if peer.preshared_key is defined %} +PresharedKey = {{ peer.preshared_key }} +{% endif %} +AllowedIPs = {{ peer.addr4 }}/32, {{ peer.addr6 }}/128 +{% endfor %} +{% endif %} |