From b22bf1ccb758a027e1fab2fb77eec8a6f6401565 Mon Sep 17 00:00:00 2001 From: kCn3333 Date: Fri, 15 May 2026 15:00:28 +0200 Subject: [PATCH] fix(ci): add static CI inventory and install ansible collections in workflow - Add ci_hosts static inventory to bypass dynamic AWS inventory during lint - Install amazon.aws and community.general collections on runner - Install boto3 and botocore Python dependencies --- .github/workflows/ansible.yaml | 11 ++++++++--- ansible/inventory/ci_hosts | 2 ++ 2 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 ansible/inventory/ci_hosts diff --git a/.github/workflows/ansible.yaml b/.github/workflows/ansible.yaml index d19ad17..a528384 100644 --- a/.github/workflows/ansible.yaml +++ b/.github/workflows/ansible.yaml @@ -24,9 +24,14 @@ jobs: with: python-version: "3.12" - - name: Install ansible-lint - run: pip install ansible-lint + - name: Install dependencies + run: pip install ansible-lint boto3 botocore + + - name: Install Ansible collections + run: ansible-galaxy collection install amazon.aws community.general - name: Run ansible-lint run: ansible-lint playbooks/site.yaml - working-directory: ansible \ No newline at end of file + working-directory: ansible + env: + ANSIBLE_INVENTORY: inventory/ci_hosts # static inventory for CI \ No newline at end of file diff --git a/ansible/inventory/ci_hosts b/ansible/inventory/ci_hosts new file mode 100644 index 0000000..7ae02ae --- /dev/null +++ b/ansible/inventory/ci_hosts @@ -0,0 +1,2 @@ +[all] +localhost ansible_connection=local \ No newline at end of file