add reload module on update config file
This commit is contained in:
parent
785b2ba8a4
commit
531429241b
|
@ -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 }}"
|
||||
|
|
Reference in a new issue