{{ ansible_managed | comment }} [Interface] PrivateKey = {{ item.private_key }} {% if 'listen_port' in item %} ListenPort = {{ item.listen_port }} {% endif %} [Peer] PublicKey = {{ item.peer.public_key }} AllowedIps = {{ item.peer.allowed_addrs | join(", ") }} PersistentKeepalive = {{ item.peer.keepalive }} {% if 'endpoint' in item.peer %} Endpoint = {{ item.peer.endpoint }} {% endif %}