# {{ ansible_managed }} [NetDev] Name={{ vpn_media.interface }} Kind=wireguard Description=WireGuard tunnel {{ vpn_media.interface }} [WireGuard] PrivateKeyFile={{ vpn_media.private_key_path }} {% for peer in vpn_media.peers %} [WireGuardPeer] PublicKey={{ peer.public_key }} PresharedKeyFile={{ peer.preshared_key_path }} AllowedIPs={{ peer.allowd_ips }} {% if peer.endpoint %} Endpoint={{ peer.endpoint }} {% endif %} {% if not loop.last %} {% endif %} {% endfor %}