diff options
Diffstat (limited to 'roles/wireguard/tasks/service.yml')
-rw-r--r-- | roles/wireguard/tasks/service.yml | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/roles/wireguard/tasks/service.yml b/roles/wireguard/tasks/service.yml index 37f3cec..c9e7f60 100644 --- a/roles/wireguard/tasks/service.yml +++ b/roles/wireguard/tasks/service.yml @@ -1,16 +1,15 @@ - name: enable wireguard interface for OpenBSD - lineinfile: + ansible.builtin.lineinfile: path: /etc/rc.local regexp: "^/usr/local/bin/wg-quick up {{ wireguard_domain_controller }}$" line: "/usr/local/bin/wg-quick up {{ wireguard_domain_controller }}" owner: 0 - owner: 0 create: true mode: 0644 when: ansible_distribution == "OpenBSD" - name: restart wireguard interface - raw: | + ansible.builtin.raw: | wg-quick down {{ wireguard_domain_controller }} sleep {{ 10 | random(start=1) }} wg-quick up {{ wireguard_domain_controller }} @@ -18,5 +17,5 @@ register: result - name: show wireguard output - debug: + ansible.builtin.debug: var: result |