# Inventory path?

**URL:** <https://forum.ansible.com/t/inventory-path/25747>\
**Category:** Ansible Project\
**Created:** [October 13, 2017, 8:09pm UTC](https://forum.ansible.com/t/inventory-path/25747 "2017-10-13T20:09:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sandev\_singh](https://avatars.discourse-cdn.com/v4/letter/s/8dc957/32.png) [@sandev\_singh](https://forum.ansible.com/u/sandev_singh)\
**Post date:** [October 13, 2017, 8:09pm UTC](https://forum.ansible.com/t/inventory-path/25747/1 "2017-10-13T20:09:48Z")

</div>

Hi, I am new to ansible and learning it. I installed it using pip on my Mac book, but when try to go to the default inventory location: /etc/ansible/hosts, it says -

_sandevs-MacBook-Air:~ sandevsingh$ cd /etc/ansible_

_-bash: cd: /etc/ansible: No such file or directory_

I have checked that ansible is installed on my MacBook-

_sandevs-MacBook-Air:~ sandevsingh$ ansible --version_

_ansible 2.4.0.0_

_config file = None_

_configured module search path = [u’/Users/sandevsingh/.ansible/plugins/modules’, u’/usr/share/ansible/plugins/modules’]_

_ansible python module location = /Library/Python/2.7/site-packages/ansible_

_executable location = /usr/local/bin/ansible_

_python version = 2.7.10 (default, Feb 7 2017, 00:08:15) [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)]_

Please advise?

---

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [October 14, 2017, 2:26pm UTC](https://forum.ansible.com/t/inventory-path/25747/2 "2017-10-14T14:26:53Z")

</div>

This is normal with the pip install.

I don't recommend using /etc/asnible, I do recommend using some kind of version control system(VCS) like git.  
Create a directory in you home directory, eg. ansible.  
In this directory create a file called ansible.cfg with following content  
[default]  
inventory = hosts

With this you inventory file will be called hosts, but you can change that to whatever you want.

When you are in this directory ansible -version will show something like this  
# ansible --version  
ansible 2.4.0.0  
&nbsp;&nbsp;&nbsp;config file = /root/ansible/ansible.cfg  
&nbsp;&nbsp;&nbsp;configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']  
&nbsp;&nbsp;&nbsp;ansible python module location = /usr/local/lib/python2.7/dist-packages/ansible  
&nbsp;&nbsp;&nbsp;executable location = /usr/local/bin/ansible  
&nbsp;&nbsp;&nbsp;python version = 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609]

Then you can add this a VCS and track all the changes and share the code with other.
