-
Notifications
You must be signed in to change notification settings - Fork 656
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
warning about duplicate dict key with 6.16.2 #3492
Comments
Same here @ssbarnea Let me know if you need additional info: Mac OS Ventura ansible-lint/lib/python3.11/site-packages/ansible/parsing/yaml/constructor.py:76 AnsibleWarning While constructing a mapping from <unicode string>, line 256, column 5, found a duplicate dict key (password). Using last defined value only.
I noticed that it seems to be ignoring my ignore list, back to back runs on the same project from With Passed with production profile: 0 failure(s), 0 warning(s) on 111 files. With Passed with production profile: 0 failure(s), 0 warning(s) on 2836 files. |
@netopsengineer the issue with excluded directories being scanned is known and a fix is on the way |
Thanks for the heads up on the excluded directories @MallocArray will keep an eye on the issue here on the duplicate keys, for me atleast my project previously passed with |
Summary
When using 6.16.2 in an Ubuntu pipeline agent or a Stream9 container, when scanning my entire repo, I get pages full of errors similar this:
When it finishes, it is showing 0 failures and 0 warnings, when I know there are issues in the repo. If I give it a single subfolder, it works as expected and I do not see these Warnings.
Trying to find a minimal use-case, I have a folder with some playbooks in it and then another subfolder off the root
collections/ansible_collections/ansible/windows
which contains the 1.14.0 version of this collection.
Running ansible-lint against the entire directory yields the errors, removing this windows folder does not log the errors.
I do have this folder in my exclude_paths parameters of .ansible-lint which I understand is not working properly in this version and is scanning the folder, but I would not have expected these issues when it does scan this collection folder
Issue Type
OS / ENVIRONMENT
STEPS TO REPRODUCE
Git project folder with .ansible-lint in the root excluding
- collections/ansible_collections/ansible
Folder with 4 playbooks inside of it
collections folder with Windows collection at collections/ansible_collections/ansible
Desired Behavior
No warnings about parsing yaml files outside of this project folder, and only valid issues from the playbook folder are shown
Possible security bugs should be reported via email to
[email protected]
Actual Behavior
In this minimal case where I've deleted nearly ever folder I see the duplicate dict key messages but it still shows valid issues in the remaining playbooks. When running against a full repository with multiple folder, playbooks, and collections, I get more of the duplicate dict key messages, but no issues are shown, as if all errors are addressed which is not accurate.
Please give some details of what is happening.
Include a minimum complete verifiable example with:
ansible-playbook --syntax-check playbook
The text was updated successfully, but these errors were encountered: