vmware_vm_inventory – VMware Guest inventory source¶
New in version 2.7.
Synopsis¶
- Get virtual machines as inventory hosts from VMware environment.
- Uses any file which ends with vmware.yml or vmware.yaml as a YAML configuration file.
- The inventory_hostname is always the ‘Name’ and UUID of the virtual machine. UUID is added as VMware allows virtual machines with the same name.
Requirements¶
The below requirements are needed on the local master node that executes this inventory.
- Python >= 2.7
- PyVmomi
- requests >= 2.3
- vSphere Automation SDK - For tag feature
- vCloud Suite SDK - For tag feature
Parameters¶
Examples¶
# Sample configuration file for VMware Guest dynamic inventory
    plugin: vmware_vm_inventory
    strict: False
    hostname: 10.65.223.31
    username: administrator@vsphere.local
    password: Esxi@123$%
    validate_certs: False
    with_tags: True
# Gather minimum set of properties for VMware guest
    plugin: vmware_vm_inventory
    strict: False
    hostname: 10.65.223.31
    username: administrator@vsphere.local
    password: Esxi@123$%
    validate_certs: False
    with_tags: False
    properties:
    - 'name'
    - 'guest.ipAddress'
Status¶
- This inventory is not guaranteed to have a backwards compatible interface. [preview]
- This inventory is maintained by the Ansible Community. [community]
Authors¶
- Abhijeet Kasurde (@Akasurde)
Hint
If you notice any issues in this documentation, you can edit this document to improve it.
Hint
Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.
