Files
ansible-matzman-test/roles/ubuntu-docker-host/templates/wg0.conf.j2
T
2026-03-24 08:19:29 +01:00

24 lines
796 B
Django/Jinja

# Managed by Ansible — do not edit manually
[Interface]
Address = {{ wg_nets[wg_if].hosts[inventory_hostname].address }}
ListenPort = {{ wg_nets[wg_if].hosts[inventory_hostname].port }}
PrivateKey = {{ wg_nets[wg_if].secrect[inventory_hostname].private_key }}
{% if wg_nets[wg_if].hosts[inventory_hostname].dnsserver is defined %}
DNS = {{ wg_nets[wg_if].hosts[inventory_hostname].dnsserver }}
{% endif %}
{% for peer, data in wg_nets[wg_if].hosts[inventory_hostname].peers.items() %}
# {{ peer }}
[Peer]
PublicKey = {{ wg_nets[wg_if].hosts[peer].public_key }}
AllowedIPs = {{ data.allowed_ips }}
{% if data.preshared_key is defined %}
PresharedKey = {{ data.preshared_key }}
{% endif %}
{% if data.keepalive is defined %}
PersistentKeepalive = {{ data.keepalive }}
{% endif %}
{% endfor %}