new wireguard mesh format
parent
b711ff0367
commit
d527f8e6d0
@ -1,15 +1,17 @@
|
|||||||
[Interface]
|
[Interface]
|
||||||
ListenPort = {{ item.wireguard_mesh_port }}
|
ListenPort = {{ item.wireguard_mesh_port }}
|
||||||
PrivateKey = {{ item.wireguard_mesh_key }}
|
PrivateKey = {{ item.wireguard_mesh_priv_key }}
|
||||||
Address = {{ item.wireguard_mesh_address }}/48
|
Address = {{ item.wireguard_mesh_address }}/48
|
||||||
MTU = 1400
|
MTU = 1400
|
||||||
PostUp = /etc/wireguard/up{{ item.name }}.sh
|
PostUp = /etc/wireguard/up{{ item.name }}.sh
|
||||||
PreDown = /etc/wireguard/down{{ item.name }}.sh
|
PreDown = /etc/wireguard/down{{ item.name }}.sh
|
||||||
|
|
||||||
{% for peer in item.wireguard_mesh_peers %}
|
{% for host in groups['fastd'] %}
|
||||||
|
{% for site in hostvars[host]['sites'] if site.name == item.name and site.wireguard_mesh_number != item.wireguard_mesh_number %}
|
||||||
[Peer]
|
[Peer]
|
||||||
PublicKey = {{ peer.key }}
|
PublicKey = {{ site.wireguard_mesh_pub_key }}
|
||||||
AllowedIPs = {{ peer.address }}/128
|
AllowedIPs = {{ site.wireguard_mesh_address }}/128
|
||||||
Endpoint = [{{ peer.endpoint }}]:{{ item.wireguard_mesh_port }}
|
Endpoint = [{{ site.wireguard_mesh_endpoint }}]:{{ item.wireguard_mesh_port }}
|
||||||
PersistentKeepalive = 30
|
PersistentKeepalive = 30
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
{% endfor %}
|
||||||
|
Loading…
Reference in New Issue