add handler to reload existing wireguard interface
When new peers are added to the network, existing connections should not be taken offline but interfaces should instead be edited in-flight. This Commit adds and uses a handler that starts wireguard if not running and afterwards reloads the peers from the configuration file without taking down the wireguard interface.
This commit is contained in:
parent
e59c8bd027
commit
4d52b0c4b3
|
@ -3,3 +3,5 @@
|
|||
service:
|
||||
name: "wg-quick@{{ wireguard_interface }}"
|
||||
state: restarted
|
||||
- name: start/reload wireguard
|
||||
command: "bash -c 'systemctl start wg-quick@{{ wireguard_interface }}; wg syncconf {{ wireguard_interface}} <(wg-quick strip /etc/wireguard/{{ wireguard_interface }}.conf)'"
|
||||
|
|
|
@ -99,7 +99,7 @@
|
|||
tags:
|
||||
- wg-config
|
||||
notify:
|
||||
- restart wireguard
|
||||
- start/reload wireguard
|
||||
|
||||
- name: Check if reload-module-on-update is set
|
||||
stat:
|
||||
|
|
Reference in New Issue