# ansible-playbook install.yml error with Set the value of 'postgres\_data\_dir

**URL:** <https://forum.ansible.com/t/ansible-playbook-install-yml-error-with-set-the-value-of-postgres-data-dir/25621>\
**Category:** AWX Project\
**Created:** [September 28, 2017, 8:11am UTC](https://forum.ansible.com/t/ansible-playbook-install-yml-error-with-set-the-value-of-postgres-data-dir/25621 "2017-09-28T08:11:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yatish\_Gopal](https://avatars.discourse-cdn.com/v4/letter/y/b2d939/32.png) [@Yatish\_Gopal](https://forum.ansible.com/u/Yatish_Gopal)\
**Post date:** [September 28, 2017, 8:11am UTC](https://forum.ansible.com/t/ansible-playbook-install-yml-error-with-set-the-value-of-postgres-data-dir/25621/1 "2017-09-28T08:11:39Z")

</div>

once i ran with - ansible-playbook install.yml  
getting the below error - actually the variable already exist with "/tmp/pgdocker. please help  
TASK [check\_vars : postgres\_data\_dir should be defined] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
fatal: [web-centos1]: FAILED! =\> {  
“assertion”: “postgres\_data\_dir is defined and postgres\_data\_dir != ‘’”,  
“changed”: false,  
“evaluated\_to”: false,  
“failed”: true,  
“msg”: “Set the value of ‘postgres\_data\_dir’ in the inventory file.”

---

<div class="post-metadata">

**Author:** ![Christopher\_Meyers](https://avatars.discourse-cdn.com/v4/letter/c/3e96dc/32.png) [@Christopher\_Meyers](https://forum.ansible.com/u/Christopher_Meyers)\
**Post date:** [September 28, 2017, 11:58am UTC](https://forum.ansible.com/t/ansible-playbook-install-yml-error-with-set-the-value-of-postgres-data-dir/25621/2 "2017-09-28T11:58:39Z")

</div>

ansible-playbook -i inventory install.yml

You missed passing in the inventory.

---

<div class="post-metadata">

**Author:** ![Yatish\_Gopal](https://avatars.discourse-cdn.com/v4/letter/y/b2d939/32.png) [@Yatish\_Gopal](https://forum.ansible.com/u/Yatish_Gopal)\
**Post date:** [September 29, 2017, 11:21am UTC](https://forum.ansible.com/t/ansible-playbook-install-yml-error-with-set-the-value-of-postgres-data-dir/25621/3 "2017-09-29T11:21:14Z")

</div>

Thank you very much for pointing this 🙂 it works now.
