-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: Use supported ansible-lint action; run ansible-lint against the collection #210
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #210 +/- ##
=========================================
+ Coverage 0 32.95% +32.95%
=========================================
Files 0 3 +3
Lines 0 613 +613
Branches 0 128 +128
=========================================
+ Hits 0 202 +202
- Misses 0 411 +411
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
6428702
to
ae584b5
Compare
[citest] |
ae584b5
to
1efee22
Compare
[citest] |
centos 7 and 9 failures are baseos ci issues - the tests pass on those platforms locally |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is similar to what we did to ansible-freeipa a while ago.
LGTM.
…ollection The old ansible-community ansible-lint is deprecated. There is a new ansible-lint github action. The new ansible-lint has several checks related to ansible-test and the ignore files. Many of our ignore settings are not allowed any more and are required to be fixed or addressed in the Ansible preferred way. The python imports have to be wrapped in a try/except ImportError, and where possible, an error must be returned from the module explaining what was not able to be imported. The result of this is that the .sanity files can be reduced to the bare minimum which will greatly reduce the maintenance burden of those files, make it easier to support newer versions of Ansible, and make it easier to import the system roles collection into Galaxy and Automation Hub. `distutils.version` is deprecated, and it is a hard error in python 3.12 Instead, use `packaging.version` - unfortunately, this means having to add a dependency on `python3-packaging` on platforms that support it - notably, there is no python-packaging available on EL7, so fall back to using `distutils.version` there. 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]>
1efee22
to
ee5e5b7
Compare
run_after: | ||
description: | ||
- Command that should run after saving the certificate. | ||
required: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you removing required: false
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default is required: false
- better style to omit required
unless required: true
The old ansible-community ansible-lint is deprecated. There is a
new ansible-lint github action. The new ansible-lint has several checks
related to ansible-test and the ignore files. Many of our ignore settings
are not allowed any more and are required to be fixed or addressed in the
Ansible preferred way.
The python imports have to be wrapped in a try/except ImportError, and
where possible, an error must be returned from the module explaining
what was not able to be imported.
The result of this is that the .sanity files can be reduced to the
bare minimum which will greatly reduce the maintenance burden of
those files, make it easier to support newer versions of Ansible,
and make it easier to import the system roles collection into Galaxy
and Automation Hub.
distutils.version
is deprecated, and it is a hard error in python 3.12Instead, use
packaging.version
- unfortunately, this means having toadd a dependency on
python3-packaging
on platforms that support it -notably, there is no python-packaging available on EL7, so fall back
to using
distutils.version
there.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.yamlSigned-off-by: Rich Megginson [email protected]