summaryrefslogtreecommitdiff
path: root/roles/tinc/handlers/main.yml
diff options
context:
space:
mode:
authoruvok cheetah2024-04-05 21:04:17 +0200
committeruvok cheetah2024-04-05 21:04:17 +0200
commit7f7df0b07e4cc64ae0eaa910edb6361c0caf110a (patch)
tree3b4f15e7cb5ade21a874a75a7d6c6e4a95e380b2 /roles/tinc/handlers/main.yml
parentfe3c7aba224e09d502dd20081beab2a1d8812600 (diff)
tinc: Fix notify, add delay
Debian@hetzner1 f*cks itself up when I restart tinc directly
Diffstat (limited to 'roles/tinc/handlers/main.yml')
-rw-r--r--roles/tinc/handlers/main.yml15
1 files changed, 13 insertions, 2 deletions
diff --git a/roles/tinc/handlers/main.yml b/roles/tinc/handlers/main.yml
index fadb8d5..56b5829 100644
--- a/roles/tinc/handlers/main.yml
+++ b/roles/tinc/handlers/main.yml
@@ -1,7 +1,18 @@
---
# handlers file for uvok_tinc
-- name: Apply Tinc config
+# restart service - at least my Hetzner server gets serious problems with "restart"
+# it needs to stop, wait, and start again.
+- name: Stop Tinc
listen: configure tinc
service:
name: "tinc@{{ tinc_netname }}"
- state: restarted
+ state: stopped
+- name: Wait
+ listen: configure tinc
+ ansible.builtin.pause:
+ seconds: 3
+- name: Start Tinc
+ listen: configure tinc
+ service:
+ name: "tinc@{{ tinc_netname }}"
+ state: started