ci(ansible): install required collections before syntax check and deployment
OpenVPN Ansible / Ansible Syntax Check (push) Successful in 5s
OpenVPN Ansible / Ansible Lint (push) Successful in 13s
OpenVPN Ansible / Deploy OpenVPN (push) Failing after 1m28s
OpenVPN Ansible / Generate SBOM (push) Skipped
OpenVPN Ansible / Scan SBOM with Trivy (push) Skipped

This commit is contained in:
2026-10-27 21:30:18 +01:00
parent 22394db088
commit 82d44662b4
+3
View File
@@ -15,12 +15,14 @@ include:
ansible-lint: ansible-lint:
stage: validate stage: validate
script: script:
- export ANSIBLE_CONFIG=$CI_PROJECT_DIR/ansible.cfg
- ansible-lint - ansible-lint
syntax-check: syntax-check:
stage: validate stage: validate
script: script:
- export ANSIBLE_CONFIG=$CI_PROJECT_DIR/ansible.cfg - export ANSIBLE_CONFIG=$CI_PROJECT_DIR/ansible.cfg
- ansible-galaxy collection install -r requirements.yml
- ansible-playbook --syntax-check playbooks/openvpn.yml - ansible-playbook --syntax-check playbooks/openvpn.yml
deploy-prod: deploy-prod:
@@ -43,6 +45,7 @@ deploy-prod:
printf '%s\n' "$VPN_ADMIN_PRIVATE_KEY" > ~/.ssh/id_ed25519 printf '%s\n' "$VPN_ADMIN_PRIVATE_KEY" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519 chmod 600 ~/.ssh/id_ed25519
export ANSIBLE_CONFIG="$CI_PROJECT_DIR/ansible.cfg" export ANSIBLE_CONFIG="$CI_PROJECT_DIR/ansible.cfg"
ansible-galaxy collection install -r requirements.yml
ansible-playbook playbooks/openvpn.yml ansible-playbook playbooks/openvpn.yml
when: manual when: manual