This might be in the docs, but I cannot find it. I have the following files:
first-playbook.yml
second-playbook.yml
common-tasks.yml
common-tasks.yml is a list of tasks that is used in first-playbook.yml and second-playbook.yml through include_tasks common-tasks.yml
I’d like to syntax check everything before deploying. For playbooks I can do:
ansible-playbook --syntax-check first-playbook.yml
However, it is not possible for common tasks because it is a list of tasks
https://github.com/ansible/ansible/issues/16778
Another option would be that tasks got validated when including them, but that is not the case:
https://github.com/ansible/ansible/issues/15709
Is there a flag/ansible command that I can use to syntax check a list of tasks?
Ansible version
ansible 2.6.4