mail-server/ansible/templates/wireguard.conf.j2

14 lines
326 B
Plaintext
Raw Normal View History

2024-05-29 20:06:22 +01:00
{% set _wg = lookup('vars', inventory_hostname + '_wg') %}
# {{ ansible_managed }}
[Interface]
PrivateKey = {{ _wg.private_key }}
ListenPort = {{ _wg.port }}
{% for peer in _wg.peers %}
[Peer]
# {{ peer.name }}
PublicKey = {{ peer.public_key }}
Endpoint = {{ peer.endpoint }}
AllowedIPs = {{ peer.allowed_ips }}
{% endfor %}