From 4d7efb70ecc3ecb1dd7a2f17da885c55aa446a37 Mon Sep 17 00:00:00 2001 From: KemoNine Date: Mon, 10 Aug 2020 20:03:45 -0400 Subject: [PATCH] Tweak variable layout for wg additional hosts --- roles/wireguard/templates/wg.conf.j2 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/wireguard/templates/wg.conf.j2 b/roles/wireguard/templates/wg.conf.j2 index 74b4f61..0aaa144 100644 --- a/roles/wireguard/templates/wg.conf.j2 +++ b/roles/wireguard/templates/wg.conf.j2 @@ -72,9 +72,9 @@ Endpoint = {{host}}:{{wireguard_port}} {% if wg_additional_host_keys is defined %} {% for host in wg_additional_host_keys %} [Peer] -# {{hostvars[host].name}} -PublicKey = {{hostvars[host].public_key}} -AllowedIPs = {{hostvars[host].wireguard_ip}}/32 -PersistentKeepalive = {{hostvars[host].wireguard_persistent_keepalive}} +# {{ host.name }} +PublicKey = {{host.public_key}} +AllowedIPs = {{host.wireguard_ip}}/32 +PersistentKeepalive = {{host.wireguard_persistent_keepalive}} {% endfor %} {% endif %}