From a4620d9bb51f30631d973165752ac69a26aeae98 Mon Sep 17 00:00:00 2001 From: "Antonio J. Delgado" Date: Fri, 4 Nov 2022 18:11:32 +0200 Subject: [PATCH] check for existing required values --- templates/wireguard_client.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/wireguard_client.conf b/templates/wireguard_client.conf index 53e0a47..0e8bfb0 100644 --- a/templates/wireguard_client.conf +++ b/templates/wireguard_client.conf @@ -4,7 +4,7 @@ Address = {% for item in wireguard_peers %}{% if item['name'] == inventory_hostn PrivateKey = {{ private_key }} ListenPort = {{ listenport }} -{% for item in wireguard_peers %}{% if item['name'] != inventory_hostname and 'PublicKey' in item %} +{% for item in wireguard_peers %}{% if item['name'] != inventory_hostname and 'PublicKey' in item and 'AllowedIPs' in item and 'EndPointIP' in item %} # Peer name: {{ item.name }} [Peer]