[Interface] PrivateKey = {{wg_private_key}} ListenPort = 51820 {% for vars in hostvars.values() %} [Peer] Endpoint = {{vars.ansible_ssh_host}}:51820 PublicKey = {{vars.wg_public_key}} AllowedIPs = {{vars.wg_ip}} {% endfor %}