ansible-role-wireguard_client/templates/wireguard_client.conf
2022-11-04 17:55:57 +02:00

15 lines
395 B
Text

[Interface]
Address = {{ addresses[ansible_hostname] }}
PrivateKey = {{ private_key }}
ListenPort = {{ listenport }}
{% for item in wireguard_peers %}
# Peer name: {{ item.name }}
[Peer]
PublicKey = {{ item.PublicKey }}
AllowedIPs = {{ item.AllowedIPs }}
{% if item.EndPointIP is defined and item.EndPointIP != '' %}
EndPoint = {{ item.EndPointIP }}:{{ listenport }}
{% endif %}
{% endfor %}