From 840f56262d76c604400fbaf286e10e384d2a95fa Mon Sep 17 00:00:00 2001 From: Anes Belfodil Date: Sun, 16 Jan 2022 14:53:58 -0500 Subject: [PATCH] Remove unnecessary and buggy check preventing proper port from being set in peers (#112) --- templates/etc/wireguard/wg.conf.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/etc/wireguard/wg.conf.j2 b/templates/etc/wireguard/wg.conf.j2 index 1feb09c..d8c0ebe 100644 --- a/templates/etc/wireguard/wg.conf.j2 +++ b/templates/etc/wireguard/wg.conf.j2 @@ -65,7 +65,7 @@ PersistentKeepalive = {{hostvars[host].wireguard_persistent_keepalive}} ) %} Endpoint = {{hostvars[host].wireguard_dc['endpoint']}}:{{hostvars[host].wireguard_dc['port']}} -{% elif hostvars[host].wireguard_port is defined and hostvars[host].wireguard_port is number %} +{% elif hostvars[host].wireguard_port is defined %} {% if hostvars[host].wireguard_endpoint is defined and hostvars[host].wireguard_endpoint != "" %} Endpoint = {{hostvars[host].wireguard_endpoint}}:{{hostvars[host].wireguard_port}} {% else %}