Parameter |
Choices/Defaults |
Comments |
add_connected
bool
(added in 2.6) |
|
If set to True , then the host should be connected as soon as it is added.
This parameter is ignored if state is set to a value other than present .
|
cluster_name
|
|
Name of the cluster to add the host.
If folder is not set, then this parameter is required.
Aliases added in version 2.6.
aliases: cluster
|
datacenter_name
required |
|
Name of the datacenter to add the host.
Aliases added in version 2.6.
aliases: datacenter
|
esxi_hostname
required |
|
ESXi hostname to manage.
|
esxi_password
|
|
ESXi password.
Required for adding a host.
Optional for reconnect.
Unused for removing.
No longer a required parameter from version 2.5.
|
esxi_ssl_thumbprint
(added in 2.5) |
Default:
""
|
Specifying the hostsystem certificate's thumbprint.
Use following command to get hostsystem certificate's thumbprint -
# openssl x509 -in /etc/vmware/ssl/rui.crt -fingerprint -sha1 -noout
|
esxi_username
|
|
ESXi username.
Required for adding a host.
Optional for reconnect.
Unused for removing.
No longer a required parameter from version 2.5.
|
folder
(added in 2.6) |
|
Name of the folder under which host to add.
If cluster_name is not set, then this parameter is required.
For example, if there is a datacenter 'dc1' under folder called 'Site1' then, this value will be '/Site1/dc1/host'.
Here 'host' is an invisible folder under VMware Web Client.
Another example, if there is a nested folder structure like '/myhosts/india/pune' under datacenter 'dc2', then folder value will be '/dc2/host/myhosts/india/pune'.
Other Examples:
- '/Site2/dc2/Asia-Cluster/host'
- '/dc3/Asia-Cluster/host'
|
hostname
str |
|
The hostname or IP address of the vSphere vCenter or ESXi server.
If the value is not specified in the task, the value of environment variable VMWARE_HOST will be used instead.
Environment variable support added in version 2.6.
|
password
str |
|
The password of the vSphere vCenter or ESXi server.
If the value is not specified in the task, the value of environment variable VMWARE_PASSWORD will be used instead.
Environment variable support added in version 2.6.
aliases: pass, pwd
|
port
int
(added in 2.5) |
Default:
443
|
The port number of the vSphere vCenter or ESXi server.
If the value is not specified in the task, the value of environment variable VMWARE_PORT will be used instead.
Environment variable support added in version 2.6.
|
state
|
Choices:
present ←
- absent
- add_or_reconnect
- reconnect
|
If set to present , then add the host if host is absent.
If set to present , then do nothing if host already exists.
If set to absent , then remove the host if host is present.
If set to absent , then do nothing if host already does not exists.
If set to add_or_reconnect , then add the host if it's absent else reconnect it.
If set to reconnect , then reconnect the host if it's present else fail.
|
username
str |
|
The username of the vSphere vCenter or ESXi server.
If the value is not specified in the task, the value of environment variable VMWARE_USER will be used instead.
Environment variable support added in version 2.6.
aliases: admin, user
|
validate_certs
bool |
|
Allows connection when SSL certificates are not valid. Set to false when certificates are not trusted.
If the value is not specified in the task, the value of environment variable VMWARE_VALIDATE_CERTS will be used instead.
Environment variable support added in version 2.6.
If set to yes , please make sure Python >= 2.7.9 is installed on the given machine.
|