Hi@akhtar,
Ansible has lots of commands, that help to work with ansible very easily. After creating a playbook you can check the syntax before you deploy the code in the production. You can use the below command.
$ ansible-playbook play.yml --syntax-check