I would like to add an automatic syntax check (as CI process) for all the Ansible playbooks in my project, using ansible-lint
.
There are playbooks in several directories in the project, so I thought of using something like locate *.yml
. However, the problem is that there are some other YAML files in my project, which are not Ansible playbooks, and therefore I would not want ansible-lint
to test those files(as it will always fail).
Is there any way to distinguish between ansible playbooks and regular YAML files?