From da8978e85148439051189be0e82a2d68148fb394 Mon Sep 17 00:00:00 2001 From: Rich Megginson Date: Thu, 30 Jan 2025 13:27:09 -0700 Subject: [PATCH] ci: bump ansible-lint to v25; provide collection requirements for ansible-lint There is a new version of ansible-lint - v25. Newer versions of ansible-lint require the collection requirements to be installed so it can find the modules/plugins. Enhance our ansible-lint ci job to provide the collection requirements, including merging the runtime meta/collection-requirements.yml with the testing tests/collection-requirements.yml. This should somewhat mitigate the loss of ansible-plugin-scan. We have to remove mock_modules that are actually present now. Signed-off-by: Rich Megginson --- .github/workflows/ansible-lint.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ansible-lint.yml b/.github/workflows/ansible-lint.yml index 29a661cf..666b2313 100644 --- a/.github/workflows/ansible-lint.yml +++ b/.github/workflows/ansible-lint.yml @@ -40,6 +40,8 @@ jobs: set -euxo pipefail TOXENV=collection lsr_ci_runtox coll_dir=".tox/ansible_collections/$LSR_ROLE2COLL_NAMESPACE/$LSR_ROLE2COLL_NAME" + # cleanup after collection conversion + rm -rf "$coll_dir/.ansible" .tox/ansible-plugin-scan # ansible-lint action requires a .git directory??? # https://github.com/ansible/ansible-lint/blob/main/action.yml#L45 mkdir -p "$coll_dir/.git"