summaryrefslogtreecommitdiff
path: root/roles
diff options
context:
space:
mode:
Diffstat (limited to 'roles')
-rw-r--r--roles/tinc/handlers/main.yml15
-rw-r--r--roles/tinc/tasks/tinc.yml6
2 files changed, 16 insertions, 5 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
diff --git a/roles/tinc/tasks/tinc.yml b/roles/tinc/tasks/tinc.yml
index a76ad8e..7453811 100644
--- a/roles/tinc/tasks/tinc.yml
+++ b/roles/tinc/tasks/tinc.yml
@@ -11,13 +11,13 @@
mode: '0640'
tags:
- tconfig
- notify: configure bird
+ notify: configure tinc
- name: Install tinc-up template
template:
src: tinc-up.j2
dest: /etc/tinc/tn_int/tinc-up
mode: '0740'
- notify: configure bird
+ notify: configure tinc
tags:
- tconfig
- name: Copy remaining files
@@ -27,7 +27,7 @@
archive: false
recursive: true
times: true
- notify: configure bird
+ notify: configure tinc
- name: Make scripts executable
file:
path: "/etc/tinc/tn_int/{{ item }}"