# How do you validate the Yaml file before Ansible it?

**URL:** <https://forum.ansible.com/t/how-do-you-validate-the-yaml-file-before-ansible-it/12364>\
**Category:** Ansible Project\
**Tags:** ansible-project\
**Created:** [February 15, 2013, 7:59pm UTC](https://forum.ansible.com/t/how-do-you-validate-the-yaml-file-before-ansible-it/12364 "2013-02-15T19:59:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brian\_Coca1](https://avatars.discourse-cdn.com/v4/letter/b/278dde/32.png) [@Brian\_Coca1](https://forum.ansible.com/u/Brian_Coca1)\
**Post date:** [February 15, 2013, 7:59pm UTC](https://forum.ansible.com/t/how-do-you-validate-the-yaml-file-before-ansible-it/12364/1 "2013-02-15T19:59:46Z")

</div>

I pass it to stdin to the following script:

-- valyml.py  
#!/usr/bin/env python  
import yaml  
import sys  
print yaml.load(sys.stdin)
