summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAhmed Abdelhalim <[email protected]>2025-09-14 02:15:02 +0200
committerAhmed Abdelhalim <[email protected]>2025-09-14 02:15:02 +0200
commit2116e15abd16c64827f89c1f86533267fd954809 (patch)
treefa05df220cc9a9be2165f32a8699e248307821b8
parent671c9d6b0811e7d269816d1423735abb6bd205b2 (diff)
Fix wireguard stopping vpn when it's not necessary
It's only necessary to stop the VPN to set another one running instead (as the configurations are not built to stack VPN although possible)
-rw-r--r--roles/wireguard/tasks/main.yml2
1 files changed, 1 insertions, 1 deletions
diff --git a/roles/wireguard/tasks/main.yml b/roles/wireguard/tasks/main.yml
index 27a2f864..a0f0cca1 100644
--- a/roles/wireguard/tasks/main.yml
+++ b/roles/wireguard/tasks/main.yml
@@ -24,6 +24,7 @@
- name: "Configure autostart connection"
become: true
+ when: wireguard_autostart_connection != ""
block:
- name: "Ensure all wireguard connections are stopped"
ansible.builtin.systemd_service:
@@ -44,4 +45,3 @@
name: "wg-quick@{{ wireguard_autostart_connection }}"
enabled: true
state: "started"
- when: wireguard_autostart_connection != ""