ansible-role-wireguard/templates/interface.conf.j2
2023-05-23 08:30:17 -07:00

14 lines
350 B
Django/Jinja

[Interface]
Address = {{ wireguard_address }}
PostUp = /etc/wireguard/routes.sh add
PostDown = /etc/wireguard/routes.sh del
ListenPort = {{ wireguard_listen_port }}
PrivateKey = {{ wireguard_private_key }}
SaveConfig = false
{% for peer in wireguard_peers %}
[Peer]
PublicKey = {{ peer.public_key }}
AllowedIPs = {{ peer.allowed_ips }}
{% endfor %}