diff options
Diffstat (limited to 'roles/wireguard/templates/wg.conf.j2')
-rw-r--r-- | roles/wireguard/templates/wg.conf.j2 | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/roles/wireguard/templates/wg.conf.j2 b/roles/wireguard/templates/wg.conf.j2 new file mode 100644 index 0000000..bac19a9 --- /dev/null +++ b/roles/wireguard/templates/wg.conf.j2 @@ -0,0 +1,37 @@ +[Interface] +{% for addr in item.address %} +Address = {{ addr }} +{% endfor %} +{% if item.dns is defined %} +DNS = {{ item.dns }} +{% endif %} +{% if item.preUp is defined %} +PreUp = {{ item.preUp }} +{% endif %} +{% if item.preDown is defined %} +PreDown = {{ item.preDown }} +{% endif %} +{% if item.postUp is defined %} +PostUp = {{ item.postUp }} +{% endif %} +{% if item.postDown is defined %} +PostDown = {{ item.postDown }} +{% endif %} +ListenPort = {{ item.port }} +PrivateKey = {{ item.privateKey }} +{% if item.fwmark is defined %} +Fwmark = {{ item.fwmark }} +{% endif %} + +{% for peer in item.peers %} +[Peer] +PublicKey = {{ peer.publicKey }} +{% if peer.presharedKey is defined %} +PresharedKey = {{ peer.presharedKey }} +{% endif %} +AllowedIPs = {{ peer.allowedIPs }} +{% if peer.persistentKeepalive is defined %} +PersistentKeepalive = {{ peer.persistentKeepalive }} +{% endif %} + +{% endfor %} |