ansible / ansible.builtin / v2.9.13 / inventory / vmware_vm_inventory VMware Guest inventory source | "added in version" 2.7 of ansible.builtin" Authors: Abhijeet Kasurde (@Akasurde)ansible.builtin.vmware_vm_inventory (v2.9.13) — inventory
pip
Install with pip install ansible==2.9.13
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.
port: default: 443 description: Port number used to connect to vCenter or ESXi Server. env: - name: VMWARE_PORT cache: default: false description: - Toggle to enable/disable the caching of the inventory's source data, requires a cache plugin setup to work. env: - name: ANSIBLE_INVENTORY_CACHE ini: - key: cache section: inventory type: bool hostname: description: Name of vCenter or ESXi server. env: - name: VMWARE_SERVER required: true password: description: Password of vSphere admin user. env: - name: VMWARE_PASSWORD required: true username: description: Name of vSphere admin user. env: - name: VMWARE_USERNAME required: true with_tags: default: false description: - Include tags and associated virtual machines. - Requires 'vSphere Automation SDK' library to be installed on the given controller machine. - Please refer following URLs for installation steps - https://code.vmware.com/web/sdk/65/vsphere-automation-python type: boolean properties: default: - name - config.cpuHotAddEnabled - config.cpuHotRemoveEnabled - config.instanceUuid - config.hardware.numCPU - config.template - config.name - guest.hostName - guest.ipAddress - guest.guestId - guest.guestState - runtime.maxMemoryUsage - customValue description: - Specify the list of VMware schema properties associated with the VM. - These properties will be populated in hostvars of the given VM. - Each value in the list specifies the path to a specific property in VM object. type: list version_added: '2.9' version_added_collection: ansible.builtin cache_plugin: default: memory description: - Cache plugin to use for the inventory's source data. env: - name: ANSIBLE_CACHE_PLUGIN - name: ANSIBLE_INVENTORY_CACHE_PLUGIN ini: - key: fact_caching section: defaults - key: cache_plugin section: inventory type: str cache_prefix: default: ansible_inventory_ description: - Prefix to use for cache plugin files/tables env: - name: ANSIBLE_CACHE_PLUGIN_PREFIX - name: ANSIBLE_INVENTORY_CACHE_PLUGIN_PREFIX ini: - key: fact_caching_prefix section: defaults - key: cache_prefix section: inventory cache_timeout: default: 3600 description: - Cache duration in seconds env: - name: ANSIBLE_CACHE_PLUGIN_TIMEOUT - name: ANSIBLE_INVENTORY_CACHE_TIMEOUT ini: - key: fact_caching_timeout section: defaults - key: cache_timeout section: inventory type: int validate_certs: default: true description: - Allows connection when SSL certificates are not valid. Set to C(false) when certificates are not trusted. type: boolean cache_connection: description: - Cache connection data or path, read cache plugin documentation for specifics. env: - name: ANSIBLE_CACHE_PLUGIN_CONNECTION - name: ANSIBLE_INVENTORY_CACHE_CONNECTION ini: - key: fact_caching_connection section: defaults - key: cache_connection section: inventory type: str