From d1942b7ffdb55bca98a70b960e415759c619eac3 Mon Sep 17 00:00:00 2001 From: juju4 Date: Sat, 4 Apr 2020 15:34:03 -0400 Subject: [PATCH] wg.conf: wireguard_unmanaged_hosts if --- templates/wg.conf.j2 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/wg.conf.j2 b/templates/wg.conf.j2 index 56b9bec..4f0a12c 100644 --- a/templates/wg.conf.j2 +++ b/templates/wg.conf.j2 @@ -68,7 +68,7 @@ SaveConfig = true {% endif %} {% endif %} {% endfor %} -{# unmanaged hosts #} +{% if wireguard_unmanaged_hosts is defined %} {% for hostdata in uh_public_key.results %} [Peer] @@ -76,3 +76,4 @@ SaveConfig = true PublicKey = {{ hostdata.stdout }} AllowedIPs = {{ hostdata.item.allowed_ips}} {% endfor %} +{% endif %}