ansible-lint icon indicating copy to clipboard operation
ansible-lint copied to clipboard

layout[playbook]: New rule for detection of playbooks outside of a playbooks directory

Open cidrblock opened this issue 3 years ago • 2 comments

We should be able to determine with some degree of confidence that a yaml file is a playbook and warn they should be in a ./playbooks directory.

cidrblock avatar Feb 14 '22 17:02 cidrblock

I just found this feature request while looking at an issue I have with the auto detection mode (see here https://github.com/ansible/ansible-lint/discussions/2166). Isn't there already a playbook detection there:

https://github.com/ansible/ansible-lint/blob/9cc2a955f98852fb1d6c8a3d7e8009df27698915/src/ansiblelint/utils.py#L776

gone-for-coding avatar Jun 09 '22 12:06 gone-for-coding

https://gist.github.com/cidrblock/87a874b2ac34d894dc56e8451d577eaa

This is related, although I don't think lint can fix it... :)

cidrblock avatar Jul 20 '22 12:07 cidrblock