New in version 2.0.
The below requirements are needed on the host that executes this module.
Parameter | Choices/Defaults | Comments |
---|---|---|
cluster_name
(added in 2.6) |
Name of the cluster.
Facts about all SCSI devices for all host system in the given cluster is returned.
This parameter is required, if
esxi_hostname is not provided. |
|
esxi_hostname
(added in 2.6) |
Name of the ESXi host system.
Facts about all SCSI devices for the given ESXi host system is returned.
This parameter is required, if
cluster_name is not provided. |
|
hostname |
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 supported added in version 2.6.
|
|
password |
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 supported added in version 2.6.
aliases: pass, pwd |
|
port
(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 supported added in version 2.6.
|
target_id |
The target id based on order of scsi device.
version 2.6 onwards, this parameter is optional.
|
|
username |
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 supported added in version 2.6.
aliases: user, admin |
|
validate_certs |
True
|
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 supported added in version 2.6.
|
- name: Get Canonical name of particular target on particular ESXi host system
local_action:
module: vmware_target_canonical_facts
hostname: vcenter_hostname
username: vcenter_user
password: vcenter_pass
target_id: 7
esxi_hostname: esxi_hostname
- name: Get Canonical name of all target on particular ESXi host system
local_action:
module: vmware_target_canonical_facts
hostname: vcenter_hostname
username: vcenter_user
password: vcenter_pass
esxi_hostname: esxi_hostname
- name: Get Canonical name of all ESXi hostname on particular Cluster
local_action:
module: vmware_target_canonical_facts
hostname: vcenter_hostname
username: vcenter_user
password: vcenter_pass
cluster_name: cluster_name
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description |
---|---|---|
canonical
str
|
if host system and target id is given |
metadata about SCSI Target device
Sample:
mpx.vmhba0:C0:T0:L0
|
scsi_tgt_facts
dict
|
if host system or cluster is given |
metadata about all SCSI Target devices
Sample:
{'DC0_C0_H1': {'target_lun_uuid': {'0': 'key-vim.host.ScsiDisk-0000000000766d686261303a303a30'}, 'scsilun_canonical': {'key-vim.host.ScsiDisk-0000000000766d686261303a303a30': 'mpx.vmhba0:C0:T0:L0', 'key-vim.host.ScsiLun-0005000000766d686261313a303a30': 'mpx.vmhba1:C0:T0:L0'}}, 'DC0_C0_H0': {'target_lun_uuid': {'0': 'key-vim.host.ScsiDisk-0000000000766d686261303a303a30'}, 'scsilun_canonical': {'key-vim.host.ScsiDisk-0000000000766d686261303a303a30': 'mpx.vmhba0:C0:T0:L0', 'key-vim.host.ScsiLun-0005000000766d686261313a303a30': 'mpx.vmhba1:C0:T0:L0'}}}
|
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
Hint
If you notice any issues in this documentation you can edit this document to improve it.