Add ansible-lint to CI#6927
Conversation
Pin to 5.4.0, the last 5.x release, which supports ansible-core 2.11 (required by ansible~=4.10).
Found with simple `ansible-lint` run with no special configuration. Syntax error in 65cf535
AmitPhulera
left a comment
There was a problem hiding this comment.
I'm considering making this check a required pass on Github Actions before a PR can be merged. Any objections?
No objections from my end.
|
|
||
| [dependency-groups] | ||
| test = [ | ||
| "ansible-lint==5.4.0", |
There was a problem hiding this comment.
Is pinning required because we are on a outdated ansible version?
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v5 |
There was a problem hiding this comment.
nit: v7 is the latest version.
| - uses: actions/checkout@v5 | |
| - uses: actions/checkout@v7 |
There was a problem hiding this comment.
Thanks. I'll fix that as well as the one in tests.yml in a follow-up PR.
gherceg
left a comment
There was a problem hiding this comment.
Also no objections to blocking merges. I was going to leave comments about f-strings but given it seems src/commcare_cloud/ansible_lint.py will be short-lived anyway, it's fine. I also don't know how strongly people feel about f-strings. Other comments are also non-blocking.
Introduces
ansible-lintto commcare-cloud so playbook and role regressions are caught automatically in CI, without forcing a cleanup of the large existing backlog of lint findings. Follow-up PR(s) will fix pre-existing lint errors to pare down.ansible-lint-ignore.Also folds the
testdependency group intodevso a single sync gives developers everything.I'm considering making this check a required pass on Github Actions before a PR can be merged. Any objections?
🐡 Review by commit.
https://dimagi.atlassian.net/browse/SAAS-19958
Environments Affected
None