refactor(vpn): split JWT identity and OpenVPN certificate lifecycle
OpenVPN Ansible / Ansible Syntax Check (push) Successful in 43s
OpenVPN Ansible / Ansible Lint (push) Successful in 1m8s
OpenVPN Ansible / Deploy VPN Networking and OpenVPN (push) Successful in 3m32s
OpenVPN Ansible / Generate SBOM (push) Successful in 55s
OpenVPN Ansible / Scan SBOM with Trivy (push) Successful in 18s
OpenVPN Ansible / Ansible Syntax Check (push) Successful in 43s
OpenVPN Ansible / Ansible Lint (push) Successful in 1m8s
OpenVPN Ansible / Deploy VPN Networking and OpenVPN (push) Successful in 3m32s
OpenVPN Ansible / Generate SBOM (push) Successful in 55s
OpenVPN Ansible / Scan SBOM with Trivy (push) Successful in 18s
- Add a dedicated role and workflow to generate VPN JWT identities and export public keys - Run identity preparation automatically for VPN nodes awaiting OpenBao registration - Gate OpenVPN and PKI setup until each node is registered - Split PKI setup into runtime, configuration, service, and initial certificate tasks - Restore TAP and bridge attachment after OpenVPN restarts - Remove bundled server certificate and private key
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
---
|
||||
- name: Check whether the OpenVPN server certificate exists
|
||||
ansible.builtin.stat:
|
||||
path: "{{ openvpn_pki_certificate_dir }}/server.crt"
|
||||
register: openvpn_pki_server_certificate
|
||||
|
||||
|
||||
- name: Issue the initial OpenVPN server certificate
|
||||
ansible.builtin.command:
|
||||
argv:
|
||||
- /usr/bin/flock
|
||||
- -n
|
||||
- /run/lock/openbao-vpn-cert.lock
|
||||
- "{{ openvpn_pki_script_directory }}/openbao-vpn-cert.sh"
|
||||
- "{{ openvpn_pki_config_path }}"
|
||||
- --skip-openvpn-restart
|
||||
when: not openvpn_pki_server_certificate.stat.exists
|
||||
register: openvpn_pki_initial_certificate
|
||||
changed_when: "'CERTIFICATE_INSTALLED' in openvpn_pki_initial_certificate.stdout"
|
||||
no_log: true
|
||||
notify: Restart openvpn
|
||||
Reference in New Issue
Block a user