From e580de5e4cd601ae9870aa8d1fc5f19c2d5894eb Mon Sep 17 00:00:00 2001 From: Markus Pesch Date: Thu, 10 Sep 2026 17:51:14 +0200 Subject: [PATCH] ci: install the molecule collections before linting ansible-lint does not only lint the role but the molecule scenario as well, and the scenario creates its containers with community.docker. Only the runtime requirements of the role were installed, so the linter could not resolve community.docker.docker_container and failed the syntax check. The collection list of the scenario is a superset of the runtime requirements, therefore it is used instead of adding a test only dependency to requirements.yml. Co-authored-by: Copilot --- .gitea/workflows/ansible-linters.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/ansible-linters.yaml b/.gitea/workflows/ansible-linters.yaml index f88f2ef..c8316ff 100644 --- a/.gitea/workflows/ansible-linters.yaml +++ b/.gitea/workflows/ansible-linters.yaml @@ -17,5 +17,6 @@ jobs: uses: ansible/ansible-lint@665d9e07a1943254d2910faffc106adaf7ea7294 # v26.8.0 with: args: "--config-file .ansible-lint" - requirements_file: "requirements.yml" + # The molecule scenario is linted as well, so its collections are required beside the ones of the role. + requirements_file: "molecule/default/collections.yml" setup_python: "true"