From 85ae1b531d4976a047ba24b17d37e165ad2e8a76 Mon Sep 17 00:00:00 2001 From: "Antonio J. Delgado" Date: Fri, 4 Nov 2022 18:18:13 +0200 Subject: [PATCH] fix template for endpoint --- tasks/configure.yml | 2 +- templates/wireguard_client.conf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/configure.yml b/tasks/configure.yml index cd73c11..9e07262 100644 --- a/tasks/configure.yml +++ b/tasks/configure.yml @@ -37,7 +37,7 @@ - name: Show public key reminder debug: - msg: "Remember to add this host '{{ ansible_host }}'' public key to the inventory '{{ public_key.content | b64decode }}'" + msg: "Remember to add this host '{{ inventory_hostname }}'' public key to the inventory '{{ public_key.content | b64decode }}'" - name: Ensure cron to ping VPN server exists cron: diff --git a/templates/wireguard_client.conf b/templates/wireguard_client.conf index 0e8bfb0..4d737ae 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 and 'AllowedIPs' in item and 'EndPointIP' in item %} +{% for item in wireguard_peers %}{% if item['name'] != inventory_hostname and 'PublicKey' in item and 'AllowedIPs' in item %} # Peer name: {{ item.name }} [Peer]