From 16b43088143541b91bfb05e64d2dee07189aeb0f Mon Sep 17 00:00:00 2001 From: Ahmed Abdelhalim Date: Thu, 13 Nov 2025 21:27:01 +0100 Subject: Add mechanism to clean up wireguard configurations When a wireguard configuration gets removed from the group/host variables, the role now removes them and make sure only the files found in the vars are the ones to be configured on the hosts --- host_vars/rpi5.local.yml.example | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'host_vars') diff --git a/host_vars/rpi5.local.yml.example b/host_vars/rpi5.local.yml.example index 9361aae3..49fcc3ba 100644 --- a/host_vars/rpi5.local.yml.example +++ b/host_vars/rpi5.local.yml.example @@ -17,9 +17,11 @@ pihole_dhcp_hosts: - "ff:ff:ff:ff:ff:fe, 10.0.0.252,TV" - "ff:ff:ff:ff:ff:ff, 10.0.0.253,Printer" -wireguard_autostart_connection: "wg-vpn2" +wireguard_autostart_connection: "vpn2" wireguard_connections: - wg-vpn2: | + # All wireguard config files are prefixed (internally) with wg- + # The following connection/interface will be named wg-vpn2 + vpn2: | [Interface] PrivateKey = your_private_key_here Address = 10.2.0.2/32 -- cgit v1.2.3