Add conditional for wg_additional_host_keys

This commit is contained in:
KemoNine 2020-08-10 20:02:18 -04:00
parent 01075d4fb7
commit 4042d9595c

View file

@ -69,6 +69,7 @@ Endpoint = {{host}}:{{wireguard_port}}
{% endif %}
{% endfor %}
{% if wg_additional_host_keys is defined %}
{% for host in wg_additional_host_keys %}
[Peer]
# {{hostvars[host].name}}
@ -76,3 +77,4 @@ PublicKey = {{hostvars[host].public_key}}
AllowedIPs = {{hostvars[host].wireguard_ip}}/32
PersistentKeepalive = {{hostvars[host].wireguard_persistent_keepalive}}
{% endfor %}
{% endif %}