Files
CoM-ghost_protocol/phantom/playbooks/vpn
n0mad1k 8ffc92b6db Fix invalid AllowedIPs in WireGuard peer config
Root cause: regex_replace chains to extract subnet base from CIDR
weren't working in Ansible shell blocks, producing 10.66.66.0/24.2/32
instead of 10.66.66.2/32 — invalid CIDR that wg-quick can't parse.

Fix: replace fragile regex with simple string split via set_fact
(_subnet_base = wg_subnet.split('.')[0:3] | join('.')). Use echo
statements for lines needing shell expansion (PrivateKey, peer keys)
and quoted heredoc for static Jinja2-rendered lines (PostUp/PostDown).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 16:49:56 -04:00
..
2026-03-09 15:59:02 -04:00