From 82d44662b4d64be6a35b15d93867040c3e97e49f Mon Sep 17 00:00:00 2001 From: "noussair.hamrit" Date: Tue, 27 Oct 2026 21:27:18 +0100 Subject: [PATCH] ci(ansible): install required collections before syntax check and deployment --- .gitlab-ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 051f7c6..9f4c45d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -15,12 +15,14 @@ include: ansible-lint: stage: validate script: + - export ANSIBLE_CONFIG=$CI_PROJECT_DIR/ansible.cfg - ansible-lint syntax-check: stage: validate script: - export ANSIBLE_CONFIG=$CI_PROJECT_DIR/ansible.cfg + - ansible-galaxy collection install -r requirements.yml - ansible-playbook --syntax-check playbooks/openvpn.yml deploy-prod: @@ -43,6 +45,7 @@ deploy-prod: printf '%s\n' "$VPN_ADMIN_PRIVATE_KEY" > ~/.ssh/id_ed25519 chmod 600 ~/.ssh/id_ed25519 export ANSIBLE_CONFIG="$CI_PROJECT_DIR/ansible.cfg" + ansible-galaxy collection install -r requirements.yml ansible-playbook playbooks/openvpn.yml when: manual