Skip to content

Commit 577c104

Browse files
dguidoclaude
andcommitted
Address review feedback: explicit directory modes and clearer docs
- Add explicit mode to WireGuard directory creation in main.yml: - PKI directories (preshared, private, public): 0700 - Config directories (apple/ios, apple/macos): 0755 - Enhance config.cfg keys_clean_all comment to clarify: - When false: new users added (not just preserved) - When true: ALL CLIENTS MUST RECONFIGURE (explicit impact warning) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent ebd9b5f commit 577c104

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

config.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ dns_servers:
8989
pki_in_tmpfs: true
9090

9191
# Regenerate ALL user credentials on update-users (not just new users)
92-
# When false: existing WireGuard keys and IPsec certs are preserved
93-
# When true: all credentials are deleted and regenerated for all users
92+
# When false: existing WireGuard keys and IPsec certs are preserved, new users added
93+
# When true: all credentials deleted and regenerated - ALL CLIENTS MUST RECONFIGURE
9494
keys_clean_all: false
9595

9696
### VPN Network Configuration ###

roles/wireguard/tasks/main.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
---
22
- name: Ensure the required directories exist
33
file:
4-
dest: "{{ item }}"
4+
dest: "{{ item.path }}"
55
state: directory
66
recurse: true
7+
mode: "{{ item.mode }}"
78
with_items:
8-
- "{{ wireguard_pki_path }}/preshared"
9-
- "{{ wireguard_pki_path }}/private"
10-
- "{{ wireguard_pki_path }}/public"
11-
- "{{ wireguard_config_path }}/apple/ios"
12-
- "{{ wireguard_config_path }}/apple/macos"
9+
- { path: "{{ wireguard_pki_path }}/preshared", mode: "0700" }
10+
- { path: "{{ wireguard_pki_path }}/private", mode: "0700" }
11+
- { path: "{{ wireguard_pki_path }}/public", mode: "0700" }
12+
- { path: "{{ wireguard_config_path }}/apple/ios", mode: "0755" }
13+
- { path: "{{ wireguard_config_path }}/apple/macos", mode: "0755" }
1314
delegate_to: localhost
1415
become: false
1516

0 commit comments

Comments
 (0)