fix template for endpoint

This commit is contained in:
Antonio J. Delgado 2022-11-04 18:18:13 +02:00
parent 0db6d4d79b
commit 85ae1b531d
2 changed files with 2 additions and 2 deletions

View file

@ -37,7 +37,7 @@
- name: Show public key reminder - name: Show public key reminder
debug: 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 - name: Ensure cron to ping VPN server exists
cron: cron:

View file

@ -4,7 +4,7 @@ Address = {% for item in wireguard_peers %}{% if item['name'] == inventory_hostn
PrivateKey = {{ private_key }} PrivateKey = {{ private_key }}
ListenPort = {{ listenport }} 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 name: {{ item.name }}
[Peer] [Peer]