You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/roles/vpn/templates/wiregard.conf.j2

21 lines
486 B
Plaintext

3 years ago
{{ ansible_managed | comment }}
[Interface]
Address = {{ item.value.ip }}
3 years ago
PrivateKey = {{ item.value.private_key }}
ListenPort = {{ vpn_port }}
{% for peer in item.value.peers %}
[Peer]
3 years ago
{{ peer.comment | comment }}
3 years ago
Publickey = {{ peer.public_key }}
{% if peer.endpoint %}
Endpoint = {{ peer.endpoint }}:{{ vpn_port }}
3 years ago
{% endif %}
AllowedIPs = {{ peer.allowed_ips | join(", ") }}
3 years ago
{% endfor %}
{% if item.value.keepalive %}
PersistentKeepalive = {{ vpn_keepalive_period }}
{% endif %}