aboutsummaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorGravatar MarkKoz <[email protected]>2022-01-11 13:49:32 -0800
committerGravatar MarkKoz <[email protected]>2022-01-11 13:49:32 -0800
commitb41bca7c297bcf4c783901bea6ec8b44d96fb9bc (patch)
tree25fdae78264d4d80e9bebf4f1c99f971cbb9d988 /roles
parentUpdate README with directory structure (diff)
Make wireguard port a variable
Diffstat (limited to 'roles')
-rw-r--r--roles/wireguard/templates/wg0.conf.j24
1 files changed, 2 insertions, 2 deletions
diff --git a/roles/wireguard/templates/wg0.conf.j2 b/roles/wireguard/templates/wg0.conf.j2
index 96f23c3..aabd031 100644
--- a/roles/wireguard/templates/wg0.conf.j2
+++ b/roles/wireguard/templates/wg0.conf.j2
@@ -1,7 +1,7 @@
# Configuration managed by Ansible
[Interface]
Address = {{ wireguard_subnet }}
-ListenPort = 46850
+ListenPort = {{ wireguard_port }}
PrivateKey = {{ wg_priv_key['content'] | b64decode | trim }}
{% for host in hostvars.keys() if not host == inventory_hostname %}
@@ -9,7 +9,7 @@ PrivateKey = {{ wg_priv_key['content'] | b64decode | trim }}
[Peer]
AllowedIPs = {{ hostvars[host]['wireguard_subnet'] }}
PublicKey = {{ hostvars[host]['wg_pub_key']['content'] | b64decode | trim }}
-Endpoint = {{ host }}.box.pydis.wtf:46850
+Endpoint = {{ host }}.box.pydis.wtf:{{ wireguard_port }}
PersistentKeepalive = 30
{% endfor %}