17 lines
558 B
Django/Jinja
17 lines
558 B
Django/Jinja
{{ ansible_managed | comment }}
|
|
# For unmanaged host {{ item.item.host }}
|
|
# qrencode -t ansiutf8 < /etc/wireguard/{{ item.item.host }}.conf
|
|
[Interface]
|
|
PrivateKey = {{ item.stdout }}
|
|
Address = {{ item.item.allowed_ips }}
|
|
{% if item.item.dns is defined %}
|
|
DNS = {{ item.item.dns }}
|
|
{% endif %}
|
|
|
|
[Peer]
|
|
Endpoint = {{ wireguard_endpoint }}:{{ wireguard_port }}
|
|
PublicKey = {{ public_key }}
|
|
# PresharedKey =
|
|
# Using the catch-all AllowedIPs = 0.0.0.0/0, ::/0 will forward all IPv4 (0.0.0.0/0) and IPv6 (::/0) traffic over the VPN.
|
|
AllowedIPs = 0.0.0.0/0, ::/0
|