3
0
Fork 0

add reload module on update config file

This commit is contained in:
Frédéric Bourqui 2019-10-18 18:43:07 +02:00
parent 785b2ba8a4
commit 531429241b
1 changed files with 12 additions and 1 deletions

View File

@ -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 }}"