find address in list of peers

This commit is contained in:
Antonio J. Delgado 2022-11-04 17:58:18 +02:00
parent 4f969dd538
commit 57127b31ce

View file

@ -1,5 +1,5 @@
[Interface]
Address = {{ addresses[ansible_hostname] }}
Address = {% for item in wireguard_peers %}{% if item['name'] == ansible_hostname %}}{{ item['AllowedIPs'] }}{% endif %}{% endfor %}
PrivateKey = {{ private_key }}
ListenPort = {{ listenport }}