Ansible. Fast way to check syntax?

This is expected behaviour according to the documentation:

When ansible-playbook is executed with --check it will not make any changes on remote systems. Instead, any module instrumented to support ‘check mode’ (which contains most of the primary core modules, but it is not required that all modules do this) will report what changes they would have made rather than making them. Other modules that do not support check mode will also take no action, but just will not report what changes they might have made.

Old link (does not work anymore): http://docs.ansible.com/ansible/playbooks_checkmode.html

New link: https://docs.ansible.com/ansible/latest/user_guide/playbooks_checkmode.html#using-check-mode

If you would like to check the YAML syntax you can use syntax-check.

ansible-playbook rds_prod.yml  --syntax-check
playbook: rds_prod.yml

I was looking for the same, but was not satisfied by the --syntax-check option, since it does not work its way down to the roles. A more complete check can be performed with ansible-lint which also includes style-checks. But if you turn off all style-checks, then you have a pretty complete syntax-check.

So do something like

ansible-lint -x $(echo $(ansible-lint -L | awk -F':' '{print $1}' | grep '^[^ ]') | tr ' ' ',') my_playbook.yml