-
Notifications
You must be signed in to change notification settings - Fork 230
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
Fix ansible-lint on tests #1046
Conversation
a361d59
to
7339f8d
Compare
tests/user/users.json
Outdated
@@ -0,0 +1,3504 @@ | |||
{ |
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 created within the test. What about having only "{}" as content?
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.
But the pre-generated file will stop create_users_json.yml
from creating the proper file with valid expiration dates.
Should the file still be missing instead?
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 a mistake on my side. This file should not make into the patch.
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.
Fixed now. I removed the file.
It would be good to have the pre-commit changes in a separate PR. They are not really related to ansible-lint. |
ansible-lint is issuing an warning when using '# noqa 505' instead of '#noqa missing-import' on playbooks. This patch changes all occurrences of the tag to use the newer format.
In latest ansible-lint versions, the use of "blocks" has a required order to be implemented. According to ansible-lint error mesage, the order is name, when, block, rescue, always. As not following this rule is now an error, this patch fixes all tests for the 'key-order[task]' error.
A dangling 'when:' clause was failing anisble-lint tests as the task did not match any valid schema. The dangling clause was removed, and the usage of 'shell' was changed from free form to use the 'cmd' parameter.
7339f8d
to
16ce5f2
Compare
pre-commit commit moved to #1049. |
LGTM |
Recent PR checks are failing due to
ansible-lint
being more strict and complaining about errors it didn't before.With this PR, the errors are fixed and pre-commit is updated to match the upstream tool versions, so verification can be done, also, on commit time, before opening a PR.