# {{ ansible_managed }} [NetDev] Name={{ vpn_interface }} Kind=wireguard Description=WireGuard tunnel wg0 [WireGuard] ListenPort={{ vpn_port }} PrivateKeyFile={{ vpn_server_key_path }} {% for peer, properties in vpn_peers.items() %} [WireGuardPeer] PublicKey={{ properties.public_key }} PresharedKeyFile={{ properties.preshared_key_path }} AllowedIPs={{ properties.ip }} {% if not loop.last %} {% endif %} {% endfor %}