summaryrefslogtreecommitdiffstats
path: root/host_vars
diff options
context:
space:
mode:
authorAhmed Abdelhalim <[email protected]>2025-11-13 21:27:01 +0100
committerAhmed Abdelhalim <[email protected]>2025-11-13 22:33:47 +0100
commit16b43088143541b91bfb05e64d2dee07189aeb0f (patch)
tree543763718010aa433346f0ead57602a70a88c813 /host_vars
parent004c7ecbbf8768955e964ef4323566079b22603d (diff)
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
Diffstat (limited to 'host_vars')
-rw-r--r--host_vars/rpi5.local.yml.example6
1 files changed, 4 insertions, 2 deletions
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