aboutsummaryrefslogtreecommitdiff
path: root/ansible/roles/network/templates/wireguard.conf.j2
diff options
context:
space:
mode:
Diffstat (limited to 'ansible/roles/network/templates/wireguard.conf.j2')
-rw-r--r--ansible/roles/network/templates/wireguard.conf.j28
1 files changed, 8 insertions, 0 deletions
diff --git a/ansible/roles/network/templates/wireguard.conf.j2 b/ansible/roles/network/templates/wireguard.conf.j2
index 907d546..9f70eb9 100644
--- a/ansible/roles/network/templates/wireguard.conf.j2
+++ b/ansible/roles/network/templates/wireguard.conf.j2
@@ -10,3 +10,11 @@ Endpoint = {{ hostvars[selected_host].public_ip }}:{{ hostvars[selected_host].pu
AllowedIPs = {{ hostvars[selected_host].vpn_ip }}/32
PersistentKeepalive = 25
{% endfor %}
+
+{% for host in other_vpn_nodes %}
+[Peer]
+PublicKey = {{ host.pubkey }}
+Endpoint = {{ host.public_ip }}:{{ host.public_vpn_port }}
+AllowedIPs = {{ host.vpn_ip }}/32
+PersistentKeepalive = 25
+{% endfor %}