aboutsummaryrefslogtreecommitdiffstats
path: root/roles/wireguard/tasks/service.yml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/wireguard/tasks/service.yml')
-rw-r--r--roles/wireguard/tasks/service.yml16
1 files changed, 9 insertions, 7 deletions
diff --git a/roles/wireguard/tasks/service.yml b/roles/wireguard/tasks/service.yml
index d1a1007..37f3cec 100644
--- a/roles/wireguard/tasks/service.yml
+++ b/roles/wireguard/tasks/service.yml
@@ -10,11 +10,13 @@
when: ansible_distribution == "OpenBSD"
- name: restart wireguard interface
- command: wg-quick "{{ item }}" "{{ wireguard_domain_controller }}"
- ignore_errors: true
- loop:
- - down
- - up
- loop_control:
- pause: 5
+ raw: |
+ wg-quick down {{ wireguard_domain_controller }}
+ sleep {{ 10 | random(start=1) }}
+ wg-quick up {{ wireguard_domain_controller }}
when: ansible_distribution == "OpenBSD"
+ register: result
+
+- name: show wireguard output
+ debug:
+ var: result
remember that computers suck.