-
Notifications
You must be signed in to change notification settings - Fork 739
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 errors produced by ansible-lint #159
Conversation
zbrojny120
commented
Jan 5, 2018
- Removed trailing whitespace
- Fixed bare variable in tasks/yum.yml
- Handler for update-initramfs
There's something wrong with the syntax:
|
Already fixed |
tasks/yum.yml
Outdated
with_flattened: | ||
- '/etc/yum.conf' | ||
- '{{ yum_repos.stdout_lines| default([]) }}' | ||
with_flattened: "{{ ['/etc/yum.conf', yum_repos.stdout_lines | default([]) ] }}" |
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.
I don't know about this one...
What's the advantage here? Right now, all it does for me is make it harder to parse..
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.
It removes ansible-lint errors related to bare variables. Do you have any other ideas how to fix this error?
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.
It can be "fixed" like this:
- ['/etc/yum.conf']
- '{{ yum_repos.stdout_lines| default([]) }}'
However I'm not sure if this is not maybe a bug with ansible-lint. I'll ask there.
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.
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.
Ok, we will see how it goes, because I was also surprised by this error, and consider this a dirty fix.
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.
To go on with this PR: How about you keep the task the way it is in master and add a skip_ansible_lint
tag to it? And add a comment to reference the ansible/ansible-lint#315 issue?
Thanks, @zbrojny120 ! |
Fix errors produced by ansible-lint