1
1
mirror of https://gitlab.archlinux.org/archlinux/infrastructure.git synced 2025-01-18 08:06:16 +01:00
infrastructure/roles/wireguard/templates/wg0.netdev.j2
Evangelos Foutras 248e57b3c5
Remove [node_exporters]/[wireguard] from inventory
All servers are part of these groups which makes them redundant.
2022-05-12 19:40:49 +03:00

16 lines
338 B
Django/Jinja

[NetDev]
Name=wg0
Kind=wireguard
[WireGuard]
ListenPort=51820
PrivateKey={{ vault_wireguard_private_key }}
{% for host in groups['all'] if host != inventory_hostname %}
[WireGuardPeer]
PublicKey={{ hostvars[host]['wireguard_public_key'] }}
AllowedIPs={{ hostvars[host]['wireguard_address'] }}/32
Endpoint={{ host }}:51820
{% endfor %}