# \[WARNING\]: Failed to load inventory plugin, skipping vmware\_vm\_inventory

**URL:** <https://forum.ansible.com/t/warning-failed-to-load-inventory-plugin-skipping-vmware-vm-inventory/35372>\
**Category:** Ansible Project\
**Created:** [June 18, 2021, 1:23pm UTC](https://forum.ansible.com/t/warning-failed-to-load-inventory-plugin-skipping-vmware-vm-inventory/35372 "2021-06-18T13:23:13Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sofian\_El-Kadouri](https://avatars.discourse-cdn.com/v4/letter/s/71e660/32.png) [@Sofian\_El-Kadouri](https://forum.ansible.com/u/Sofian_El-Kadouri)\
**Post date:** [June 18, 2021, 1:23pm UTC](https://forum.ansible.com/t/warning-failed-to-load-inventory-plugin-skipping-vmware-vm-inventory/35372/1 "2021-06-18T13:23:13Z")

</div>

Hello,

I want to set up a dynamic inventory but I have a problem with the plugin. I have followed the ansible documentation : [https://docs.ansible.com/ansible/latest/scenario\_guides/vmware\_scenarios/vmware\_inventory.html](https://docs.ansible.com/ansible/latest/scenario_guides/vmware_scenarios/vmware_inventory.html)  
I followed the tutorial but I get this error message:

[WARNING]: Failed to load inventory plugin, skipping vmware\_vm\_inventory

ERROR! No inventory plugins available to generate inventory, make sure you have at least one whitelisted.

Did you encounter this problem?

Thanks in advance

---

<div class="post-metadata">

**Author:** ![Akasurde](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/akasurde/32/230_2.png) [@Akasurde](https://forum.ansible.com/u/Akasurde)\
**Post date:** [June 18, 2021, 1:39pm UTC](https://forum.ansible.com/t/warning-failed-to-load-inventory-plugin-skipping-vmware-vm-inventory/35372/2 "2021-06-18T13:39:03Z")

</div>

Hi,

Could you please share your Inventory configuration file? Also, -vvv console log?

Thanks

---

<div class="post-metadata">

**Author:** ![shertel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/shertel/32/1241_2.png) [@shertel](https://forum.ansible.com/u/shertel)\
**Post date:** [June 18, 2021, 3:14pm UTC](https://forum.ansible.com/t/warning-failed-to-load-inventory-plugin-skipping-vmware-vm-inventory/35372/3 "2021-06-18T15:14:21Z")

</div>

Make sure the community.vmware collection is installed if you’re using 2.10 or later. You can use the `--playbook-dir` option with `ansible-inventory` if the collection is playbook-adjacent rather than in a configured path.

---

<div class="post-metadata">

**Author:** ![Sofian\_El-Kadouri](https://avatars.discourse-cdn.com/v4/letter/s/71e660/32.png) [@Sofian\_El-Kadouri](https://forum.ansible.com/u/Sofian_El-Kadouri)\
**Post date:** [June 21, 2021, 7:50am UTC](https://forum.ansible.com/t/warning-failed-to-load-inventory-plugin-skipping-vmware-vm-inventory/35372/4 "2021-06-21T07:50:06Z")

</div>

Hello Abhijeet Kasure,  
Thanks for your answer !  
My inventory configuration file **inventory.vmware.yml** is :

**plugin: vmware\_vm\_inventory**  
**strict: False**  
**hostname: 10.0.1.1**  
**username: [sa.elkadouri@coppernic.fr](mailto:sa.elkadouri@coppernic.fr)**  
**password: Mypassword**  
**validate\_certs: False**  
**with\_tags: True**

And with -vvv :  
**/usr/lib/python2.7/dist-packages/ansible/parsing/vault/init.py:44: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in the next release.**  
**from cryptography.exceptions import InvalidSignature**  
**ansible-inventory 2.5.1**  
**config file = /etc/ansible/ansible.cfg**  
**configured module search path = [u’/home/admincpc/.ansible/plugins/modules’, u’/usr/share/ansible/plugins/modules’]**  
**ansible python module location = /usr/lib/python2.7/dist-packages/ansible**  
**executable location = /usr/bin/ansible-inventory**  
**python version = 2.7.17 (default, Feb 27 2021, 15:10:58) [GCC 7.5.0]**  
**Using /etc/ansible/ansible.cfg as config file**  
**[WARNING]: Failed to load inventory plugin, skipping vmware\_vm\_inventory**

**ERROR! No inventory plugins available to generate inventory, make sure you have at least one whitelisted.**

Thanks for your help !

---

<div class="post-metadata">

**Author:** ![Akasurde](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/akasurde/32/230_2.png) [@Akasurde](https://forum.ansible.com/u/Akasurde)\
**Post date:** [June 21, 2021, 7:54am UTC](https://forum.ansible.com/t/warning-failed-to-load-inventory-plugin-skipping-vmware-vm-inventory/35372/5 "2021-06-21T07:54:47Z")

</div>

Hi Sofian,

You are using Ansible 2.5.1 and Python 2.7.17. Both are End-of-life and not supported.

Could you please retry with the latest Ansible and latest Python? Thanks

---

<div class="post-metadata">

**Author:** ![Sofian\_El-Kadouri](https://avatars.discourse-cdn.com/v4/letter/s/71e660/32.png) [@Sofian\_El-Kadouri](https://forum.ansible.com/u/Sofian_El-Kadouri)\
**Post date:** [June 21, 2021, 12:27pm UTC](https://forum.ansible.com/t/warning-failed-to-load-inventory-plugin-skipping-vmware-vm-inventory/35372/6 "2021-06-21T12:27:54Z")

</div>

Hi Abhijeet,  
Thank you very much for your help and your speed !  
I install the version Ansible 2.12 and there is no error message 🙂  
But my inventory does not return anything, Do you have an idea ?  
Sorry I’m a beginner on Ansible

Thanks for your help 🙂

[DEPRECATION WARNING]: Ansible will require Python 3.8 or newer on the controller starting with Ansible 2.12.  
Current version: 2.7.17 (default, Feb 27 2021, 15:10:58) [GCC 7.5.0]. This feature will be removed from ansible-  
core in version 2.12. Deprecation warnings can be disabled by setting deprecation\_warnings=False in ansible.cfg.  
/usr/local/lib/python2.7/dist-packages/ansible/parsing/vault/ **init**.py:44: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in the next release.  
from cryptography.exceptions import InvalidSignature  
ansible-inventory [core 2.11.1]  
config file = /etc/ansible/ansible.cfg  
configured module search path = [u’/home/admincpc/.ansible/plugins/modules’, u’/usr/share/ansible/plugins/modules’]  
ansible python module location = /usr/local/lib/python2.7/dist-packages/ansible  
ansible collection location = /home/admincpc/.ansible/collections:/usr/share/ansible/collections  
executable location = /usr/local/bin/ansible-inventory  
python version = 2.7.17 (default, Feb 27 2021, 15:10:58) [GCC 7.5.0]  
jinja version = 2.10  
libyaml = True  
Using /etc/ansible/ansible.cfg as config file  
redirecting (type: inventory) ansible.builtin.vmware\_vm\_inventory to community.vmware.vmware\_vm\_inventory  
Skipping due to inventory source not existing or not being readable by the current user  
ansible\_collections.community.vmware.plugins.inventory.vmware\_vm\_inventory declined parsing /home/admincpc/inventory.vmware.yml as it did not pass its verify\_file() method  
[WARNING]: Unable to parse /home/admincpc/inventory.vmware.yml as an inventory source  
[WARNING]: No inventory was parsed, only implicit localhost is available  
{  
“\_meta”: {  
“hostvars”: {}  
},  
“all”: {  
“children”: [  
“ungrouped”  
]  
}  
}

---

<div class="post-metadata">

**Author:** ![Akasurde](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/akasurde/32/230_2.png) [@Akasurde](https://forum.ansible.com/u/Akasurde)\
**Post date:** [June 21, 2021, 12:36pm UTC](https://forum.ansible.com/t/warning-failed-to-load-inventory-plugin-skipping-vmware-vm-inventory/35372/7 "2021-06-21T12:36:51Z")

</div>

Hi Sofian,

Please see this error/warning message -

Skipping due to inventory source not existing or not being readable by the current user  
ansible\_collections.community.vmware.plugins.inventory.vmware\_vm\_inventory declined parsing /home/admincpc/inventory.vmware.yml as it did not pass its verify\_file() method

Check if /home/admincpc/inventory.vmware.yml is accessible and readable by the current user (the user which is running the ansible-inventory command).

---

<div class="post-metadata">

**Author:** ![Sofian\_El-Kadouri](https://avatars.discourse-cdn.com/v4/letter/s/71e660/32.png) [@Sofian\_El-Kadouri](https://forum.ansible.com/u/Sofian_El-Kadouri)\
**Post date:** [July 5, 2021, 1:47pm UTC](https://forum.ansible.com/t/warning-failed-to-load-inventory-plugin-skipping-vmware-vm-inventory/35372/8 "2021-07-05T13:47:58Z")

</div>

Hello Abhijeet Kasurde,  
Sorry for the delay, I succeeded in changing the rights.  
I now have an inventory with hundreds of lines and info,  
is it possible to have a simple inventory sorted by TAG ? ( on my vcenter my machines are tagged by PROD or TEST)  
Thank you very much for your help!  
Sincerely,  
Soufiane

---

<div class="post-metadata">

**Author:** ![Akasurde](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/akasurde/32/230_2.png) [@Akasurde](https://forum.ansible.com/u/Akasurde)\
**Post date:** [July 5, 2021, 1:55pm UTC](https://forum.ansible.com/t/warning-failed-to-load-inventory-plugin-skipping-vmware-vm-inventory/35372/9 "2021-07-05T13:55:38Z")

</div>

Yes,

Could you please paste your current inventory configuration file and requirement so that I can give you an example?

Thanks,

---

<div class="post-metadata">

**Author:** ![Sofian\_El-Kadouri](https://avatars.discourse-cdn.com/v4/letter/s/71e660/32.png) [@Sofian\_El-Kadouri](https://forum.ansible.com/u/Sofian_El-Kadouri)\
**Post date:** [July 5, 2021, 3:10pm UTC](https://forum.ansible.com/t/warning-failed-to-load-inventory-plugin-skipping-vmware-vm-inventory/35372/10 "2021-07-05T15:10:53Z")

</div>

You are so nice, thank you very much !!  
My current inventory configuration file is :  
strict: False  
hostname: 10.0.250.100  
username: myemail  
password: Mypassword  
validate\_certs: False  
with\_tags: True

In my vcenter, I have machines that are tagged with PROD, TEST or OTHER.

I would like to have an inventory that differentiates TEST tags from PROD tags or OTHER tags

for exemple i want this :

PROD:  
machine1  
machine2  
…

TEST:  
machine4  
machine9  
…

Do you understand my need?  
Thank you again, you are at the top!

Regards,

Soufiane

---

<div class="post-metadata">

**Author:** ![Sofian\_El-Kadouri](https://avatars.discourse-cdn.com/v4/letter/s/71e660/32.png) [@Sofian\_El-Kadouri](https://forum.ansible.com/u/Sofian_El-Kadouri)\
**Post date:** [July 21, 2021, 9:29am UTC](https://forum.ansible.com/t/warning-failed-to-load-inventory-plugin-skipping-vmware-vm-inventory/35372/11 "2021-07-21T09:29:30Z")

</div>

Hello Abhijeet Kasurde,  
Sorry I didn’t get an answer…  
I hope that nothing serious happened to you  
Regards,  
Soufiane

---

<div class="post-metadata">

**Author:** ![Akasurde](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/akasurde/32/230_2.png) [@Akasurde](https://forum.ansible.com/u/Akasurde)\
**Post date:** [July 21, 2021, 10:04am UTC](https://forum.ansible.com/t/warning-failed-to-load-inventory-plugin-skipping-vmware-vm-inventory/35372/12 "2021-07-21T10:04:48Z")

</div>

Oh sorry, I missed the previous email.

You already have that configuration which enables groups of tags with `with_tags: True`

plugin: community.vmware.vmware\_vm\_inventory  
hostnames:

- ‘[config.name](http://config.name)’  
properties:
- ‘[config.name](http://config.name)’
- ‘config.guestId’
- ‘guest.ipAddress’
- ‘summary.runtime.powerState’  
with\_tags: True  
with\_nested\_properties: True

With this configuration, I get groups like -

{  
“OTHER”: {  
“hosts”: [  
“c\_422e86b3-0e53-7c0d-1b9c-5d653f91ab3d”  
]  
},  
“PROD”: {  
“hosts”: [  
“b\_422e4de4-1d3c-a793-0693-e1ee79978bd3”  
]  
},  
“TEST”: {  
“hosts”: [  
“a\_422e78e3-2837-9c59-5471-11992032d1f1”  
]  
},  
“\_meta”: {  
“hostvars”: {  
“CentOS7\_Rest\_2\_4207e1ea-e0be-f313-0c2a-31979450e76c”: {  
“config.guestId”: “otherLinux64Guest”,  
“[config.name](http://config.name)”: “CentOS7\_Rest\_2”,

---

<div class="post-metadata">

**Author:** ![Sofian\_El-Kadouri](https://avatars.discourse-cdn.com/v4/letter/s/71e660/32.png) [@Sofian\_El-Kadouri](https://forum.ansible.com/u/Sofian_El-Kadouri)\
**Post date:** [September 7, 2021, 9:46am UTC](https://forum.ansible.com/t/warning-failed-to-load-inventory-plugin-skipping-vmware-vm-inventory/35372/13 "2021-09-07T09:46:36Z")

</div>

Sorry for the delay,  
The problem with your solution is that I have too much information and I would like to have only the machines of a TAG.  
I tried this:

![image.png](https://us1.discourse-cdn.com/ansible/original/2X/c/ca115a362c4cc59ee5ac52301fa6a886ee670c7e.png)

But it doesn’t work my inventory is empty.

Regards,  
Soufiane

---

<div class="post-metadata">

**Author:** ![Akasurde](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/akasurde/32/230_2.png) [@Akasurde](https://forum.ansible.com/u/Akasurde)\
**Post date:** [September 7, 2021, 9:59am UTC](https://forum.ansible.com/t/warning-failed-to-load-inventory-plugin-skipping-vmware-vm-inventory/35372/14 "2021-09-07T09:59:42Z")

</div>

Could you please elaborate on " I would like to have only the machines of a TAG." ?

> **(attachments)**
>
> ![image.png](https://us1.discourse-cdn.com/ansible/original/2X/c/ca115a362c4cc59ee5ac52301fa6a886ee670c7e.png)

---

<div class="post-metadata">

**Author:** ![Sofian\_El-Kadouri](https://avatars.discourse-cdn.com/v4/letter/s/71e660/32.png) [@Sofian\_El-Kadouri](https://forum.ansible.com/u/Sofian_El-Kadouri)\
**Post date:** [September 7, 2021, 11:45am UTC](https://forum.ansible.com/t/warning-failed-to-load-inventory-plugin-skipping-vmware-vm-inventory/35372/15 "2021-09-07T11:45:15Z")

</div>

My goal would be to have several inventories for example :  
inventory\_prod.yml with in it the machines that are TAG “PROD”  
an inventory\_test.yml with the machines that are TAG “TEST”

Because currently in one file there are really all the machines and way too much information that is useless to me.

Thank you very much for your help!

> **(attachments)**
>
> ![image.png](https://us1.discourse-cdn.com/ansible/original/2X/c/ca115a362c4cc59ee5ac52301fa6a886ee670c7e.png)

---

<div class="post-metadata">

**Author:** ![Sofian\_El-Kadouri](https://avatars.discourse-cdn.com/v4/letter/s/71e660/32.png) [@Sofian\_El-Kadouri](https://forum.ansible.com/u/Sofian_El-Kadouri)\
**Post date:** [September 10, 2021, 8:04am UTC](https://forum.ansible.com/t/warning-failed-to-load-inventory-plugin-skipping-vmware-vm-inventory/35372/16 "2021-09-10T08:04:56Z")

</div>

Hi Abhijeet,  
Is my request understandable?  
If not, sorry, I can explain it again.  
Thank you very much  
Sincerely

> **(attachments)**
>
> ![image.png](https://us1.discourse-cdn.com/ansible/original/2X/c/ca115a362c4cc59ee5ac52301fa6a886ee670c7e.png)
