From a464ee465a923fca4f902d2efc7f3a9d3915fa8d Mon Sep 17 00:00:00 2001 From: "Antonio J. Delgado" Date: Fri, 4 Nov 2022 18:11:03 +0200 Subject: [PATCH] check for a pub key --- 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 389d16a..53e0a47 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 %} +{% for item in wireguard_peers %}{% if item['name'] != inventory_hostname and 'PublicKey' in item %} # Peer name: {{ item.name }} [Peer]