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]