Skip to content

Commit

Permalink
ci: Use supported ansible-lint action; run ansible-lint against the c…
Browse files Browse the repository at this point in the history
…ollection

The old ansible-community ansible-lint is deprecated.  There is a
new ansible-lint github action.

The latest Ansible repo gating tests run ansible-lint against
the collection format instead of against individual roles.
We have to convert the role to collection format before running
ansible-test.

Role developers can run this locally using
`tox -e collection,ansible-lint-collection`
See linux-system-roles/tox-lsr#125

Add `---` doc start to .markdownlint.yaml

Signed-off-by: Rich Megginson <[email protected]>
  • Loading branch information
richm committed Dec 13, 2023
1 parent dd0f1e4 commit 743e41c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ansible-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ jobs:
cp "$file" "$ignore_dir/${file//*.sanity-ansible-}"
fi
done
# ansible-lint action requires a .git directory???
# https://github.com/ansible/ansible-lint/blob/main/action.yml#L45
mkdir -p "$coll_dir/.git"
- name: Run ansible-lint
uses: ansible/ansible-lint@v6
Expand Down

0 comments on commit 743e41c

Please sign in to comment.