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
Enable ansible-lint to auto-detect roles/playbooks #615
Conversation
@webknjaz Please have another look on it, I hope I addressed all concerns. If you want to see the output of calling it on multiple repositories, look at https://sbarnea.com/tmp/result.html -- i kinda scripted its execution in order to get an idea about what to expect in real-life once the code goes in. |
This pull request introduces 1 alert when merging 212a85e into 5453d07 - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging ace361e into cad1804 - view on LGTM.com new alerts:
|
When called without any arguments, ansible-lint will now try to look for all playbooks and roles inside current git repository. Unrecognized YAML files will be displayed in verbose mode but will not be considered errors. This will allow users to enable ansible-lint on any repository without being forced to alter the way is called or its configuration each time a new playbooks/role is added. Fixes: #613 Fixes: #564 Signed-off-by: Sorin Sbarnea <ssbarnea@redhat.com>
Anything else preventing this to be merged? |
options = {} | ||
|
||
# git is preferred as it also considers .gitignore | ||
files = OrderedDict.fromkeys(sorted(subprocess.check_output( |
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.
@ssbarnea why did you use OrderedDict
and not a list here?
When called without any arguments, ansible-lint will now try to look
for all playbooks and roles inside current git repository.
Unrecognized YAML files will be displayed in verbose mode but will not
be considered errors. This will allow users to enable ansible-lint
on any repository without being forced to alter the way is called or
its configuration each time a new playbooks/role is added.
Fixes: #613
Fixes: #564