add restart of vpn when changes

This commit is contained in:
Antonio J. Delgado 2023-07-12 08:56:01 +03:00
parent 13607e8b84
commit f6c48db73f

View file

@ -39,6 +39,8 @@
port: "{{ vpnes_port }}"
comment: 'Wireguard client listener'
proto: udp
notify:
- Restart Wireguard service
- name: Show public key reminder
debug:
@ -90,6 +92,8 @@
rule: allow
from: "{{ pub_ip.json.ip }}"
delegate_to: "{{ groups['wireguard_server'][0] }}"
notify:
- Restart Wireguard service
- name: Ping VPN server for monitoring
shell: "ping -c 3 -4 {{ server_address }}"