From 531429241b8dbe2ddb5969392a2e47805c8efc06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Bourqui?= Date: Fri, 18 Oct 2019 18:43:07 +0200 Subject: [PATCH] add reload module on update config file --- tasks/main.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tasks/main.yml b/tasks/main.yml index c745c09..d8da7a2 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -125,7 +125,18 @@ - wg-config notify: - restart wireguard - + +- name: check if reload-module-on-update file exists + stat: + path: "{{ wireguard_remote_directory }}/.reload-module-on-update" + register: reload_module_on_update + +- name: WireGuard reload-module-on-update + file: + dest: "{{ wireguard_remote_directory }}/.reload-module-on-update" + state: touch + when: not reload_module_on_update.stat.exists + - name: Start and enable WireGuard service service: name: "wg-quick@{{ wireguard_interface }}"