add reload module on update config file
This commit is contained in:
parent
785b2ba8a4
commit
531429241b
|
@ -126,6 +126,17 @@
|
||||||
notify:
|
notify:
|
||||||
- restart wireguard
|
- 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
|
- name: Start and enable WireGuard service
|
||||||
service:
|
service:
|
||||||
name: "wg-quick@{{ wireguard_interface }}"
|
name: "wg-quick@{{ wireguard_interface }}"
|
||||||
|
|
Reference in New Issue