From b37a816b3ea89072d6ccc6af66fdd72c129da64a Mon Sep 17 00:00:00 2001 From: Nik Afiq Date: Wed, 26 Aug 2026 20:45:09 +0900 Subject: [PATCH] fix: route home LAN through mac WireGuard client, fix broken bool conditionals AllowedIPs for the mac road-warrior peer was missing 10.10.40.0/24, so DNS (10.10.40.53) and other home-LAN hosts were unreachable over the tunnel. Also fixes the same string-vs-bool `when:` failure already patched in e757850 (recent ansible-core rejects a `-e ...=true` CLI string in a boolean conditional) for the client-config display tasks. Co-Authored-By: Claude Sonnet 5 --- ansible/roles/wireguard/tasks/main.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ansible/roles/wireguard/tasks/main.yaml b/ansible/roles/wireguard/tasks/main.yaml index 92e41e5..7abf770 100644 --- a/ansible/roles/wireguard/tasks/main.yaml +++ b/ansible/roles/wireguard/tasks/main.yaml @@ -163,27 +163,27 @@ [Peer] PublicKey = {{ server_public_key.stdout }} Endpoint = {{ wireguard_endpoint }}:51820 - AllowedIPs = 192.168.7.0/24, 10.10.0.0/24 + AllowedIPs = 192.168.7.0/24, 10.10.40.0/24, 10.10.0.0/24 PersistentKeepalive = 25 - name: Display mac client config ansible.builtin.shell: cat /etc/wireguard/mac-client.conf register: mac_conf changed_when: false - when: wireguard_show_client_configs | default(false) + when: wireguard_show_client_configs | default(false) | bool - name: Show mac client config ansible.builtin.debug: msg: "{{ mac_conf.stdout_lines }}" - when: wireguard_show_client_configs | default(false) + when: wireguard_show_client_configs | default(false) | bool - name: Generate QR code for phone ansible.builtin.shell: qrencode -t ansiutf8 < /etc/wireguard/phone-client.conf register: phone_qr changed_when: false - when: wireguard_show_client_configs | default(false) + when: wireguard_show_client_configs | default(false) | bool - name: Display phone QR code ansible.builtin.debug: msg: "{{ phone_qr.stdout_lines }}" - when: wireguard_show_client_configs | default(false) + when: wireguard_show_client_configs | default(false) | bool