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
commit7a3888e6c7ed7e6c9419359986fcee8457ec928e (patch)
treefa05df220cc9a9be2165f32a8699e248307821b8
parent0095b3019a7abc95f0c195a2d5145995bec6f93c (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 != ""