From a2af744cdb9dc7422d55decd66c9179bbe87efb1 Mon Sep 17 00:00:00 2001 From: Nikita Simonov Date: Fri, 29 May 2026 20:00:09 +0400 Subject: [PATCH] deploy wireguard --- templates/wg.conf.j2 | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/templates/wg.conf.j2 b/templates/wg.conf.j2 index 1bcdfb5..69e93fa 100644 --- a/templates/wg.conf.j2 +++ b/templates/wg.conf.j2 @@ -5,7 +5,13 @@ {% for peer in wireguard_interfaces[item].peers %} [Peer] -{% for key, value in peer | dictsort %} -{{ key }} = {{ value }} -{% endfor %} +# {{ peer.name }} +PublicKey = {{ peer.PublicKey }} +AllowedIPs = {{ peer.AllowedIPs }} +{% if peer.Endpoint is defined %} +Endpoint = {{ peer.Endpoint }} +{% endif %} +{% if peer.PersistentKeepalive is defined %} +PersistentKeepalive = {{ peer.PersistentKeepalive }} +{% endif %} {% endfor %}