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.
18 lines
412 B
YAML
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
|