# Failed to load inventory plugin, skipping yml

**URL:** <https://forum.ansible.com/t/failed-to-load-inventory-plugin-skipping-yml/35143>\
**Category:** Ansible Project\
**Created:** [May 10, 2021, 3:45pm UTC](https://forum.ansible.com/t/failed-to-load-inventory-plugin-skipping-yml/35143 "2021-05-10T15:45:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Suneel\_Hegde](https://avatars.discourse-cdn.com/v4/letter/s/edb3f5/32.png) [@Suneel\_Hegde](https://forum.ansible.com/u/Suneel_Hegde)\
**Post date:** [May 10, 2021, 3:45pm UTC](https://forum.ansible.com/t/failed-to-load-inventory-plugin-skipping-yml/35143/1 "2021-05-10T15:45:33Z")

</div>

Hello Team,

I am trying to do ansible all --list-hosts -vvvvvvv and try to ping the hosts but getting this error could you please help me to solve this problem?

suneelkumar@LT Ansible % ansible all --list-hosts -vvvvvvv  
ansible 2.10.4  
config file = /Users/suneelkumar/Documents/Automation/Ansible/ansible.cfg  
configured module search path = [‘/Users/suneelkumar/.ansible/plugins/modules’, ‘/usr/share/ansible/plugins/modules’]  
ansible python module location = /Library/Python/3.8/site-packages/ansible  
executable location = /usr/local/bin/ansible  
python version = 3.8.2 (default, Apr 8 2021, 23:19:18) [Clang 12.0.5 (clang-1205.0.22.9)]  
Using /Users/suneelkumar/Documents/Automation/Ansible/ansible.cfg as config file  
setting up inventory plugins  
[WARNING]: Failed to load inventory plugin, skipping yml  
host\_list declined parsing /Users/suneelkumar/Documents/Automation/Ansible/hosts #/Users/suneelkumar/Documents/Automation/Ansible/hosts.yaml as it did not pass its verify\_file() method  
Skipping due to inventory source not existing or not being readable by the current user  
script declined parsing /Users/suneelkumar/Documents/Automation/Ansible/hosts #/Users/suneelkumar/Documents/Automation/Ansible/hosts.yaml as it did not pass its verify\_file() method  
Skipping due to inventory source not existing or not being readable by the current user  
auto declined parsing /Users/suneelkumar/Documents/Automation/Ansible/hosts #/Users/suneelkumar/Documents/Automation/Ansible/hosts.yaml as it did not pass its verify\_file() method  
Skipping due to inventory source not existing or not being readable by the current user  
yaml declined parsing /Users/suneelkumar/Documents/Automation/Ansible/hosts #/Users/suneelkumar/Documents/Automation/Ansible/hosts.yaml as it did not pass its verify\_file() method  
Skipping due to inventory source not existing or not being readable by the current user  
ini declined parsing /Users/suneelkumar/Documents/Automation/Ansible/hosts #/Users/suneelkumar/Documents/Automation/Ansible/hosts.yaml as it did not pass its verify\_file() method  
Skipping due to inventory source not existing or not being readable by the current user  
toml declined parsing /Users/suneelkumar/Documents/Automation/Ansible/hosts #/Users/suneelkumar/Documents/Automation/Ansible/hosts.yaml as it did not pass its verify\_file() method  
advanced\_host\_list declined parsing /Users/suneelkumar/Documents/Automation/Ansible/hosts #/Users/suneelkumar/Documents/Automation/Ansible/hosts.yaml as it did not pass its verify\_file() method  
Skipping due to inventory source not existing or not being readable by the current user  
constructed declined parsing /Users/suneelkumar/Documents/Automation/Ansible/hosts #/Users/suneelkumar/Documents/Automation/Ansible/hosts.yaml as it did not pass its verify\_file() method  
Skipping due to inventory source not existing or not being readable by the current user  
yaml declined parsing /Users/suneelkumar/Documents/Automation/Ansible/hosts #/Users/suneelkumar/Documents/Automation/Ansible/hosts.yaml as it did not pass its verify\_file() method  
[WARNING]: Unable to parse /Users/suneelkumar/Documents/Automation/Ansible/hosts #/Users/suneelkumar/Documents/Automation/Ansible/hosts.yaml 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’  
hosts (0):  
suneelkumar@LT Ansible %

suneelkumar@LT Ansible % ansible all -m ping  
[WARNING]: Failed to load inventory plugin, skipping yml  
[WARNING]: Unable to parse /Users/suneelkumar/Documents/Automation/Ansible/hosts #/Users/suneelkumar/Documents/Automation/Ansible/hosts.yaml 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’  
suneelkumar@LT Ansible %

I am running ansible 2.10.4

Thank you !

regards,

Suneel

---

<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:** [May 10, 2021, 3:50pm UTC](https://forum.ansible.com/t/failed-to-load-inventory-plugin-skipping-yml/35143/2 "2021-05-10T15:50:21Z")

</div>

Your inventory seems to be configured literally as:

/Users/suneelkumar/Documents/Automation/Ansible/hosts #/Users/suneelkumar/Documents/Automation/Ansible/hosts.yaml

Note that the # and everything after is still included as part of the path, where I assume you meant it to be a comment.

Move the comment to its own line, and I would assume that it should start working for you.

---

<div class="post-metadata">

**Author:** ![Suneel\_Hegde](https://avatars.discourse-cdn.com/v4/letter/s/edb3f5/32.png) [@Suneel\_Hegde](https://forum.ansible.com/u/Suneel_Hegde)\
**Post date:** [May 10, 2021, 4:01pm UTC](https://forum.ansible.com/t/failed-to-load-inventory-plugin-skipping-yml/35143/3 "2021-05-10T16:01:57Z")

</div>

I tried that, but its still not working giving this error

suneelkumar@LT- Ansible % ansible all --list-hosts -vvvvvvv  
ansible 2.10.4  
config file = /Users/suneelkumar/Documents/Automation/Ansible/ansible.cfg  
configured module search path = [‘/Users/suneelkumar/.ansible/plugins/modules’, ‘/usr/share/ansible/plugins/modules’]  
ansible python module location = /Library/Python/3.8/site-packages/ansible  
executable location = /usr/local/bin/ansible  
python version = 3.8.2 (default, Apr 8 2021, 23:19:18) [Clang 12.0.5 (clang-1205.0.22.9)]  
Using /Users/suneelkumar/Documents/Automation/Ansible/ansible.cfg as config file  
setting up inventory plugins  
host\_list declined parsing /Users/suneelkumar/Documents/Automation/Ansible/hosts as it did not pass its verify\_file() method  
auto declined parsing /Users/suneelkumar/Documents/Automation/Ansible/hosts as it did not pass its verify\_file() method  
toml declined parsing /Users/suneelkumar/Documents/Automation/Ansible/hosts as it did not pass its verify\_file() method  
[WARNING]: \* Failed to parse /Users/suneelkumar/Documents/Automation/Ansible/hosts with script plugin: problem running /Users/suneelkumar/Documents/Automation/Ansible/hosts  
–list ([Errno 8] Exec format error: ‘/Users/suneelkumar/Documents/Automation/Ansible/hosts’)  
File “/Library/Python/3.8/site-packages/ansible/inventory/manager.py”, line 289, in parse\_source  
plugin.parse(self.\_inventory, self.\_loader, source, cache=cache)  
File “/Library/Python/3.8/site-packages/ansible/plugins/inventory/script.py”, line 169, in parse  
raise AnsibleParserError(to\_native(e))  
[WARNING]: \* Failed to parse /Users/suneelkumar/Documents/Automation/Ansible/hosts with yaml plugin: We were unable to read either as JSON nor YAML, these are the errors we got  
from each: JSON: Expecting value: line 1 column 2 (char 1) Syntax Error while loading YAML. expected ‘’, but found ‘[’ The error appears to be in  
‘/Users/suneelkumar/Documents/Automation/Ansible/hosts’: line 3, column 1, but may be elsewhere in the file depending on the exact syntax problem. The offending line appears to  
be: [ios:vars] ^ here  
File “/Library/Python/3.8/site-packages/ansible/inventory/manager.py”, line 289, in parse\_source  
plugin.parse(self.\_inventory, self.\_loader, source, cache=cache)  
File “/Library/Python/3.8/site-packages/ansible/plugins/inventory/yaml.py”, line 105, in parse  
raise AnsibleParserError(e)  
[WARNING]: \* Failed to parse /Users/suneelkumar/Documents/Automation/Ansible/hosts with ini plugin: /Users/suneelkumar/Documents/Automation/Ansible/hosts:10: Expected  
key=value, got: ansible\_connection: ansible.netcommon.network\_cli  
File “/Library/Python/3.8/site-packages/ansible/inventory/manager.py”, line 289, in parse\_source  
plugin.parse(self.\_inventory, self.\_loader, source, cache=cache)  
File “/Library/Python/3.8/site-packages/ansible/plugins/inventory/ini.py”, line 138, in parse  
raise AnsibleParserError(e)  
[WARNING]: Unable to parse /Users/suneelkumar/Documents/Automation/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’  
hosts (0):  
suneelkumar@LT- Ansible %

---

<div class="post-metadata">

**Author:** ![Komal\_Suthar](https://avatars.discourse-cdn.com/v4/letter/k/919ad9/32.png) [@Komal\_Suthar](https://forum.ansible.com/u/Komal_Suthar)\
**Post date:** [May 11, 2021, 4:08am UTC](https://forum.ansible.com/t/failed-to-load-inventory-plugin-skipping-yml/35143/4 "2021-05-11T04:08:37Z")

</div>

Have you created the inventory file and also give the location of the inventory file in the ansible configuration file and also im ansible in think there are only 4 v’s verbosity and we cant use this -vvvv with this inventory we can use this while we run a playbook.

---

<div class="post-metadata">

**Author:** ![Suneel\_Hegde](https://avatars.discourse-cdn.com/v4/letter/s/edb3f5/32.png) [@Suneel\_Hegde](https://forum.ansible.com/u/Suneel_Hegde)\
**Post date:** [May 11, 2021, 11:46am UTC](https://forum.ansible.com/t/failed-to-load-inventory-plugin-skipping-yml/35143/5 "2021-05-11T11:46:25Z")

</div>

There was a mistake in the host file insted of using = i used :

that is the reason it was giving the error

thank you everyone for your response
