community.vmware.vmware_tools – Execute tasks inside a VM via VMware Tools
Note
This plugin is part of the community.vmware collection (version 1.17.0).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install community.vmware
.
To use it in a playbook, specify: community.vmware.vmware_tools
.
Synopsis
Use VMware tools to run tasks in, or put/fetch files to guest operating systems running in VMware infrastructure.
In case of Windows VMs, set
ansible_shell_type
topowershell
.Does not work with ‘become’.
Requirements
The below requirements are needed on the local controller node that executes this connection.
pyvmomi (Python library)
requests (Python library)
Parameters
Parameter |
Comments |
---|---|
Time in seconds to sleep between execution of command. Default: 0.5 Configuration:
|
|
shell to use for execution inside container Default: “/bin/sh” Configuration:
|
|
File chunk size. (Applicable when writing a file to disk, example: using the Default: 128 Configuration:
|
|
Verify SSL for the connection. Note: This will validate certs for both Choices:
Configuration:
|
|
Password for the user in guest operating system. Configuration:
|
|
VM path absolute to the connection. vCenter Example: ESXi Host Example: Must include VM name, appended to ‘folder’ as would be passed to community.vmware.vmware_guest. Needs to include vm between the Datacenter and the rest of the VM path. Datacenter default value for ESXi server is Folder vm is not visible in the vSphere Web Client but necessary for VMware API to work. Configuration:
|
|
VM username. Configuration:
|
|
FQDN or IP Address for the connection (vCenter or ESXi Host). Configuration:
|
|
Password for the connection. Configuration:
|
|
Port for the connection. Default: 443 Configuration:
|
|
Username for the connection. Requires the following permissions on the VM: - VirtualMachine.GuestOperations.Execute - VirtualMachine.GuestOperations.Modify - VirtualMachine.GuestOperations.Query Configuration:
|
Authors
Deric Crago <deric.crago@gmail.com>