Skip to content

Commit

Permalink
ci: bump ansible-lint to v25; provide collection requirements for ans…
Browse files Browse the repository at this point in the history
…ible-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 <[email protected]>
  • Loading branch information
richm committed Jan 30, 2025
1 parent dc057df commit 222b986
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 0 additions & 2 deletions .ansible-lint
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ exclude_paths:
- .github/
- .markdownlint.yaml
- examples/roles/
mock_modules:
- community.general.ini_file
mock_roles:
- linux-system-roles.tlog
supported_ansible_also:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ansible-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 222b986

Please sign in to comment.