Files
ansible-playbooks/roles/wireguard/handlers/main.yml
T
Clément Désiles 8a3c323059 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.
2026-08-27 10:14:23 +02:00

18 lines
412 B
YAML

---
- name: Reload systemd
ansible.builtin.systemd:
daemon_reload: true
- 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