I am trying to implement Dynamic Inventory for VMWare with the vmware_inventory.py script
From here :
I have searched for docs on the ansible site and also google searched and there is nothing useful.
the script vmware_inventory.py works and produces a list of VMs when run directly
# . python2 vmware_inventory.py
But when i try this
ansible -i vmware_inventory.py all -m shell -a "cat /etc/redhat-release"
nothing happens
This is from my ansible.cfg
[inventory]
enable_plugins = vmware_vm_inventory, host_list, script, yaml, ini, auto
I created a vmware.yml file in /etc/ansible but no luck. There are no details as to what is required to get this working
vmware.yml
# Sample configuration file for VMware Guest dynamic inventory
plugin: vmware_vm_inventory
strict: False
hostname: 10.65.223.31
username: admini...@vsphere.local
password: Esxi@123$%
validate_certs: False
with_tags: True