# getting error  \[WARNING\]: Unable to parse /etc/ansible/hosts as an inventory source

**URL:** <https://forum.ansible.com/t/getting-error-warning-unable-to-parse-etc-ansible-hosts-as-an-inventory-source/28875>\
**Category:** Ansible Project\
**Created:** [October 25, 2018, 11:09pm UTC](https://forum.ansible.com/t/getting-error-warning-unable-to-parse-etc-ansible-hosts-as-an-inventory-source/28875 "2018-10-25T23:09:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![baktavar\_baba](https://avatars.discourse-cdn.com/v4/letter/b/46a35a/32.png) [@baktavar\_baba](https://forum.ansible.com/u/baktavar_baba)\
**Post date:** [October 25, 2018, 11:09pm UTC](https://forum.ansible.com/t/getting-error-warning-unable-to-parse-etc-ansible-hosts-as-an-inventory-source/28875/1 "2018-10-25T23:09:19Z")

</div>

Hi i installed Ansible on MacOS and getting below errors

> ansible all -m ping

**[WARNING]: Unable to parse /etc/ansible/hosts as an inventory source**

**[WARNING]: No inventory was parsed, only implicit localhost is available**

**[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match ‘all’**

> ansible --version

ansible 2.7.0

config file = None

configured module search path = [‘/Users/bhaktavar\_baba/.ansible/plugins/modules’, ‘/usr/share/ansible/plugins/modules’]

ansible python module location = /usr/local/Cellar/ansible/2.7.0/libexec/lib/python3.7/site-packages/ansible

executable location = /usr/local/bin/ansible

python version = 3.7.0 (default, Oct 25 2018, 15:05:47) [Clang 10.0.0 (clang-1000.11.45.2)]

But when i check /etc/ansible/hosts getting below error. Is it something wrong with installation procedure i followed?

> ls -l /etc/ansible/hosts

ls: /etc/ansible/hosts: No such file or directory

---

<div class="post-metadata">

**Author:** ![sivel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sivel/32/1198_2.png) [@sivel](https://forum.ansible.com/u/sivel)\
**Post date:** [October 25, 2018, 11:27pm UTC](https://forum.ansible.com/t/getting-error-warning-unable-to-parse-etc-ansible-hosts-as-an-inventory-source/28875/2 "2018-10-25T23:27:45Z")

</div>

The pip method of installation doesn’t not create the /etc/ansible nor any default files that go there.

OS packages will often do so.

This is not a problem, that just happens to be a default place to look for a things, but you can configure other paths using an ansible.cfg file or via the CLI, or create those paths/files yourself.
