fix(wireguard): reload tunnel via syncconf on config change

Config template changes were never applied to the running interface,
leaving a stale peer list after redeploy. Notify a syncconf reload so
peer edits apply without dropping active connections.
This commit is contained in:
Clément Désiles
2026-08-27 10:14:23 +02:00
parent 842374616b
commit 8a3c323059
2 changed files with 10 additions and 0 deletions
+9
View File
@@ -6,3 +6,12 @@
- name: Apply sysctl
ansible.builtin.command: sysctl --system
changed_when: true
- name: Reload wireguard tunnel
ansible.builtin.shell: |
set -o pipefail
wg-quick strip "{{ item.interface }}" | wg syncconf "{{ item.interface }}"
args:
executable: /bin/bash
loop: "{{ wireguard_tunnels }}"
changed_when: true