fix(ansible): apply private VPN routes before verification
OpenVPN Ansible / Ansible Syntax Check (push) Successful in 11s
OpenVPN Ansible / Ansible Lint (push) Successful in 17s
OpenVPN Ansible / Deploy VPN Networking and OpenVPN (push) Failing after 1m25s
OpenVPN Ansible / Generate SBOM (push) Skipped
OpenVPN Ansible / Scan SBOM with Trivy (push) Skipped

This commit is contained in:
2026-10-29 10:05:38 +01:00
parent 853e852753
commit 86c47eec4f
2 changed files with 11 additions and 12 deletions
-10
View File
@@ -1,10 +0,0 @@
---
- name: Apply private VPN route
ansible.builtin.command: netplan apply
changed_when: false
when: private_routing_netplan_files.matched | default(0) > 0
- name: Reload systemd-networkd routes
ansible.builtin.systemd:
name: systemd-networkd
state: restarted
when: private_routing_netplan_files.matched | default(0) == 0
+11 -2
View File
@@ -40,7 +40,11 @@
mode: "0600" mode: "0600"
validate: python3 -c "import yaml,sys; yaml.safe_load(open(sys.argv[1]))" %s validate: python3 -c "import yaml,sys; yaml.safe_load(open(sys.argv[1]))" %s
when: private_routing_netplan_files.matched | default(0) > 0 when: private_routing_netplan_files.matched | default(0) > 0
notify: Apply private VPN route
- name: Apply Netplan route configuration
ansible.builtin.command: netplan apply
changed_when: false
when: private_routing_netplan_files.matched | default(0) > 0
- name: Install systemd-networkd route drop-in - name: Install systemd-networkd route drop-in
ansible.builtin.copy: ansible.builtin.copy:
@@ -57,7 +61,12 @@
group: root group: root
mode: "0644" mode: "0644"
when: private_routing_netplan_files.matched | default(0) == 0 when: private_routing_netplan_files.matched | default(0) == 0
notify: Apply private VPN route
- name: Apply systemd-networkd route configuration
ansible.builtin.systemd:
name: systemd-networkd
state: restarted
when: private_routing_netplan_files.matched | default(0) == 0
- name: Verify selected route to internet - name: Verify selected route to internet
ansible.builtin.command: ip -4 route get 8.8.8.8 ansible.builtin.command: ip -4 route get 8.8.8.8