20 lines
441 B
Django/Jinja
20 lines
441 B
Django/Jinja
# {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }}
|
|
|
|
[NetDev]
|
|
Name={{ vpn_interface }}
|
|
Kind=wireguard
|
|
Description=WireGuard tunnel wg0
|
|
|
|
[WireGuard]
|
|
ListenPort={{ vpn_port }}
|
|
PrivateKeyFile={{ vpn_server_key_path }}
|
|
|
|
{% for peer in vpn_peers %}
|
|
[WireGuardPeer]
|
|
PublicKey={{ peer.public_key }}
|
|
PresharedKeyFile={{ vpn_preshared_path }}
|
|
AllowedIPs={{ peer.ip }}/32
|
|
{% if not loop.last %}
|
|
|
|
{% endif %}
|
|
{% endfor %}
|