1
0
Fork 0
This repository has been archived on 2020-08-04. You can view files and clone it, but cannot push or open issues or pull requests.
ansible-role-wireguard/templates/wg-fullmesh.conf.j2
2018-07-18 23:57:27 +02:00

15 lines
375 B
Django/Jinja

#jinja2: trim_blocks:False
[Interface]
Address = {{vpn_ip}}
PrivateKey = {{private_key}}
ListenPort = {{wireguard_port}}
{% for host in groups["vpn"] %}
{%- if host != inventory_hostname -%}
[Peer]
PublicKey = {{hostvars[host]['public_key']}}
AllowedIPs = {{hostvars[host]['vpn_ip']}}/32
Endpoint = {{host}}:{{wireguard_port}}
{%- endif -%}
{% endfor %}