Restart WireGuard on configuration update

This commit is contained in:
Kris Lamoureux 2021-05-07 02:38:49 -04:00
parent e3a89aecc2
commit 96e7a0f8d2
Signed by: kris
GPG Key ID: 3EDA9C3441EDA925
2 changed files with 8 additions and 0 deletions

View File

@ -4,3 +4,9 @@
connect_timeout: 5
listen: reboot_host
when: allow_reboot
- name: Restart WireGuard
service:
name: wg-quick@wg0
state: restarted
listen: restart_wireguard

View File

@ -41,6 +41,8 @@
template:
src: wireguard.j2
dest: /etc/wireguard/wg0.conf
notify:
- restart_wireguard
- name: Start WireGuard interface
service: