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 %} {% endif %}
{% endfor %} {% endfor %}
{% if wg_additional_host_keys is defined %}
{% for host in wg_additional_host_keys %} {% for host in wg_additional_host_keys %}
[Peer] [Peer]
# {{hostvars[host].name}} # {{hostvars[host].name}}
@ -76,3 +77,4 @@ PublicKey = {{hostvars[host].public_key}}
AllowedIPs = {{hostvars[host].wireguard_ip}}/32 AllowedIPs = {{hostvars[host].wireguard_ip}}/32
PersistentKeepalive = {{hostvars[host].wireguard_persistent_keepalive}} PersistentKeepalive = {{hostvars[host].wireguard_persistent_keepalive}}
{% endfor %} {% endfor %}
{% endif %}