Group/host variable refactor

This commit is contained in:
Sonny Bakker 2025-03-15 00:05:30 +01:00
parent eb308670cc
commit 4b8aaf3e95
78 changed files with 445 additions and 374 deletions

View file

@ -0,0 +1,19 @@
# {{ ansible_managed }}
[Match]
Name={{ vpn_default.interface }}
[Network]
Address={{ vpn_default.ip }}/{{ vpn_default.prefix }}
DNS={{ vpn_default.dns }}
Domains={{ vpn_default.domains | join(' ') }}
{% for peer in vpn_default.peers %}
{% for ip in peer.allowed_ips %}
{% if ip.create_route %}
[Route]
Destination={{ ip.address }}
Scope=link
{% endif %}
{% endfor %}
{% endfor %}