Replies: 6 comments
-
This file isn't recognized as a playbook:
Default patterns (from https://github.com/ansible/ansible-lint/blob/v6.9.0/src/ansiblelint/config.py#L43) are: {"playbook": "**/playbooks/*.{yml,yaml}"},
{"playbook": "**/*playbook*.{yml,yaml}"},
...
{"playbook": "**/molecule/*/*.{yaml,yml}"}, # molecule playbooks You can override it using |
Beta Was this translation helpful? Give feedback.
-
Thanks for your answer! I added this to my .ansible-lint : kinds:
- playbook: ping.yml This did not change the behaviour at all. But even if this would work: Why does it make a difference if the file is given as a positional argument or not? Yours |
Beta Was this translation helpful? Give feedback.
-
In my project, where all Ansible files are in "ansible" subdirectory, I'm using:
|
Beta Was this translation helpful? Give feedback.
-
Thanks again. I am not exactly sure why, but That helps us to workaround that issue. Thank you! Edit: I have to correct myself. |
Beta Was this translation helpful? Give feedback.
-
@ssbarnea Why was the issue closed and converted to a discussion? There seems to be a bug and we have right now is an unreliable workaround. |
Beta Was this translation helpful? Give feedback.
-
@ssbarnea Same question as above: Why was the issue closed and converted to a discussion? There seems to be a bug and we have right now is an unreliable workaround. |
Beta Was this translation helpful? Give feedback.
-
Summary
ansible-lint has an optional positional argument to name a file or path to check. It seems, that only providing explizit files works as expected.
Issue Type
Ansible and Ansible Lint details
OS / ENVIRONMENT
STEPS TO REPRODUCE
ping.yml:
(ping.yml is the only file in the folder.)
Desired Behavior
All three should report the same on ping.yml
Actual Behavior
Beta Was this translation helpful? Give feedback.
All reactions