Tweak variable layout for wg additional hosts

This commit is contained in:
KemoNine 2020-08-10 20:03:45 -04:00
parent 4042d9595c
commit 4d7efb70ec

View file

@ -72,9 +72,9 @@ Endpoint = {{host}}:{{wireguard_port}}
{% if wg_additional_host_keys is defined %} {% if wg_additional_host_keys is defined %}
{% for host in wg_additional_host_keys %} {% for host in wg_additional_host_keys %}
[Peer] [Peer]
# {{hostvars[host].name}} # {{ host.name }}
PublicKey = {{hostvars[host].public_key}} PublicKey = {{host.public_key}}
AllowedIPs = {{hostvars[host].wireguard_ip}}/32 AllowedIPs = {{host.wireguard_ip}}/32
PersistentKeepalive = {{hostvars[host].wireguard_persistent_keepalive}} PersistentKeepalive = {{host.wireguard_persistent_keepalive}}
{% endfor %} {% endfor %}
{% endif %} {% endif %}