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

15 lines
375 B
Plaintext
Raw Normal View History

2018-07-18 21:57:27 +00:00
#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 %}