VMware: Add datatypes in documentation (#59221)

* Remove E337 warnings
* Update docs
* Fix minor typos

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
pull/59490/head
Abhijeet Kasurde 5 years ago committed by GitHub
parent 7c728118e6
commit d9b9e07d0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -30,36 +30,46 @@ options:
description: description:
- The extension key of the extension to install or uninstall. - The extension key of the extension to install or uninstall.
required: True required: True
type: str
version: version:
description: description:
- The version of the extension you are installing or uninstalling. - The version of the extension you are installing or uninstalling.
required: True required: True
type: str
name: name:
description: description:
- Required for C(state=present). The name of the extension you are installing. - Required for C(state=present). The name of the extension you are installing.
type: str
company: company:
description: description:
- Required for C(state=present). The name of the company that makes the extension. - Required for C(state=present). The name of the company that makes the extension.
type: str
description: description:
description: description:
- Required for C(state=present). A short description of the extension. - Required for C(state=present). A short description of the extension.
type: str
email: email:
description: description:
- Required for C(state=present). Administrator email to use for extension. - Required for C(state=present). Administrator email to use for extension.
type: str
url: url:
description: description:
- Required for C(state=present). Link to server hosting extension zip file to install. - Required for C(state=present). Link to server hosting extension zip file to install.
type: str
ssl_thumbprint: ssl_thumbprint:
description: description:
- Required for C(state=present). SSL thumbprint of the extension hosting server. - Required for C(state=present). SSL thumbprint of the extension hosting server.
type: str
server_type: server_type:
description: description:
- Required for C(state=present). Type of server being used to install the extension (SOAP, REST, HTTP, etc.). - Required for C(state=present). Type of server being used to install the extension (SOAP, REST, HTTP, etc.).
default: vsphere-client-serenity default: vsphere-client-serenity
type: str
client_type: client_type:
description: description:
- Required for C(state=present). Type of client the extension is (win32, .net, linux, etc.). - Required for C(state=present). Type of client the extension is (win32, .net, linux, etc.).
default: vsphere-client-serenity default: vsphere-client-serenity
type: str
visible: visible:
description: description:
- Show the extension in solution manager inside vCenter. - Show the extension in solution manager inside vCenter.
@ -70,6 +80,7 @@ options:
- Add or remove vCenter Extension. - Add or remove vCenter Extension.
choices: [absent, present] choices: [absent, present]
default: present default: present
type: str
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

@ -35,12 +35,14 @@ options:
- Name of the datacenter. - Name of the datacenter.
required: True required: True
aliases: ['datacenter_name'] aliases: ['datacenter_name']
type: str
folder_name: folder_name:
description: description:
- Name of folder to be managed. - Name of folder to be managed.
- This is case sensitive parameter. - This is case sensitive parameter.
- Folder name should be under 80 characters. This is a VMware restriction. - Folder name should be under 80 characters. This is a VMware restriction.
required: True required: True
type: str
parent_folder: parent_folder:
description: description:
- Name of the parent folder under which new folder needs to be created. - Name of the parent folder under which new folder needs to be created.
@ -48,6 +50,7 @@ options:
- Please specify unique folder name as there is no way to detect duplicate names. - Please specify unique folder name as there is no way to detect duplicate names.
- "If user wants to create a folder under '/DC0/vm/vm_folder', this value will be 'vm_folder'." - "If user wants to create a folder under '/DC0/vm/vm_folder', this value will be 'vm_folder'."
required: False required: False
type: str
folder_type: folder_type:
description: description:
- This is type of folder. - This is type of folder.
@ -58,6 +61,7 @@ options:
- This parameter is required, if C(state) is set to C(present) and parent_folder is absent. - This parameter is required, if C(state) is set to C(present) and parent_folder is absent.
- This option is ignored, if C(parent_folder) is set. - This option is ignored, if C(parent_folder) is set.
default: vm default: vm
type: str
required: False required: False
choices: [ datastore, host, network, vm ] choices: [ datastore, host, network, vm ]
state: state:
@ -68,6 +72,7 @@ options:
- If set to C(absent), then folder is unregistered and destroyed. - If set to C(absent), then folder is unregistered and destroyed.
default: present default: present
choices: [ present, absent ] choices: [ present, absent ]
type: str
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

@ -28,20 +28,24 @@ options:
default: { default: {
'source': 'ansible' 'source': 'ansible'
} }
type: dict
license: license:
description: description:
- The license key to manage in vSphere vCenter. - The license key to manage in vSphere vCenter.
required: yes required: yes
type: str
state: state:
description: description:
- Whether to add (C(present)) or remove (C(absent)) the license key. - Whether to add (C(present)) or remove (C(absent)) the license key.
choices: [absent, present] choices: [absent, present]
default: present default: present
type: str
esxi_hostname: esxi_hostname:
description: description:
- The hostname of the ESXi server to which the specified license will be assigned. - The hostname of the ESXi server to which the specified license will be assigned.
- This parameter is optional. - This parameter is optional.
version_added: '2.8' version_added: '2.8'
type: str
datacenter: datacenter:
description: description:
- The datacenter name to use for the operation. - The datacenter name to use for the operation.

@ -37,22 +37,26 @@ options:
description: description:
- The name of category to manage. - The name of category to manage.
required: True required: True
type: str
category_description: category_description:
description: description:
- The category description. - The category description.
- This is required only if C(state) is set to C(present). - This is required only if C(state) is set to C(present).
- This parameter is ignored, when C(state) is set to C(absent). - This parameter is ignored, when C(state) is set to C(absent).
default: '' default: ''
type: str
category_cardinality: category_cardinality:
description: description:
- The category cardinality. - The category cardinality.
- This parameter is ignored, when updating existing category. - This parameter is ignored, when updating existing category.
choices: ['multiple', 'single'] choices: ['multiple', 'single']
default: 'multiple' default: 'multiple'
type: str
new_category_name: new_category_name:
description: description:
- The new name for an existing category. - The new name for an existing category.
- This value is used while updating an existing category. - This value is used while updating an existing category.
type: str
state: state:
description: description:
- The state of category. - The state of category.
@ -63,6 +67,7 @@ options:
- Process of updating category only allows name, description change. - Process of updating category only allows name, description change.
default: 'present' default: 'present'
choices: [ 'present', 'absent' ] choices: [ 'present', 'absent' ]
type: str
extends_documentation_fragment: vmware_rest_client.documentation extends_documentation_fragment: vmware_rest_client.documentation
''' '''

@ -33,20 +33,24 @@ options:
description: description:
- Name of ESXi server. This is required only if authentication against a vCenter is done. - Name of ESXi server. This is required only if authentication against a vCenter is done.
required: False required: False
type: str
dest: dest:
description: description:
- The destination where the ESXi configuration bundle will be saved. The I(dest) can be a folder or a file. - The destination where the ESXi configuration bundle will be saved. The I(dest) can be a folder or a file.
- If I(dest) is a folder, the backup file will be saved in the folder with the default filename generated from the ESXi server. - If I(dest) is a folder, the backup file will be saved in the folder with the default filename generated from the ESXi server.
- If I(dest) is a file, the backup file will be saved with that filename. The file extension will always be .tgz. - If I(dest) is a file, the backup file will be saved with that filename. The file extension will always be .tgz.
type: path
src: src:
description: description:
- The file containing the ESXi configuration that will be restored. - The file containing the ESXi configuration that will be restored.
type: path
state: state:
description: description:
- If C(saved), the .tgz backup bundle will be saved in I(dest). - If C(saved), the .tgz backup bundle will be saved in I(dest).
- If C(absent), the host configuration will be reset to default values. - If C(absent), the host configuration will be reset to default values.
- If C(loaded), the backup file in I(src) will be loaded to the ESXi host rewriting the hosts settings. - If C(loaded), the backup file in I(src) will be loaded to the ESXi host rewriting the hosts settings.
choices: [saved, absent, loaded] choices: [saved, absent, loaded]
type: str
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

@ -34,12 +34,14 @@ options:
- Datacenter to search for cluster/s. - Datacenter to search for cluster/s.
- This parameter is required, if C(cluster_name) is not supplied. - This parameter is required, if C(cluster_name) is not supplied.
required: False required: False
type: str
cluster_name: cluster_name:
description: description:
- Name of the cluster. - Name of the cluster.
- If set, facts of this cluster will be returned. - If set, facts of this cluster will be returned.
- This parameter is required, if C(datacenter) is not supplied. - This parameter is required, if C(datacenter) is not supplied.
required: False required: False
type: str
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

@ -34,11 +34,13 @@ options:
description: description:
- The name of the datacenter the cluster will be created in. - The name of the datacenter the cluster will be created in.
required: True required: True
type: str
state: state:
description: description:
- If the datacenter should be present or absent. - If the datacenter should be present or absent.
choices: [ present, absent ] choices: [ present, absent ]
default: present default: present
type: str
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

@ -38,15 +38,18 @@ options:
- Mutually exclusive with C(folder) parameter. - Mutually exclusive with C(folder) parameter.
required: False required: False
aliases: [ datacenter ] aliases: [ datacenter ]
type: str
datastore_cluster_name: datastore_cluster_name:
description: description:
- The name of the datastore cluster. - The name of the datastore cluster.
required: True required: True
type: str
state: state:
description: description:
- If the datastore cluster should be present or absent. - If the datastore cluster should be present or absent.
choices: [ present, absent ] choices: [ present, absent ]
default: present default: present
type: str
folder: folder:
description: description:
- Destination folder, absolute path to place datastore cluster in. - Destination folder, absolute path to place datastore cluster in.
@ -63,6 +66,7 @@ options:
- ' folder: /folder1/datacenter1/datastore/folder2' - ' folder: /folder1/datacenter1/datastore/folder2'
required: False required: False
version_added: '2.9' version_added: '2.9'
type: str
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

@ -35,18 +35,21 @@ options:
- Name of the datastore to match. - Name of the datastore to match.
- If set, facts of specific datastores are returned. - If set, facts of specific datastores are returned.
required: False required: False
type: str
datacenter: datacenter:
description: description:
- Datacenter to search for datastores. - Datacenter to search for datastores.
- This parameter is required, if C(cluster) is not supplied. - This parameter is required, if C(cluster) is not supplied.
required: False required: False
aliases: ['datacenter_name'] aliases: ['datacenter_name']
type: str
cluster: cluster:
description: description:
- Cluster to search for datastores. - Cluster to search for datastores.
- If set, facts of datastores belonging this clusters will be returned. - If set, facts of datastores belonging this clusters will be returned.
- This parameter is required, if C(datacenter) is not supplied. - This parameter is required, if C(datacenter) is not supplied.
required: False required: False
type: str
gather_nfs_mount_info: gather_nfs_mount_info:
description: description:
- Gather mount information of NFS datastores. - Gather mount information of NFS datastores.

@ -34,15 +34,18 @@ options:
description: description:
- Name of datastore to manage. - Name of datastore to manage.
- If C(datastore_cluster) or C(cluster_name) are not set, this parameter is required. - If C(datastore_cluster) or C(cluster_name) are not set, this parameter is required.
type: str
datastore_cluster: datastore_cluster:
description: description:
- Name of the datastore cluster from all child datastores to be managed. - Name of the datastore cluster from all child datastores to be managed.
- If C(datastore) or C(cluster_name) are not set, this parameter is required. - If C(datastore) or C(cluster_name) are not set, this parameter is required.
type: str
cluster_name: cluster_name:
description: description:
- Name of the cluster where datastore is connected to. - Name of the cluster where datastore is connected to.
- If multiple datastores are connected to the given cluster, then all datastores will be managed by C(state). - If multiple datastores are connected to the given cluster, then all datastores will be managed by C(state).
- If C(datastore) or C(datastore_cluster) are not set, this parameter is required. - If C(datastore) or C(datastore_cluster) are not set, this parameter is required.
type: str
state: state:
description: description:
- If set to C(present), then enter datastore into maintenance mode. - If set to C(present), then enter datastore into maintenance mode.
@ -52,6 +55,7 @@ options:
choices: [ present, absent ] choices: [ present, absent ]
default: present default: present
required: False required: False
type: str
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

@ -30,14 +30,17 @@ options:
description: description:
- The hostname that an ESXi host should be changed to. - The hostname that an ESXi host should be changed to.
required: True required: True
type: str
domainname: domainname:
description: description:
- The domain the ESXi host should be apart of. - The domain the ESXi host should be apart of.
required: True required: True
type: str
dns_servers: dns_servers:
description: description:
- The DNS servers that the host should be configured to use. - The DNS servers that the host should be configured to use.
required: True required: True
type: list
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

@ -29,21 +29,25 @@ options:
description: description:
- "Cluster to create vm/host group." - "Cluster to create vm/host group."
required: true required: true
type: str
datacenter: datacenter:
aliases: aliases:
- datacenter_name - datacenter_name
description: description:
- "Datacenter to search for given cluster. If not set, we use first cluster we encounter with C(cluster_name)." - "Datacenter to search for given cluster. If not set, we use first cluster we encounter with C(cluster_name)."
required: false required: false
type: str
group_name: group_name:
description: description:
- "The name of the group to create or remove." - "The name of the group to create or remove."
required: true required: true
type: str
hosts: hosts:
description: description:
- "List of hosts to create in group." - "List of hosts to create in group."
- "Required only if C(vms) is not set." - "Required only if C(vms) is not set."
required: false required: false
type: list
state: state:
choices: choices:
- present - present
@ -53,11 +57,13 @@ options:
- "If set to C(present) and the group doesn't exists then the group will be created." - "If set to C(present) and the group doesn't exists then the group will be created."
- "If set to C(absent) and the group exists then the group will be deleted." - "If set to C(absent) and the group exists then the group will be deleted."
required: true required: true
type: str
vms: vms:
description: description:
- "List of vms to create in group." - "List of vms to create in group."
- "Required only if C(hosts) is not set." - "Required only if C(hosts) is not set."
required: false required: false
type: list
requirements: requirements:
- "python >= 2.6" - "python >= 2.6"
- PyVmomi - PyVmomi
@ -256,7 +262,7 @@ class VmwareDrsGroupManager(PyVmomi):
def __set_vm_obj_list(self, vm_list=None, cluster_obj=None): def __set_vm_obj_list(self, vm_list=None, cluster_obj=None):
""" """
Function pupulate vm object list from list of vms Function populate vm object list from list of vms
Args: Args:
vm_list: List of vm names vm_list: List of vm names
@ -288,7 +294,7 @@ class VmwareDrsGroupManager(PyVmomi):
def __set_host_obj_list(self, host_list=None): def __set_host_obj_list(self, host_list=None):
""" """
Function pupulate host object list from list of hostnames Function populate host object list from list of hostnames
Args: Args:
host_list: List of host names host_list: List of host names

@ -31,12 +31,14 @@ options:
- "If set, facts of DRS groups belonging this cluster will be returned." - "If set, facts of DRS groups belonging this cluster will be returned."
- "Not needed if C(datacenter) is set." - "Not needed if C(datacenter) is set."
required: false required: false
type: str
datacenter: datacenter:
aliases: aliases:
- datacenter_name - datacenter_name
description: description:
- "Datacenter to search for DRS VM/Host groups." - "Datacenter to search for DRS VM/Host groups."
required: true required: true
type: str
requirements: requirements:
- "python >= 2.6" - "python >= 2.6"
- PyVmomi - PyVmomi

@ -34,11 +34,13 @@ options:
- Name of the cluster. - Name of the cluster.
- DRS facts for the given cluster will be returned. - DRS facts for the given cluster will be returned.
- This is required parameter if C(datacenter) parameter is not provided. - This is required parameter if C(datacenter) parameter is not provided.
type: str
datacenter: datacenter:
description: description:
- Name of the datacenter. - Name of the datacenter.
- DRS facts for all the clusters from the given datacenter will be returned. - DRS facts for all the clusters from the given datacenter will be returned.
- This is required parameter if C(cluster_name) parameter is not provided. - This is required parameter if C(cluster_name) parameter is not provided.
type: str
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

@ -37,20 +37,24 @@ options:
description: description:
- The ESXi hostname. - The ESXi hostname.
required: True required: True
type: str
switch_name: switch_name:
description: description:
- The name of the Distributed vSwitch. - The name of the Distributed vSwitch.
required: True required: True
type: str
vmnics: vmnics:
description: description:
- The ESXi hosts vmnics to use with the Distributed vSwitch. - The ESXi hosts vmnics to use with the Distributed vSwitch.
required: True required: True
type: list
state: state:
description: description:
- If the host should be present or absent attached to the vSwitch. - If the host should be present or absent attached to the vSwitch.
choices: [ present, absent ] choices: [ present, absent ]
required: True required: True
default: 'present' default: 'present'
type: str
vendor_specific_config: vendor_specific_config:
description: description:
- List of key,value dictionaries for the Vendor Specific Configuration. - List of key,value dictionaries for the Vendor Specific Configuration.
@ -59,6 +63,7 @@ options:
- '- C(value) (str): Value of setting. (default: None)' - '- C(value) (str): Value of setting. (default: None)'
required: False required: False
version_added: '2.9' version_added: '2.9'
type: list
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

@ -35,20 +35,24 @@ options:
description: description:
- The name of the portgroup that is to be created or deleted. - The name of the portgroup that is to be created or deleted.
required: True required: True
type: str
switch_name: switch_name:
description: description:
- The name of the distributed vSwitch the port group should be created on. - The name of the distributed vSwitch the port group should be created on.
required: True required: True
type: str
vlan_id: vlan_id:
description: description:
- The VLAN ID that should be configured with the portgroup, use 0 for no VLAN. - The VLAN ID that should be configured with the portgroup, use 0 for no VLAN.
- 'If C(vlan_trunk) is configured to be I(true), this can be a combination of multiple ranges and numbers, example: 1-200, 205, 400-4094.' - 'If C(vlan_trunk) is configured to be I(true), this can be a combination of multiple ranges and numbers, example: 1-200, 205, 400-4094.'
- The valid C(vlan_id) range is from 0 to 4094. Overlapping ranges are allowed. - The valid C(vlan_id) range is from 0 to 4094. Overlapping ranges are allowed.
required: True required: True
type: str
num_ports: num_ports:
description: description:
- The number of ports the portgroup should contain. - The number of ports the portgroup should contain.
required: True required: True
type: int
portgroup_type: portgroup_type:
description: description:
- See VMware KB 1022312 regarding portgroup types. - See VMware KB 1022312 regarding portgroup types.
@ -57,6 +61,7 @@ options:
- 'earlyBinding' - 'earlyBinding'
- 'lateBinding' - 'lateBinding'
- 'ephemeral' - 'ephemeral'
type: str
state: state:
description: description:
- Determines if the portgroup should be present or not. - Determines if the portgroup should be present or not.
@ -87,6 +92,7 @@ options:
forged_transmits: False, forged_transmits: False,
mac_changes: False, mac_changes: False,
} }
type: dict
teaming_policy: teaming_policy:
description: description:
- Dictionary which configures the different teaming values for portgroup. - Dictionary which configures the different teaming values for portgroup.
@ -105,6 +111,7 @@ options:
'inbound_policy': False, 'inbound_policy': False,
'rolling_order': False 'rolling_order': False
} }
type: dict
port_policy: port_policy:
description: description:
- Dictionary which configures the advanced policy settings for the portgroup. - Dictionary which configures the advanced policy settings for the portgroup.
@ -135,6 +142,7 @@ options:
'vlan_override': False, 'vlan_override': False,
'ipfix_override': False 'ipfix_override': False
} }
type: dict
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

@ -53,7 +53,7 @@ options:
- The version of the Distributed Switch to create. - The version of the Distributed Switch to create.
- Can be 6.0.0, 5.5.0, 5.1.0, 5.0.0 with a vCenter running vSphere 6.0 and 6.5. - Can be 6.0.0, 5.5.0, 5.1.0, 5.0.0 with a vCenter running vSphere 6.0 and 6.5.
- Can be 6.6.0, 6.5.0, 6.0.0 with a vCenter running vSphere 6.7. - Can be 6.6.0, 6.5.0, 6.0.0 with a vCenter running vSphere 6.7.
- The version must macht the version of the ESXi hosts you want to connect. - The version must match the version of the ESXi hosts you want to connect.
- The version of the vCenter server is used if not specified. - The version of the vCenter server is used if not specified.
- Required only if C(state) is set to C(present). - Required only if C(state) is set to C(present).
version_added: 2.5 version_added: 2.5
@ -114,7 +114,7 @@ options:
type: str type: str
contact: contact:
description: description:
- Dictionary which configures administrtor contact name and description for the Distributed Switch. - Dictionary which configures administrator contact name and description for the Distributed Switch.
- 'Valid attributes are:' - 'Valid attributes are:'
- '- C(name) (str): Administrator name.' - '- C(name) (str): Administrator name.'
- '- C(description) (str): Description or other details.' - '- C(description) (str): Description or other details.'

@ -35,6 +35,7 @@ options:
- The name of the Distributed Switch to manage. - The name of the Distributed Switch to manage.
required: True required: True
aliases: ['dvswitch'] aliases: ['dvswitch']
type: str
support_mode: support_mode:
description: description:
- The LACP support mode. - The LACP support mode.

@ -48,7 +48,7 @@ options:
secondary_pvlans: secondary_pvlans:
description: description:
- A list of VLAN IDs that should be configured as Secondary PVLANs. - A list of VLAN IDs that should be configured as Secondary PVLANs.
- 'C(primary_pvlans) need to be specified to create any Secodary PVLAN.' - 'C(primary_pvlans) need to be specified to create any Secondary PVLAN.'
- If C(primary_pvlans) isn't specified, all PVLANs will be deleted if present. - If C(primary_pvlans) isn't specified, all PVLANs will be deleted if present.
- Each member of the list requires primary_pvlan_id (int), secondary_pvlan_id (int), and pvlan_type (str) to be set. - Each member of the list requires primary_pvlan_id (int), secondary_pvlan_id (int), and pvlan_type (str) to be set.
- The type of the secondary PVLAN can be isolated or community. The secondary promiscuous PVLAN will be created automatically. - The type of the secondary PVLAN can be isolated or community. The secondary promiscuous PVLAN will be created automatically.

@ -64,6 +64,7 @@ options:
traffic_filter_override: False, traffic_filter_override: False,
} }
aliases: ['port_policy'] aliases: ['port_policy']
type: dict
vlan_trunk_range: vlan_trunk_range:
description: description:
- The VLAN trunk range that should be configured with the uplink portgroup. - The VLAN trunk range that should be configured with the uplink portgroup.
@ -82,6 +83,7 @@ options:
status: 'disabled', status: 'disabled',
mode: 'passive', mode: 'passive',
} }
type: dict
netflow_enabled: netflow_enabled:
description: description:
- Indicates if NetFlow is enabled on the uplink portgroup. - Indicates if NetFlow is enabled on the uplink portgroup.

@ -29,10 +29,12 @@ options:
description: description:
- Name of the virtual machine to export. - Name of the virtual machine to export.
- This is a required parameter, if parameter C(uuid) or C(moid) is not supplied. - This is a required parameter, if parameter C(uuid) or C(moid) is not supplied.
type: str
uuid: uuid:
description: description:
- Uuid of the virtual machine to export. - Uuid of the virtual machine to export.
- This is a required parameter, if parameter C(name) or C(moid) is not supplied. - This is a required parameter, if parameter C(name) or C(moid) is not supplied.
type: str
moid: moid:
description: description:
- Managed Object ID of the instance to manage if known, this is a unique identifier only within a single vCenter instance. - Managed Object ID of the instance to manage if known, this is a unique identifier only within a single vCenter instance.
@ -44,6 +46,7 @@ options:
description: description:
- Datacenter name of the virtual machine to export. - Datacenter name of the virtual machine to export.
- This parameter is case sensitive. - This parameter is case sensitive.
type: str
folder: folder:
description: description:
- Destination folder, absolute path to find the specified guest. - Destination folder, absolute path to find the specified guest.
@ -61,11 +64,13 @@ options:
- ' folder: /folder1/datacenter1/vm' - ' folder: /folder1/datacenter1/vm'
- ' folder: folder1/datacenter1/vm' - ' folder: folder1/datacenter1/vm'
- ' folder: /folder1/datacenter1/vm/folder2' - ' folder: /folder1/datacenter1/vm/folder2'
type: str
export_dir: export_dir:
description: description:
- Absolute path to place the exported files on the server running this task, must have write permission. - Absolute path to place the exported files on the server running this task, must have write permission.
- If folder not exist will create it, also create a folder under this path named with VM name. - If folder not exist will create it, also create a folder under this path named with VM name.
required: yes required: yes
type: str
export_with_images: export_with_images:
default: false default: false
description: description:

@ -34,10 +34,12 @@ options:
description: description:
- Name of the VM to work with. - Name of the VM to work with.
- This is required if C(uuid) or C(moid) parameter is not supplied. - This is required if C(uuid) or C(moid) parameter is not supplied.
type: str
uuid: uuid:
description: description:
- UUID of the instance to manage if known, this is VMware's BIOS UUID by default. - UUID of the instance to manage if known, this is VMware's BIOS UUID by default.
- This is required if C(name) or C(moid) parameter is not supplied. - This is required if C(name) or C(moid) parameter is not supplied.
type: str
moid: moid:
description: description:
- Managed Object ID of the instance to manage if known, this is a unique identifier only within a single vCenter instance. - Managed Object ID of the instance to manage if known, this is a unique identifier only within a single vCenter instance.
@ -55,6 +57,7 @@ options:
- If multiple virtual machines matching the name, use the first or last found. - If multiple virtual machines matching the name, use the first or last found.
default: 'first' default: 'first'
choices: ['first', 'last'] choices: ['first', 'last']
type: str
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

@ -34,10 +34,12 @@ options:
description: description:
- Name of the VM to work with. - Name of the VM to work with.
- This is required if C(uuid) or C(moid) parameter is not supplied. - This is required if C(uuid) or C(moid) parameter is not supplied.
type: str
uuid: uuid:
description: description:
- UUID of the instance to manage if known, this is VMware's BIOS UUID by default. - UUID of the instance to manage if known, this is VMware's BIOS UUID by default.
- This is required if C(name) or C(moid) parameter is not supplied. - This is required if C(name) or C(moid) parameter is not supplied.
type: str
moid: moid:
description: description:
- Managed Object ID of the instance to manage if known, this is a unique identifier only within a single vCenter instance. - Managed Object ID of the instance to manage if known, this is a unique identifier only within a single vCenter instance.
@ -54,15 +56,18 @@ options:
description: description:
- List of the boot devices. - List of the boot devices.
default: [] default: []
type: list
name_match: name_match:
description: description:
- If multiple virtual machines matching the name, use the first or last found. - If multiple virtual machines matching the name, use the first or last found.
default: 'first' default: 'first'
choices: ['first', 'last'] choices: ['first', 'last']
type: str
boot_delay: boot_delay:
description: description:
- Delay in milliseconds before starting the boot sequence. - Delay in milliseconds before starting the boot sequence.
default: 0 default: 0
type: int
enter_bios_setup: enter_bios_setup:
description: description:
- If set to C(True), the virtual machine automatically enters BIOS setup the next time it boots. - If set to C(True), the virtual machine automatically enters BIOS setup the next time it boots.
@ -80,10 +85,12 @@ options:
- Specify the time in milliseconds between virtual machine boot failure and subsequent attempt to boot again. - Specify the time in milliseconds between virtual machine boot failure and subsequent attempt to boot again.
- If set, will automatically set C(boot_retry_enabled) to C(True) as this parameter is required. - If set, will automatically set C(boot_retry_enabled) to C(True) as this parameter is required.
default: 0 default: 0
type: int
boot_firmware: boot_firmware:
description: description:
- Choose which firmware should be used to boot the virtual machine. - Choose which firmware should be used to boot the virtual machine.
choices: ["bios", "efi"] choices: ["bios", "efi"]
type: str
secure_boot_enabled: secure_boot_enabled:
description: description:
- Choose if EFI secure boot should be enabled. EFI secure boot can only be enabled with boot_firmware = efi - Choose if EFI secure boot should be enabled. EFI secure boot can only be enabled with boot_firmware = efi

@ -36,6 +36,7 @@ options:
- Name of the custom attribute definition. - Name of the custom attribute definition.
- This is required parameter, if C(state) is set to C(present) or C(absent). - This is required parameter, if C(state) is set to C(present) or C(absent).
required: False required: False
type: str
state: state:
description: description:
- Manage definition of custom attributes. - Manage definition of custom attributes.
@ -46,6 +47,7 @@ options:
default: 'present' default: 'present'
choices: ['present', 'absent'] choices: ['present', 'absent']
required: True required: True
type: str
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

@ -38,6 +38,7 @@ options:
- Name of the virtual machine to work with. - Name of the virtual machine to work with.
- This is required parameter, if C(uuid) or C(moid) is not supplied. - This is required parameter, if C(uuid) or C(moid) is not supplied.
required: True required: True
type: str
state: state:
description: description:
- The action to take. - The action to take.
@ -45,10 +46,12 @@ options:
- If set to C(absent), then custom attribute is removed. - If set to C(absent), then custom attribute is removed.
default: 'present' default: 'present'
choices: ['present', 'absent'] choices: ['present', 'absent']
type: str
uuid: uuid:
description: description:
- UUID of the virtual machine to manage if known. This is VMware's unique identifier. - UUID of the virtual machine to manage if known. This is VMware's unique identifier.
- This is required parameter, if C(name) or C(moid) is not supplied. - This is required parameter, if C(name) or C(moid) is not supplied.
type: str
moid: moid:
description: description:
- Managed Object ID of the instance to manage if known, this is a unique identifier only within a single vCenter instance. - Managed Object ID of the instance to manage if known, this is a unique identifier only within a single vCenter instance.
@ -65,15 +68,18 @@ options:
description: description:
- Absolute path to find an existing guest. - Absolute path to find an existing guest.
- This is required parameter, if C(name) is supplied and multiple virtual machines with same name are found. - This is required parameter, if C(name) is supplied and multiple virtual machines with same name are found.
type: str
datacenter: datacenter:
description: description:
- Datacenter name where the virtual machine is located in. - Datacenter name where the virtual machine is located in.
required: True required: True
type: str
attributes: attributes:
description: description:
- A list of name and value of custom attributes that needs to be manage. - A list of name and value of custom attributes that needs to be manage.
- Value of custom attribute is not required and will be ignored, if C(state) is set to C(absent). - Value of custom attribute is not required and will be ignored, if C(state) is set to C(absent).
default: [] default: []
type: list
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

@ -34,6 +34,7 @@ options:
description: description:
- Name of customization specification to find. - Name of customization specification to find.
required: False required: False
type: str
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

@ -37,10 +37,12 @@ options:
description: description:
- Name of the virtual machine. - Name of the virtual machine.
- This is a required parameter, if parameter C(uuid) or C(moid) is not supplied. - This is a required parameter, if parameter C(uuid) or C(moid) is not supplied.
type: str
uuid: uuid:
description: description:
- UUID of the instance to gather facts if known, this is VMware's unique identifier. - UUID of the instance to gather facts if known, this is VMware's unique identifier.
- This is a required parameter, if parameter C(name) or C(moid) is not supplied. - This is a required parameter, if parameter C(name) or C(moid) is not supplied.
type: str
moid: moid:
description: description:
- Managed Object ID of the instance to manage if known, this is a unique identifier only within a single vCenter instance. - Managed Object ID of the instance to manage if known, this is a unique identifier only within a single vCenter instance.
@ -62,10 +64,12 @@ options:
- ' folder: /folder1/datacenter1/vm' - ' folder: /folder1/datacenter1/vm'
- ' folder: folder1/datacenter1/vm' - ' folder: folder1/datacenter1/vm'
- ' folder: /folder1/datacenter1/vm/folder2' - ' folder: /folder1/datacenter1/vm/folder2'
type: str
datacenter: datacenter:
description: description:
- The datacenter name to which virtual machine belongs to. - The datacenter name to which virtual machine belongs to.
required: True required: True
type: str
use_instance_uuid: use_instance_uuid:
description: description:
- Whether to use the VMware instance UUID rather than the BIOS UUID. - Whether to use the VMware instance UUID rather than the BIOS UUID.
@ -102,6 +106,7 @@ options:
- ' If C(state) is set to C(present) and disk exists with different size, disk size is increased.' - ' If C(state) is set to C(present) and disk exists with different size, disk size is increased.'
- ' Reducing disk size is not allowed.' - ' Reducing disk size is not allowed.'
default: [] default: []
type: list
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

@ -37,10 +37,12 @@ options:
description: description:
- Name of the virtual machine. - Name of the virtual machine.
- This is required parameter, if parameter C(uuid) or C(moid) is not supplied. - This is required parameter, if parameter C(uuid) or C(moid) is not supplied.
type: str
uuid: uuid:
description: description:
- UUID of the instance to gather facts if known, this is VMware's unique identifier. - UUID of the instance to gather facts if known, this is VMware's unique identifier.
- This is required parameter, if parameter C(name) or C(moid) is not supplied. - This is required parameter, if parameter C(name) or C(moid) is not supplied.
type: str
moid: moid:
description: description:
- Managed Object ID of the instance to manage if known, this is a unique identifier only within a single vCenter instance. - Managed Object ID of the instance to manage if known, this is a unique identifier only within a single vCenter instance.
@ -68,10 +70,12 @@ options:
- ' folder: /folder1/datacenter1/vm' - ' folder: /folder1/datacenter1/vm'
- ' folder: folder1/datacenter1/vm' - ' folder: folder1/datacenter1/vm'
- ' folder: /folder1/datacenter1/vm/folder2' - ' folder: /folder1/datacenter1/vm/folder2'
type: str
datacenter: datacenter:
description: description:
- The datacenter name to which virtual machine belongs to. - The datacenter name to which virtual machine belongs to.
required: True required: True
type: str
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

@ -35,15 +35,18 @@ options:
description: description:
- Name of the VM to work with - Name of the VM to work with
- This is required if C(uuid) or C(moid) is not supplied. - This is required if C(uuid) or C(moid) is not supplied.
type: str
name_match: name_match:
description: description:
- If multiple VMs matching the name, use the first or last found - If multiple VMs matching the name, use the first or last found
default: 'first' default: 'first'
choices: ['first', 'last'] choices: ['first', 'last']
type: str
uuid: uuid:
description: description:
- UUID of the instance to manage if known, this is VMware's unique identifier. - UUID of the instance to manage if known, this is VMware's unique identifier.
- This is required if C(name) or C(moid) is not supplied. - This is required if C(name) or C(moid) is not supplied.
type: str
use_instance_uuid: use_instance_uuid:
description: description:
- Whether to use the VMware instance UUID rather than the BIOS UUID. - Whether to use the VMware instance UUID rather than the BIOS UUID.
@ -71,10 +74,12 @@ options:
- ' folder: /folder1/datacenter1/vm' - ' folder: /folder1/datacenter1/vm'
- ' folder: folder1/datacenter1/vm' - ' folder: folder1/datacenter1/vm'
- ' folder: /folder1/datacenter1/vm/folder2' - ' folder: /folder1/datacenter1/vm/folder2'
type: str
datacenter: datacenter:
description: description:
- Destination datacenter for the deploy operation - Destination datacenter for the deploy operation
required: True required: True
type: str
tags: tags:
description: description:
- Whether to show tags or not. - Whether to show tags or not.

@ -34,10 +34,12 @@ options:
description: description:
- The datacenter hosting the virtual machine. - The datacenter hosting the virtual machine.
- If set, it will help to speed up virtual machine search. - If set, it will help to speed up virtual machine search.
type: str
cluster: cluster:
description: description:
- The cluster hosting the virtual machine. - The cluster hosting the virtual machine.
- If set, it will help to speed up virtual machine search. - If set, it will help to speed up virtual machine search.
type: str
folder: folder:
description: description:
- Destination folder, absolute path to find an existing guest or create the new guest. - Destination folder, absolute path to find an existing guest or create the new guest.
@ -55,10 +57,12 @@ options:
- ' folder: /folder1/datacenter1/vm/folder2' - ' folder: /folder1/datacenter1/vm/folder2'
- ' folder: vm/folder2' - ' folder: vm/folder2'
- ' folder: folder2' - ' folder: folder2'
type: str
vm_id: vm_id:
description: description:
- Name of the virtual machine to work with. - Name of the virtual machine to work with.
required: True required: True
type: str
vm_id_type: vm_id_type:
description: description:
- The VMware identification method by which the virtual machine will be identified. - The VMware identification method by which the virtual machine will be identified.
@ -69,14 +73,17 @@ options:
- 'dns_name' - 'dns_name'
- 'inventory_path' - 'inventory_path'
- 'vm_name' - 'vm_name'
type: str
vm_username: vm_username:
description: description:
- The user to login in to the virtual machine. - The user to login in to the virtual machine.
required: True required: True
type: str
vm_password: vm_password:
description: description:
- The password used to login-in to the virtual machine. - The password used to login-in to the virtual machine.
required: True required: True
type: str
directory: directory:
description: description:
- Create or delete a directory. - Create or delete a directory.
@ -90,6 +97,7 @@ options:
- ' suffix (str): temporary directory suffix (required for mktemp)' - ' suffix (str): temporary directory suffix (required for mktemp)'
- ' recurse (boolean): Not required, default (false)' - ' recurse (boolean): Not required, default (false)'
required: False required: False
type: dict
copy: copy:
description: description:
- Copy file to vm without requiring network. - Copy file to vm without requiring network.
@ -98,6 +106,7 @@ options:
- ' dest: file destination, path must be exist' - ' dest: file destination, path must be exist'
- ' overwrite: False or True (not required, default False)' - ' overwrite: False or True (not required, default False)'
required: False required: False
type: dict
fetch: fetch:
description: description:
- Get file from virtual machine without requiring network. - Get file from virtual machine without requiring network.
@ -105,6 +114,7 @@ options:
- ' src: The file on the remote system to fetch. This I(must) be a file, not a directory' - ' src: The file on the remote system to fetch. This I(must) be a file, not a directory'
- ' dest: file destination on localhost, path must be exist' - ' dest: file destination on localhost, path must be exist'
required: False required: False
type: dict
version_added: 2.5 version_added: 2.5
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation

@ -32,10 +32,12 @@ options:
description: description:
- Name of the VM to work with. - Name of the VM to work with.
- This is required if C(uuid) parameter is not supplied. - This is required if C(uuid) parameter is not supplied.
type: str
uuid: uuid:
description: description:
- UUID of the instance to manage if known, this is VMware's BIOS UUID by default. - UUID of the instance to manage if known, this is VMware's BIOS UUID by default.
- This is required if C(name) parameter is not supplied. - This is required if C(name) parameter is not supplied.
type: str
use_instance_uuid: use_instance_uuid:
description: description:
- Whether to use the VMware instance UUID rather than the BIOS UUID. - Whether to use the VMware instance UUID rather than the BIOS UUID.
@ -46,6 +48,7 @@ options:
description: description:
- Destination datacenter for the find operation. - Destination datacenter for the find operation.
- Deprecated in 2.5, will be removed in 2.9 release. - Deprecated in 2.5, will be removed in 2.9 release.
type: str
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

@ -33,10 +33,12 @@ options:
description: description:
- Name of the existing virtual machine to move. - Name of the existing virtual machine to move.
- This is required if C(uuid) or C(moid) is not supplied. - This is required if C(uuid) or C(moid) is not supplied.
type: str
uuid: uuid:
description: description:
- UUID of the virtual machine to manage if known, this is VMware's unique identifier. - UUID of the virtual machine to manage if known, this is VMware's unique identifier.
- This is required if C(name) or C(moid) is not supplied. - This is required if C(name) or C(moid) is not supplied.
type: str
moid: moid:
description: description:
- Managed Object ID of the instance to manage if known, this is a unique identifier only within a single vCenter instance. - Managed Object ID of the instance to manage if known, this is a unique identifier only within a single vCenter instance.
@ -54,6 +56,7 @@ options:
- If multiple virtual machines matching the name, use the first or last found. - If multiple virtual machines matching the name, use the first or last found.
default: 'first' default: 'first'
choices: [ first, last ] choices: [ first, last ]
type: str
dest_folder: dest_folder:
description: description:
- Absolute path to move an existing guest - Absolute path to move an existing guest
@ -70,10 +73,12 @@ options:
- ' dest_folder: folder1/datacenter1/vm' - ' dest_folder: folder1/datacenter1/vm'
- ' dest_folder: /folder1/datacenter1/vm/folder2' - ' dest_folder: /folder1/datacenter1/vm/folder2'
required: True required: True
type: str
datacenter: datacenter:
description: description:
- Destination datacenter for the move operation - Destination datacenter for the move operation
required: True required: True
type: str
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

@ -29,19 +29,23 @@ options:
- Set the state of the virtual machine. - Set the state of the virtual machine.
choices: [ powered-off, powered-on, reboot-guest, restarted, shutdown-guest, suspended, present] choices: [ powered-off, powered-on, reboot-guest, restarted, shutdown-guest, suspended, present]
default: present default: present
type: str
name: name:
description: description:
- Name of the virtual machine to work with. - Name of the virtual machine to work with.
- Virtual machine names in vCenter are not necessarily unique, which may be problematic, see C(name_match). - Virtual machine names in vCenter are not necessarily unique, which may be problematic, see C(name_match).
type: str
name_match: name_match:
description: description:
- If multiple virtual machines matching the name, use the first or last found. - If multiple virtual machines matching the name, use the first or last found.
default: first default: first
choices: [ first, last ] choices: [ first, last ]
type: str
uuid: uuid:
description: description:
- UUID of the instance to manage if known, this is VMware's unique identifier. - UUID of the instance to manage if known, this is VMware's unique identifier.
- This is required if C(name) or C(moid) is not supplied. - This is required if C(name) or C(moid) is not supplied.
type: str
moid: moid:
description: description:
- Managed Object ID of the instance to manage if known, this is a unique identifier only within a single vCenter instance. - Managed Object ID of the instance to manage if known, this is a unique identifier only within a single vCenter instance.
@ -68,11 +72,13 @@ options:
- ' folder: /folder1/datacenter1/vm' - ' folder: /folder1/datacenter1/vm'
- ' folder: folder1/datacenter1/vm' - ' folder: folder1/datacenter1/vm'
- ' folder: /folder1/datacenter1/vm/folder2' - ' folder: /folder1/datacenter1/vm/folder2'
type: str
scheduled_at: scheduled_at:
description: description:
- Date and time in string format at which specificed task needs to be performed. - Date and time in string format at which specificed task needs to be performed.
- "The required format for date and time - 'dd/mm/yyyy hh:mm'." - "The required format for date and time - 'dd/mm/yyyy hh:mm'."
- Scheduling task requires vCenter server. A standalone ESXi server does not support this option. - Scheduling task requires vCenter server. A standalone ESXi server does not support this option.
type: str
schedule_task_name: schedule_task_name:
description: description:
- Name of schedule task. - Name of schedule task.
@ -108,6 +114,7 @@ options:
- The value sets a timeout in seconds for the module to wait for the state change. - The value sets a timeout in seconds for the module to wait for the state change.
default: 0 default: 0
version_added: '2.6' version_added: '2.6'
type: int
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

@ -41,19 +41,23 @@ options:
required: True required: True
choices: ['present', 'absent', 'revert', 'remove_all'] choices: ['present', 'absent', 'revert', 'remove_all']
default: 'present' default: 'present'
type: str
name: name:
description: description:
- Name of the virtual machine to work with. - Name of the virtual machine to work with.
- This is required parameter, if C(uuid) or C(moid) is not supplied. - This is required parameter, if C(uuid) or C(moid) is not supplied.
type: str
name_match: name_match:
description: description:
- If multiple VMs matching the name, use the first or last found. - If multiple VMs matching the name, use the first or last found.
default: 'first' default: 'first'
choices: ['first', 'last'] choices: ['first', 'last']
type: str
uuid: uuid:
description: description:
- UUID of the instance to manage if known, this is VMware's BIOS UUID by default. - UUID of the instance to manage if known, this is VMware's BIOS UUID by default.
- This is required if C(name) or C(moid) parameter is not supplied. - This is required if C(name) or C(moid) parameter is not supplied.
type: str
moid: moid:
description: description:
- Managed Object ID of the instance to manage if known, this is a unique identifier only within a single vCenter instance. - Managed Object ID of the instance to manage if known, this is a unique identifier only within a single vCenter instance.
@ -81,18 +85,22 @@ options:
- ' folder: /folder1/datacenter1/vm' - ' folder: /folder1/datacenter1/vm'
- ' folder: folder1/datacenter1/vm' - ' folder: folder1/datacenter1/vm'
- ' folder: /folder1/datacenter1/vm/folder2' - ' folder: /folder1/datacenter1/vm/folder2'
type: str
datacenter: datacenter:
description: description:
- Destination datacenter for the deploy operation. - Destination datacenter for the deploy operation.
required: True required: True
type: str
snapshot_name: snapshot_name:
description: description:
- Sets the snapshot name to manage. - Sets the snapshot name to manage.
- This param is required only if state is not C(remove_all) - This param is required only if state is not C(remove_all)
type: str
description: description:
description: description:
- Define an arbitrary description to attach to snapshot. - Define an arbitrary description to attach to snapshot.
default: '' default: ''
type: str
quiesce: quiesce:
description: description:
- If set to C(true) and virtual machine is powered on, it will quiesce the file system in virtual machine. - If set to C(true) and virtual machine is powered on, it will quiesce the file system in virtual machine.
@ -123,10 +131,12 @@ options:
description: description:
- Value to rename the existing snapshot to. - Value to rename the existing snapshot to.
version_added: "2.5" version_added: "2.5"
type: str
new_description: new_description:
description: description:
- Value to change the description of an existing snapshot to. - Value to change the description of an existing snapshot to.
version_added: "2.5" version_added: "2.5"
type: str
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

@ -33,11 +33,13 @@ options:
description: description:
- Name of the VM to work with. - Name of the VM to work with.
- This is required if C(uuid) or C(moid) is not supplied. - This is required if C(uuid) or C(moid) is not supplied.
type: str
uuid: uuid:
description: description:
- UUID of the instance to manage if known, this is VMware's BIOS UUID by default. - UUID of the instance to manage if known, this is VMware's BIOS UUID by default.
- This is required if C(name) or C(moid) parameter is not supplied. - This is required if C(name) or C(moid) parameter is not supplied.
- The C(folder) is ignored, if C(uuid) is provided. - The C(folder) is ignored, if C(uuid) is provided.
type: str
moid: moid:
description: description:
- Managed Object ID of the instance to manage if known, this is a unique identifier only within a single vCenter instance. - Managed Object ID of the instance to manage if known, this is a unique identifier only within a single vCenter instance.
@ -65,10 +67,12 @@ options:
- ' folder: /folder1/datacenter1/vm' - ' folder: /folder1/datacenter1/vm'
- ' folder: folder1/datacenter1/vm' - ' folder: folder1/datacenter1/vm'
- ' folder: /folder1/datacenter1/vm/folder2' - ' folder: /folder1/datacenter1/vm/folder2'
type: str
datacenter: datacenter:
description: description:
- Name of the datacenter. - Name of the datacenter.
required: True required: True
type: str
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

@ -31,15 +31,18 @@ options:
description: description:
- Name of the virtual machine to work with. - Name of the virtual machine to work with.
- This is required if C(uuid) or C(moid) is not supplied. - This is required if C(uuid) or C(moid) is not supplied.
type: str
name_match: name_match:
description: description:
- If multiple virtual machines matching the name, use the first or last found. - If multiple virtual machines matching the name, use the first or last found.
default: 'first' default: 'first'
choices: ['first', 'last'] choices: ['first', 'last']
type: str
uuid: uuid:
description: description:
- UUID of the instance to manage if known, this is VMware's unique identifier. - UUID of the instance to manage if known, this is VMware's unique identifier.
- This is required if C(name) or C(moid) is not supplied. - This is required if C(name) or C(moid) is not supplied.
type: str
moid: moid:
description: description:
- Managed Object ID of the instance to manage if known, this is a unique identifier only within a single vCenter instance. - Managed Object ID of the instance to manage if known, this is a unique identifier only within a single vCenter instance.
@ -61,10 +64,12 @@ options:
- ' folder: /folder1/datacenter1/vm' - ' folder: /folder1/datacenter1/vm'
- ' folder: folder1/datacenter1/vm' - ' folder: folder1/datacenter1/vm'
- ' folder: /folder1/datacenter1/vm/folder2' - ' folder: /folder1/datacenter1/vm/folder2'
type: str
datacenter: datacenter:
description: description:
- Destination datacenter where the virtual machine exists. - Destination datacenter where the virtual machine exists.
required: True required: True
type: str
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
author: author:
- Mike Klebolt (@MikeKlebolt) <michael.klebolt@centurylink.com> - Mike Klebolt (@MikeKlebolt) <michael.klebolt@centurylink.com>

@ -32,11 +32,13 @@ options:
description: description:
- Name of the VM for which to wait until the tools become available. - Name of the VM for which to wait until the tools become available.
- This is required if C(uuid) or C(moid) is not supplied. - This is required if C(uuid) or C(moid) is not supplied.
type: str
name_match: name_match:
description: description:
- If multiple VMs match the name, use the first or last found. - If multiple VMs match the name, use the first or last found.
default: 'first' default: 'first'
choices: ['first', 'last'] choices: ['first', 'last']
type: str
folder: folder:
description: description:
- Destination folder, absolute or relative path to find an existing guest. - Destination folder, absolute or relative path to find an existing guest.
@ -52,10 +54,12 @@ options:
- ' folder: /folder1/datacenter1/vm' - ' folder: /folder1/datacenter1/vm'
- ' folder: folder1/datacenter1/vm' - ' folder: folder1/datacenter1/vm'
- ' folder: /folder1/datacenter1/vm/folder2' - ' folder: /folder1/datacenter1/vm/folder2'
type: str
uuid: uuid:
description: description:
- UUID of the VM for which to wait until the tools become available, if known. This is VMware's unique identifier. - UUID of the VM for which to wait until the tools become available, if known. This is VMware's unique identifier.
- This is required, if C(name) or C(moid) is not supplied. - This is required, if C(name) or C(moid) is not supplied.
type: str
moid: moid:
description: description:
- Managed Object ID of the instance to manage if known, this is a unique identifier only within a single vCenter instance. - Managed Object ID of the instance to manage if known, this is a unique identifier only within a single vCenter instance.

@ -33,10 +33,12 @@ options:
description: description:
- Name of the virtual machine. - Name of the virtual machine.
- This is a required parameter, if parameter C(uuid) or C(moid) is not supplied. - This is a required parameter, if parameter C(uuid) or C(moid) is not supplied.
type: str
uuid: uuid:
description: description:
- UUID of the instance to gather facts if known, this is VMware's unique identifier. - UUID of the instance to gather facts if known, this is VMware's unique identifier.
- This is a required parameter, if parameter C(name) or C(moid) is not supplied. - This is a required parameter, if parameter C(name) or C(moid) is not supplied.
type: str
moid: moid:
description: description:
- Managed Object ID of the instance to manage if known, this is a unique identifier only within a single vCenter instance. - Managed Object ID of the instance to manage if known, this is a unique identifier only within a single vCenter instance.
@ -58,11 +60,13 @@ options:
- ' folder: /folder1/datacenter1/vm' - ' folder: /folder1/datacenter1/vm'
- ' folder: folder1/datacenter1/vm' - ' folder: folder1/datacenter1/vm'
- ' folder: /folder1/datacenter1/vm/folder2' - ' folder: /folder1/datacenter1/vm/folder2'
type: str
datacenter: datacenter:
default: ha-datacenter default: ha-datacenter
description: description:
- The datacenter name to which virtual machine belongs to. - The datacenter name to which virtual machine belongs to.
- This parameter is case sensitive. - This parameter is case sensitive.
type: str
gather_video_facts: gather_video_facts:
description: description:
- If set to True, return settings of the video card, other attributes are ignored. - If set to True, return settings of the video card, other attributes are ignored.
@ -77,11 +81,13 @@ options:
display_number: display_number:
description: description:
- The number of display. Valid value from 1 to 10. The maximum display number is 4 on vCenter 6.0, 6.5 web UI. - The number of display. Valid value from 1 to 10. The maximum display number is 4 on vCenter 6.0, 6.5 web UI.
type: int
video_memory_mb: video_memory_mb:
description: description:
- 'Valid total MB of video memory range of virtual machine is from 1.172 MB to 256 MB on ESXi 6.7U1, - 'Valid total MB of video memory range of virtual machine is from 1.172 MB to 256 MB on ESXi 6.7U1,
from 1.172 MB to 128 MB on ESXi 6.7 and previous versions.' from 1.172 MB to 128 MB on ESXi 6.7 and previous versions.'
- For specific guest OS, supported minimum and maximum video memory are different, please be careful on setting this. - For specific guest OS, supported minimum and maximum video memory are different, please be careful on setting this.
type: float
enable_3D: enable_3D:
description: description:
- Enable 3D for guest operating systems on which VMware supports 3D. - Enable 3D for guest operating systems on which VMware supports 3D.
@ -92,9 +98,11 @@ options:
- 'If set to C(software), uses normal CPU processing for 3D calculations.' - 'If set to C(software), uses normal CPU processing for 3D calculations.'
- 'If set to C(hardware), requires graphics hardware (GPU) for faster 3D calculations.' - 'If set to C(hardware), requires graphics hardware (GPU) for faster 3D calculations.'
choices: [ automatic, software, hardware ] choices: [ automatic, software, hardware ]
type: str
memory_3D_mb: memory_3D_mb:
description: description:
- The value of 3D Memory must be power of 2 and valid value is from 32 MB to 2048 MB. - The value of 3D Memory must be power of 2 and valid value is from 32 MB to 2048 MB.
type: int
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

@ -31,28 +31,33 @@ options:
- Destination datacenter for the deploy operation. - Destination datacenter for the deploy operation.
- This parameter is case sensitive. - This parameter is case sensitive.
default: ha-datacenter default: ha-datacenter
type: str
state: state:
description: description:
- Set the state of VNC on virtual machine. - Set the state of VNC on virtual machine.
choices: [present, absent] choices: [present, absent]
default: present default: present
required: false required: false
type: str
name: name:
description: description:
- Name of the virtual machine to work with. - Name of the virtual machine to work with.
- Virtual machine names in vCenter are not necessarily unique, which may be problematic, see C(name_match). - Virtual machine names in vCenter are not necessarily unique, which may be problematic, see C(name_match).
required: false required: false
type: str
name_match: name_match:
description: description:
- If multiple virtual machines matching the name, use the first or last found. - If multiple virtual machines matching the name, use the first or last found.
default: first default: first
choices: [first, last] choices: [first, last]
required: false required: false
type: str
uuid: uuid:
description: description:
- UUID of the instance to manage if known, this is VMware's unique identifier. - UUID of the instance to manage if known, this is VMware's unique identifier.
- This is required, if C(name) or C(moid) is not supplied. - This is required, if C(name) or C(moid) is not supplied.
required: false required: false
type: str
moid: moid:
description: description:
- Managed Object ID of the instance to manage if known, this is a unique identifier only within a single vCenter instance. - Managed Object ID of the instance to manage if known, this is a unique identifier only within a single vCenter instance.
@ -64,24 +69,28 @@ options:
- Destination folder, absolute or relative path to find an existing guest. - Destination folder, absolute or relative path to find an existing guest.
- The folder should include the datacenter. ESX's datacenter is ha-datacenter - The folder should include the datacenter. ESX's datacenter is ha-datacenter
required: false required: false
type: str
vnc_ip: vnc_ip:
description: description:
- Sets an IP for VNC on virtual machine. - Sets an IP for VNC on virtual machine.
- This is required only when I(state) is set to present and will be ignored if I(state) is absent. - This is required only when I(state) is set to present and will be ignored if I(state) is absent.
default: 0.0.0.0 default: 0.0.0.0
required: false required: false
type: str
vnc_port: vnc_port:
description: description:
- The port that VNC listens on. Usually a number between 5900 and 7000 depending on your config. - The port that VNC listens on. Usually a number between 5900 and 7000 depending on your config.
- This is required only when I(state) is set to present and will be ignored if I(state) is absent. - This is required only when I(state) is set to present and will be ignored if I(state) is absent.
default: 0 default: 0
required: false required: false
type: int
vnc_password: vnc_password:
description: description:
- Sets a password for VNC on virtual machine. - Sets a password for VNC on virtual machine.
- This is required only when I(state) is set to present and will be ignored if I(state) is absent. - This is required only when I(state) is set to present and will be ignored if I(state) is absent.
default: "" default: ""
required: false required: false
type: str
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

@ -35,11 +35,13 @@ options:
- Name of the cluster. - Name of the cluster.
- Acceptance level of all ESXi host system in the given cluster will be managed. - Acceptance level of all ESXi host system in the given cluster will be managed.
- If C(esxi_hostname) is not given, this parameter is required. - If C(esxi_hostname) is not given, this parameter is required.
type: str
esxi_hostname: esxi_hostname:
description: description:
- ESXi hostname. - ESXi hostname.
- Acceptance level of this ESXi host system will be managed. - Acceptance level of this ESXi host system will be managed.
- If C(cluster_name) is not given, this parameter is required. - If C(cluster_name) is not given, this parameter is required.
type: str
state: state:
description: description:
- Set or list acceptance level of the given ESXi host. - Set or list acceptance level of the given ESXi host.
@ -48,6 +50,7 @@ options:
choices: [ list, present ] choices: [ list, present ]
required: False required: False
default: 'list' default: 'list'
type: str
acceptance_level: acceptance_level:
description: description:
- Name of acceptance level. - Name of acceptance level.
@ -57,6 +60,7 @@ options:
- If set to C(community), then accept all VIBs, even those that are not signed. - If set to C(community), then accept all VIBs, even those that are not signed.
choices: [ community, partner, vmware_accepted, vmware_certified ] choices: [ community, partner, vmware_accepted, vmware_certified ]
required: False required: False
type: str
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

@ -32,10 +32,12 @@ options:
description: description:
- Name of the cluster from all host systems to be used for facts gathering. - Name of the cluster from all host systems to be used for facts gathering.
- If C(esxi_hostname) is not given, this parameter is required. - If C(esxi_hostname) is not given, this parameter is required.
type: str
esxi_hostname: esxi_hostname:
description: description:
- ESXi hostname to gather facts from. - ESXi hostname to gather facts from.
- If C(cluster_name) is not given, this parameter is required. - If C(cluster_name) is not given, this parameter is required.
type: str
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

@ -32,10 +32,12 @@ options:
description: description:
- Name of the cluster from which the ESXi host belong to. - Name of the cluster from which the ESXi host belong to.
- If C(esxi_hostname) is not given, this parameter is required. - If C(esxi_hostname) is not given, this parameter is required.
type: str
esxi_hostname: esxi_hostname:
description: description:
- ESXi hostname to gather facts from. - ESXi hostname to gather facts from.
- If C(cluster_name) is not given, this parameter is required. - If C(cluster_name) is not given, this parameter is required.
type: str
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

@ -33,17 +33,20 @@ options:
- Name of the cluster. - Name of the cluster.
- Settings are applied to every ESXi host in given cluster. - Settings are applied to every ESXi host in given cluster.
- If C(esxi_hostname) is not given, this parameter is required. - If C(esxi_hostname) is not given, this parameter is required.
type: str
esxi_hostname: esxi_hostname:
description: description:
- ESXi hostname. - ESXi hostname.
- Settings are applied to this ESXi host. - Settings are applied to this ESXi host.
- If C(cluster_name) is not given, this parameter is required. - If C(cluster_name) is not given, this parameter is required.
type: str
options: options:
description: description:
- A dictionary of advanced system settings. - A dictionary of advanced system settings.
- Invalid options will cause module to error. - Invalid options will cause module to error.
- Note that the list of advanced options (with description and values) can be found by running `vim-cmd hostsvc/advopt/options`. - Note that the list of advanced options (with description and values) can be found by running `vim-cmd hostsvc/advopt/options`.
default: {} default: {}
type: dict
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

@ -40,24 +40,29 @@ options:
- The datacenter isn't used by the API to create a datastore. - The datacenter isn't used by the API to create a datastore.
- Will be removed in 2.11. - Will be removed in 2.11.
required: false required: false
type: str
datastore_name: datastore_name:
description: description:
- Name of the datastore to add/remove. - Name of the datastore to add/remove.
required: true required: true
type: str
datastore_type: datastore_type:
description: description:
- Type of the datastore to configure (nfs/nfs41/vmfs). - Type of the datastore to configure (nfs/nfs41/vmfs).
required: true required: true
choices: [ 'nfs', 'nfs41', 'vmfs' ] choices: [ 'nfs', 'nfs41', 'vmfs' ]
type: str
nfs_server: nfs_server:
description: description:
- NFS host serving nfs datastore. - NFS host serving nfs datastore.
- Required if datastore type is set to C(nfs)/C(nfs41) and state is set to C(present), else unused. - Required if datastore type is set to C(nfs)/C(nfs41) and state is set to C(present), else unused.
- Two or more servers can be defined if datastore type is set to C(nfs41) - Two or more servers can be defined if datastore type is set to C(nfs41)
type: str
nfs_path: nfs_path:
description: description:
- Resource path on NFS host. - Resource path on NFS host.
- Required if datastore type is set to C(nfs)/C(nfs41) and state is set to C(present), else unused. - Required if datastore type is set to C(nfs)/C(nfs41) and state is set to C(present), else unused.
type: str
nfs_ro: nfs_ro:
description: description:
- ReadOnly or ReadWrite mount. - ReadOnly or ReadWrite mount.
@ -68,14 +73,17 @@ options:
description: description:
- Name of the device to be used as VMFS datastore. - Name of the device to be used as VMFS datastore.
- Required for VMFS datastore type and state is set to C(present), else unused. - Required for VMFS datastore type and state is set to C(present), else unused.
type: str
vmfs_version: vmfs_version:
description: description:
- VMFS version to use for datastore creation. - VMFS version to use for datastore creation.
- Unused if datastore type is not set to C(vmfs) and state is not set to C(present). - Unused if datastore type is not set to C(vmfs) and state is not set to C(present).
type: int
esxi_hostname: esxi_hostname:
description: description:
- ESXi hostname to manage the datastore. - ESXi hostname to manage the datastore.
- Required when used with a vcenter - Required when used with a vcenter
type: str
required: false required: false
state: state:
description: description:
@ -83,6 +91,7 @@ options:
- "absent: Umount datastore if datastore is present else do nothing." - "absent: Umount datastore if datastore is present else do nothing."
default: present default: present
choices: [ present, absent ] choices: [ present, absent ]
type: str
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

@ -34,10 +34,12 @@ options:
description: description:
- Name of the cluster from which the ESXi host belong to. - Name of the cluster from which the ESXi host belong to.
- If C(esxi_hostname) is not given, this parameter is required. - If C(esxi_hostname) is not given, this parameter is required.
type: str
esxi_hostname: esxi_hostname:
description: description:
- ESXi hostname to gather facts from. - ESXi hostname to gather facts from.
- If C(cluster_name) is not given, this parameter is required. - If C(cluster_name) is not given, this parameter is required.
type: str
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

@ -38,6 +38,7 @@ options:
- Host facts about the specified ESXi server will be returned. - Host facts about the specified ESXi server will be returned.
- By specifying this option, you can select which ESXi hostsystem is returned if connecting to a vCenter. - By specifying this option, you can select which ESXi hostsystem is returned if connecting to a vCenter.
version_added: 2.8 version_added: 2.8
type: str
show_tag: show_tag:
description: description:
- Tags related to Host are shown if set to C(True). - Tags related to Host are shown if set to C(True).

@ -31,10 +31,12 @@ options:
description: description:
- Name of the cluster from all host systems to be used for facts gathering. - Name of the cluster from all host systems to be used for facts gathering.
- If C(esxi_hostname) is not given, this parameter is required. - If C(esxi_hostname) is not given, this parameter is required.
type: str
esxi_hostname: esxi_hostname:
description: description:
- ESXi hostname to gather facts from. - ESXi hostname to gather facts from.
- If C(cluster_name) is not given, this parameter is required. - If C(cluster_name) is not given, this parameter is required.
type: str
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

@ -32,10 +32,12 @@ options:
description: description:
- Name of the cluster from which the ESXi host belong to. - Name of the cluster from which the ESXi host belong to.
- If C(esxi_hostname) is not given, this parameter is required. - If C(esxi_hostname) is not given, this parameter is required.
type: str
esxi_hostname: esxi_hostname:
description: description:
- ESXi hostname to gather facts from. - ESXi hostname to gather facts from.
- If C(cluster_name) is not given, this parameter is required. - If C(cluster_name) is not given, this parameter is required.
type: str
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

@ -34,11 +34,13 @@ options:
- Name of the cluster. - Name of the cluster.
- Firewall settings are applied to every ESXi host system in given cluster. - Firewall settings are applied to every ESXi host system in given cluster.
- If C(esxi_hostname) is not given, this parameter is required. - If C(esxi_hostname) is not given, this parameter is required.
type: str
esxi_hostname: esxi_hostname:
description: description:
- ESXi hostname. - ESXi hostname.
- Firewall settings are applied to this ESXi host system. - Firewall settings are applied to this ESXi host system.
- If C(cluster_name) is not given, this parameter is required. - If C(cluster_name) is not given, this parameter is required.
type: str
rules: rules:
description: description:
- A list of Rule set which needs to be managed. - A list of Rule set which needs to be managed.
@ -47,6 +49,7 @@ options:
- Additional IPs and networks can also be specified - Additional IPs and networks can also be specified
- Please see examples for more information. - Please see examples for more information.
default: [] default: []
type: list
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

@ -36,11 +36,13 @@ options:
- Name of cluster. - Name of cluster.
- All host systems from given cluster used to manage lockdown. - All host systems from given cluster used to manage lockdown.
- Required parameter, if C(esxi_hostname) is not set. - Required parameter, if C(esxi_hostname) is not set.
type: str
esxi_hostname: esxi_hostname:
description: description:
- List of ESXi hostname to manage lockdown. - List of ESXi hostname to manage lockdown.
- Required parameter, if C(cluster_name) is not set. - Required parameter, if C(cluster_name) is not set.
- See examples for specifications. - See examples for specifications.
type: list
state: state:
description: description:
- State of hosts system - State of hosts system
@ -51,6 +53,7 @@ options:
default: present default: present
choices: [ present, absent ] choices: [ present, absent ]
version_added: 2.5 version_added: 2.5
type: str
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

@ -33,11 +33,13 @@ options:
- Name of the cluster. - Name of the cluster.
- NTP config facts about each ESXi server will be returned for the given cluster. - NTP config facts about each ESXi server will be returned for the given cluster.
- If C(esxi_hostname) is not given, this parameter is required. - If C(esxi_hostname) is not given, this parameter is required.
type: str
esxi_hostname: esxi_hostname:
description: description:
- ESXi hostname. - ESXi hostname.
- NTP config facts about this ESXi server will be returned. - NTP config facts about this ESXi server will be returned.
- If C(cluster_name) is not given, this parameter is required. - If C(cluster_name) is not given, this parameter is required.
type: str
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

@ -33,11 +33,13 @@ options:
- Name of the cluster. - Name of the cluster.
- Package facts about each ESXi server will be returned for given cluster. - Package facts about each ESXi server will be returned for given cluster.
- If C(esxi_hostname) is not given, this parameter is required. - If C(esxi_hostname) is not given, this parameter is required.
type: str
esxi_hostname: esxi_hostname:
description: description:
- ESXi hostname. - ESXi hostname.
- Package facts about this ESXi server will be returned. - Package facts about this ESXi server will be returned.
- If C(cluster_name) is not given, this parameter is required. - If C(cluster_name) is not given, this parameter is required.
type: str
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

@ -35,14 +35,17 @@ options:
- Set the Power Management Policy of the host system. - Set the Power Management Policy of the host system.
choices: [ 'high-performance', 'balanced', 'low-power', 'custom' ] choices: [ 'high-performance', 'balanced', 'low-power', 'custom' ]
default: 'balanced' default: 'balanced'
type: str
esxi_hostname: esxi_hostname:
description: description:
- Name of the host system to work with. - Name of the host system to work with.
- This is required parameter if C(cluster_name) is not specified. - This is required parameter if C(cluster_name) is not specified.
type: str
cluster_name: cluster_name:
description: description:
- Name of the cluster from which all host systems will be used. - Name of the cluster from which all host systems will be used.
- This is required parameter if C(esxi_hostname) is not specified. - This is required parameter if C(esxi_hostname) is not specified.
type: str
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

@ -26,7 +26,7 @@ description:
- State 'reboot-host', 'shutdown-host' and 'power-down-to-standby' are not supported by all the host systems. - State 'reboot-host', 'shutdown-host' and 'power-down-to-standby' are not supported by all the host systems.
version_added: 2.6 version_added: 2.6
author: author:
- Abhijeet Kasurde (@Akasurde) <akasurde@redhat.com> - Abhijeet Kasurde (@Akasurde)
requirements: requirements:
- python >= 2.6 - python >= 2.6
- PyVmomi - PyVmomi
@ -36,14 +36,17 @@ options:
- Set the state of the host system. - Set the state of the host system.
choices: [ 'power-down-to-standby', 'power-up-from-standby', 'shutdown-host', 'reboot-host' ] choices: [ 'power-down-to-standby', 'power-up-from-standby', 'shutdown-host', 'reboot-host' ]
default: 'shutdown-host' default: 'shutdown-host'
type: str
esxi_hostname: esxi_hostname:
description: description:
- Name of the host system to work with. - Name of the host system to work with.
- This is required parameter if C(cluster_name) is not specified. - This is required parameter if C(cluster_name) is not specified.
type: str
cluster_name: cluster_name:
description: description:
- Name of the cluster from which all host systems will be used. - Name of the cluster from which all host systems will be used.
- This is required parameter if C(esxi_hostname) is not specified. - This is required parameter if C(esxi_hostname) is not specified.
type: str
force: force:
description: description:
- 'This parameter specify if the host should be proceeding with user defined powerstate - 'This parameter specify if the host should be proceeding with user defined powerstate
@ -60,6 +63,7 @@ options:
- 'Ignored if C(state) set to C(reboot-host) or C(shutdown-host).' - 'Ignored if C(state) set to C(reboot-host) or C(shutdown-host).'
- 'This parameter is defined in seconds.' - 'This parameter is defined in seconds.'
default: 600 default: 600
type: int
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

@ -20,7 +20,7 @@ module: vmware_host_scanhba
short_description: Rescan host HBA's and optionally refresh the storage system short_description: Rescan host HBA's and optionally refresh the storage system
description: description:
- This module can force a rescan of the hosts HBA subsystem which is needed when wanting to mount a new datastore. - This module can force a rescan of the hosts HBA subsystem which is needed when wanting to mount a new datastore.
- You could use this before using vmware_host_datastore to mount a new datastore to ensure your device/volume is ready. - You could use this before using M(vmware_host_datastore) to mount a new datastore to ensure your device/volume is ready.
- You can also optionally force a Refresh of the Storage System in vCenter/ESXi Web Client. - You can also optionally force a Refresh of the Storage System in vCenter/ESXi Web Client.
- All parameters and VMware object names are case sensitive. - All parameters and VMware object names are case sensitive.
- You can supply an esxi_hostname or a cluster_name - You can supply an esxi_hostname or a cluster_name
@ -37,10 +37,12 @@ options:
description: description:
- ESXi hostname to Rescan the storage subsystem on. - ESXi hostname to Rescan the storage subsystem on.
required: false required: false
type: str
cluster_name: cluster_name:
description: description:
- Cluster name to Rescan the storage subsystem on (this will run the rescan task on each host in the cluster). - Cluster name to Rescan the storage subsystem on (this will run the rescan task on each host in the cluster).
required: false required: false
type: str
refresh_storage: refresh_storage:
description: description:
- Refresh the storage system in vCenter/ESXi Web Client for each host found - Refresh the storage system in vCenter/ESXi Web Client for each host found

@ -34,11 +34,13 @@ options:
- Name of the cluster. - Name of the cluster.
- Service facts about each ESXi server will be returned for given cluster. - Service facts about each ESXi server will be returned for given cluster.
- If C(esxi_hostname) is not given, this parameter is required. - If C(esxi_hostname) is not given, this parameter is required.
type: str
esxi_hostname: esxi_hostname:
description: description:
- ESXi hostname. - ESXi hostname.
- Service facts about this ESXi server will be returned. - Service facts about this ESXi server will be returned.
- If C(cluster_name) is not given, this parameter is required. - If C(cluster_name) is not given, this parameter is required.
type: str
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

@ -35,17 +35,20 @@ options:
- Name of the cluster. - Name of the cluster.
- Service settings are applied to every ESXi host system/s in given cluster. - Service settings are applied to every ESXi host system/s in given cluster.
- If C(esxi_hostname) is not given, this parameter is required. - If C(esxi_hostname) is not given, this parameter is required.
type: str
esxi_hostname: esxi_hostname:
description: description:
- ESXi hostname. - ESXi hostname.
- Service settings are applied to this ESXi host system. - Service settings are applied to this ESXi host system.
- If C(cluster_name) is not given, this parameter is required. - If C(cluster_name) is not given, this parameter is required.
type: str
state: state:
description: description:
- Desired state of service. - Desired state of service.
- "State value 'start' and 'present' has same effect." - "State value 'start' and 'present' has same effect."
- "State value 'stop' and 'absent' has same effect." - "State value 'stop' and 'absent' has same effect."
choices: [ absent, present, restart, start, stop ] choices: [ absent, present, restart, start, stop ]
type: str
default: 'start' default: 'start'
service_policy: service_policy:
description: description:
@ -54,11 +57,13 @@ options:
- If set C(automatic), then service should run if and only if it has open firewall ports. - If set C(automatic), then service should run if and only if it has open firewall ports.
- If set C(off), then Service should not be started when the host starts up. - If set C(off), then Service should not be started when the host starts up.
choices: [ 'automatic', 'off', 'on' ] choices: [ 'automatic', 'off', 'on' ]
type: str
service_name: service_name:
description: description:
- Name of Service to be managed. This is brief identifier for the service, for example, ntpd, vxsyslogd etc. - Name of Service to be managed. This is a brief identifier for the service, for example, ntpd, vxsyslogd etc.
- This value should be a valid ESXi service name. - This value should be a valid ESXi service name.
required: True required: True
type: str
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

@ -52,6 +52,7 @@ options:
- A list of trap targets. - A list of trap targets.
- You need to use C(hostname), C(port), and C(community) for each trap target. - You need to use C(hostname), C(port), and C(community) for each trap target.
default: [] default: []
type: list
trap_filter: trap_filter:
description: description:
- A list of trap oids for traps not to be sent by agent, - A list of trap oids for traps not to be sent by agent,

@ -34,11 +34,13 @@ options:
- Name of the cluster. - Name of the cluster.
- SSL thumbprint information about all ESXi host system in the given cluster will be reported. - SSL thumbprint information about all ESXi host system in the given cluster will be reported.
- If C(esxi_hostname) is not given, this parameter is required. - If C(esxi_hostname) is not given, this parameter is required.
type: str
esxi_hostname: esxi_hostname:
description: description:
- ESXi hostname. - ESXi hostname.
- SSL thumbprint information of this ESXi host system will be reported. - SSL thumbprint information of this ESXi host system will be reported.
- If C(cluster_name) is not given, this parameter is required. - If C(cluster_name) is not given, this parameter is required.
type: str
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

@ -36,19 +36,19 @@ requirements:
options: options:
capabilities: capabilities:
description: description:
- Gather facts about general capabilities (Auto negotioation, Wake On LAN, and Network I/O Control). - Gather facts about general capabilities (Auto negotiation, Wake On LAN, and Network I/O Control).
type: bool type: bool
default: false default: false
version_added: 2.8 version_added: 2.8
directpath_io: directpath_io:
description: description:
- Gather facts about DirectPath I/O capabilites and configuration. - Gather facts about DirectPath I/O capabilities and configuration.
type: bool type: bool
default: false default: false
version_added: 2.8 version_added: 2.8
sriov: sriov:
description: description:
- Gather facts about SR-IOV capabilites and configuration. - Gather facts about SR-IOV capabilities and configuration.
type: bool type: bool
default: false default: false
version_added: 2.8 version_added: 2.8

@ -37,17 +37,20 @@ options:
description: description:
- The local role name to be managed. - The local role name to be managed.
required: True required: True
type: str
local_privilege_ids: local_privilege_ids:
description: description:
- The list of privileges that role needs to have. - The list of privileges that role needs to have.
- Please see U(https://docs.vmware.com/en/VMware-vSphere/6.0/com.vmware.vsphere.security.doc/GUID-ED56F3C4-77D0-49E3-88B6-B99B8B437B62.html) - Please see U(https://docs.vmware.com/en/VMware-vSphere/6.0/com.vmware.vsphere.security.doc/GUID-ED56F3C4-77D0-49E3-88B6-B99B8B437B62.html)
default: [] default: []
type: list
state: state:
description: description:
- Indicate desired state of the role. - Indicate desired state of the role.
- If the role already exists when C(state=present), the role info is updated. - If the role already exists when C(state=present), the role info is updated.
choices: ['present', 'absent'] choices: ['present', 'absent']
default: present default: present
type: str
force_remove: force_remove:
description: description:
- If set to C(False) then prevents the role from being removed if any permissions are using it. - If set to C(False) then prevents the role from being removed if any permissions are using it.
@ -62,6 +65,7 @@ options:
default: set default: set
choices: [ add, remove, set ] choices: [ add, remove, set ]
version_added: 2.8 version_added: 2.8
type: str
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

@ -37,19 +37,23 @@ options:
description: description:
- The local user name to be changed. - The local user name to be changed.
required: True required: True
type: str
local_user_password: local_user_password:
description: description:
- The password to be set. - The password to be set.
required: False required: False
type: str
local_user_description: local_user_description:
description: description:
- Description for the user. - Description for the user.
required: False required: False
type: str
state: state:
description: description:
- Indicate desired state of the user. If the user already exists when C(state=present), the user info is updated - Indicate desired state of the user. If the user already exists when C(state=present), the user info is updated
choices: ['present', 'absent'] choices: ['present', 'absent']
default: present default: present
type: str
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

@ -36,6 +36,7 @@ options:
description: description:
- Name of the host as defined in vCenter. - Name of the host as defined in vCenter.
required: True required: True
type: str
vsan: vsan:
description: description:
- Specify which VSAN compliant mode to enter. - Specify which VSAN compliant mode to enter.
@ -45,6 +46,7 @@ options:
- 'noAction' - 'noAction'
required: False required: False
aliases: [ 'vsan_mode' ] aliases: [ 'vsan_mode' ]
type: str
evacuate: evacuate:
description: description:
- If set to C(True), evacuate all powered off VMs. - If set to C(True), evacuate all powered off VMs.
@ -56,6 +58,7 @@ options:
- Specify a timeout for the operation. - Specify a timeout for the operation.
required: False required: False
default: 0 default: 0
type: int
state: state:
description: description:
- Enter or exit maintenance mode. - Enter or exit maintenance mode.
@ -64,6 +67,7 @@ options:
- absent - absent
default: present default: present
required: False required: False
type: str
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

@ -31,26 +31,32 @@ options:
description: description:
- ESXi hostname to be managed - ESXi hostname to be managed
required: True required: True
type: str
device: device:
description: description:
- VMK interface name - VMK interface name
required: True required: True
type: str
current_switch_name: current_switch_name:
description: description:
- Switch VMK interface is currently on - Switch VMK interface is currently on
required: True required: True
type: str
current_portgroup_name: current_portgroup_name:
description: description:
- Portgroup name VMK interface is currently on - Portgroup name VMK interface is currently on
required: True required: True
type: str
migrate_switch_name: migrate_switch_name:
description: description:
- Switch name to migrate VMK interface to - Switch name to migrate VMK interface to
required: True required: True
type: str
migrate_portgroup_name: migrate_portgroup_name:
description: description:
- Portgroup name to migrate VMK interface to - Portgroup name to migrate VMK interface to
required: True required: True
type: str
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

@ -37,17 +37,21 @@ options:
description: description:
- The role to be assigned permission. - The role to be assigned permission.
required: True required: True
type: str
principal: principal:
description: description:
- The user to be assigned permission. - The user to be assigned permission.
- Required if C(group) is not specified. - Required if C(group) is not specified.
type: str
group: group:
description: description:
- The group to be assigned permission. - The group to be assigned permission.
- Required if C(principal) is not specified. - Required if C(principal) is not specified.
type: str
object_name: object_name:
description: description:
- The object name to assigned permission. - The object name to assigned permission.
type: str
required: True required: True
object_type: object_type:
description: description:
@ -56,6 +60,7 @@ options:
choices: ['Folder', 'VirtualMachine', 'Datacenter', 'ResourcePool', choices: ['Folder', 'VirtualMachine', 'Datacenter', 'ResourcePool',
'Datastore', 'Network', 'HostSystem', 'ComputeResource', 'Datastore', 'Network', 'HostSystem', 'ComputeResource',
'ClusterComputeResource', 'DistributedVirtualSwitch'] 'ClusterComputeResource', 'DistributedVirtualSwitch']
type: str
recursive: recursive:
description: description:
- Should the permissions be recursively applied. - Should the permissions be recursively applied.
@ -68,6 +73,7 @@ options:
- When C(state=absent), the permission is removed if it exists. - When C(state=absent), the permission is removed if it exists.
choices: ['present', 'absent'] choices: ['present', 'absent']
default: present default: present
type: str
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

@ -42,11 +42,13 @@ options:
- vSwitch to modify. - vSwitch to modify.
required: True required: True
aliases: [ 'switch_name', 'vswitch' ] aliases: [ 'switch_name', 'vswitch' ]
type: str
portgroup: portgroup:
description: description:
- Portgroup name to add. - Portgroup name to add.
required: True required: True
aliases: [ 'portgroup_name' ] aliases: [ 'portgroup_name' ]
type: str
vlan_id: vlan_id:
description: description:
- VLAN ID to assign to portgroup. - VLAN ID to assign to portgroup.
@ -54,6 +56,7 @@ options:
required: False required: False
default: 0 default: 0
aliases: [ 'vlan' ] aliases: [ 'vlan' ]
type: int
security: security:
description: description:
- Network policy specifies layer 2 security settings for a - Network policy specifies layer 2 security settings for a
@ -67,6 +70,7 @@ options:
required: False required: False
version_added: "2.2" version_added: "2.2"
aliases: [ 'security_policy', 'network_policy' ] aliases: [ 'security_policy', 'network_policy' ]
type: dict
teaming: teaming:
description: description:
- Dictionary which configures the different teaming values for portgroup. - Dictionary which configures the different teaming values for portgroup.
@ -85,6 +89,7 @@ options:
required: False required: False
version_added: '2.6' version_added: '2.6'
aliases: [ 'teaming_policy' ] aliases: [ 'teaming_policy' ]
type: dict
traffic_shaping: traffic_shaping:
description: description:
- Dictionary which configures traffic shaping for the switch. - Dictionary which configures traffic shaping for the switch.
@ -95,6 +100,7 @@ options:
- '- C(burst_size) (int): Burst size (KB). (default: None)' - '- C(burst_size) (int): Burst size (KB). (default: None)'
required: False required: False
version_added: '2.9' version_added: '2.9'
type: dict
cluster_name: cluster_name:
description: description:
- Name of cluster name for host membership. - Name of cluster name for host membership.
@ -102,12 +108,14 @@ options:
- This option is required if C(hosts) is not specified. - This option is required if C(hosts) is not specified.
version_added: "2.5" version_added: "2.5"
aliases: [ 'cluster' ] aliases: [ 'cluster' ]
type: str
hosts: hosts:
description: description:
- List of name of host or hosts on which portgroup needs to be added. - List of name of host or hosts on which portgroup needs to be added.
- This option is required if C(cluster_name) is not specified. - This option is required if C(cluster_name) is not specified.
aliases: [ esxi_hostname ] aliases: [ esxi_hostname ]
version_added: "2.5" version_added: "2.5"
type: list
state: state:
description: description:
- Determines if the portgroup should be present or not. - Determines if the portgroup should be present or not.
@ -116,6 +124,7 @@ options:
- 'absent' - 'absent'
version_added: '2.5' version_added: '2.5'
default: present default: present
type: str
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

@ -43,10 +43,12 @@ options:
- Name of the cluster. - Name of the cluster.
- Facts will be returned for all hostsystem belonging to this cluster name. - Facts will be returned for all hostsystem belonging to this cluster name.
- If C(esxi_hostname) is not given, this parameter is required. - If C(esxi_hostname) is not given, this parameter is required.
type: str
esxi_hostname: esxi_hostname:
description: description:
- ESXi hostname to gather facts from. - ESXi hostname to gather facts from.
- If C(cluster_name) is not given, this parameter is required. - If C(cluster_name) is not given, this parameter is required.
type: str
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

@ -30,14 +30,17 @@ options:
description: description:
- Name of the datacenter to add the host. - Name of the datacenter to add the host.
required: True required: True
type: str
cluster: cluster:
description: description:
- Name of the cluster to add the host. - Name of the cluster to add the host.
required: True required: True
type: str
resource_pool: resource_pool:
description: description:
- Resource pool name to manage. - Resource pool name to manage.
required: True required: True
type: str
cpu_expandable_reservations: cpu_expandable_reservations:
description: description:
- In a resource pool with an expandable reservation, the reservation on a resource pool can grow beyond the specified value. - In a resource pool with an expandable reservation, the reservation on a resource pool can grow beyond the specified value.
@ -47,11 +50,13 @@ options:
description: description:
- Amount of resource that is guaranteed available to the virtual machine or resource pool. - Amount of resource that is guaranteed available to the virtual machine or resource pool.
default: 0 default: 0
type: int
cpu_limit: cpu_limit:
description: description:
- The utilization of a virtual machine/resource pool will not exceed this limit, even if there are available resources. - The utilization of a virtual machine/resource pool will not exceed this limit, even if there are available resources.
- The default value -1 indicates no limit. - The default value -1 indicates no limit.
default: -1 default: -1
type: int
cpu_shares: cpu_shares:
description: description:
- Memory shares are used in case of resource contention. - Memory shares are used in case of resource contention.
@ -61,6 +66,7 @@ options:
- low - low
- normal - normal
default: normal default: normal
type: str
mem_expandable_reservations: mem_expandable_reservations:
description: description:
- In a resource pool with an expandable reservation, the reservation on a resource pool can grow beyond the specified value. - In a resource pool with an expandable reservation, the reservation on a resource pool can grow beyond the specified value.
@ -70,11 +76,13 @@ options:
description: description:
- Amount of resource that is guaranteed available to the virtual machine or resource pool. - Amount of resource that is guaranteed available to the virtual machine or resource pool.
default: 0 default: 0
type: int
mem_limit: mem_limit:
description: description:
- The utilization of a virtual machine/resource pool will not exceed this limit, even if there are available resources. - The utilization of a virtual machine/resource pool will not exceed this limit, even if there are available resources.
- The default value -1 indicates no limit. - The default value -1 indicates no limit.
default: -1 default: -1
type: int
mem_shares: mem_shares:
description: description:
- Memory shares are used in case of resource contention. - Memory shares are used in case of resource contention.
@ -84,6 +92,7 @@ options:
- low - low
- normal - normal
default: normal default: normal
type: str
state: state:
description: description:
- Add or remove the resource pool - Add or remove the resource pool
@ -91,6 +100,7 @@ options:
choices: choices:
- 'present' - 'present'
- 'absent' - 'absent'
type: str
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

@ -35,6 +35,7 @@ options:
description: description:
- The name of tag to manage. - The name of tag to manage.
required: True required: True
type: str
tag_description: tag_description:
description: description:
- The tag description. - The tag description.
@ -43,11 +44,13 @@ options:
- Process of updating tag only allows description change. - Process of updating tag only allows description change.
required: False required: False
default: '' default: ''
type: str
category_id: category_id:
description: description:
- The unique ID generated by vCenter should be used to. - The unique ID generated by vCenter should be used to.
- User can get this unique ID from facts module. - User can get this unique ID from facts module.
required: False required: False
type: str
state: state:
description: description:
- The state of tag. - The state of tag.
@ -58,6 +61,7 @@ options:
required: False required: False
default: 'present' default: 'present'
choices: [ 'present', 'absent' ] choices: [ 'present', 'absent' ]
type: str
extends_documentation_fragment: vmware_rest_client.documentation extends_documentation_fragment: vmware_rest_client.documentation
''' '''

@ -38,6 +38,7 @@ options:
- You can also specify category name by specifying colon separated value. For example, "category_name:tag_name". - You can also specify category name by specifying colon separated value. For example, "category_name:tag_name".
- You can skip category name if you have unique tag names. - You can skip category name if you have unique tag names.
required: True required: True
type: list
state: state:
description: description:
- If C(state) is set to C(add) or C(present) will add the tags to the existing tag list of the given object. - If C(state) is set to C(add) or C(present) will add the tags to the existing tag list of the given object.
@ -45,16 +46,19 @@ options:
- If C(state) is set to C(set) will replace the tags of the given objects with the user defined list of tags. - If C(state) is set to C(set) will replace the tags of the given objects with the user defined list of tags.
default: add default: add
choices: [ present, absent, add, remove, set ] choices: [ present, absent, add, remove, set ]
type: str
object_type: object_type:
description: description:
- Type of object to work with. - Type of object to work with.
required: True required: True
choices: [ VirtualMachine, Datacenter, ClusterComputeResource, HostSystem, DistributedVirtualSwitch, DistributedVirtualPortgroup ] choices: [ VirtualMachine, Datacenter, ClusterComputeResource, HostSystem, DistributedVirtualSwitch, DistributedVirtualPortgroup ]
type: str
object_name: object_name:
description: description:
- Name of the object to work with. - Name of the object to work with.
- For DistributedVirtualPortgroups the format should be "switch_name:portgroup_name" - For DistributedVirtualPortgroups the format should be "switch_name:portgroup_name"
required: True required: True
type: str
extends_documentation_fragment: vmware_rest_client.documentation extends_documentation_fragment: vmware_rest_client.documentation
''' '''

@ -34,18 +34,21 @@ options:
- The target id based on order of scsi device. - The target id based on order of scsi device.
- version 2.6 onwards, this parameter is optional. - version 2.6 onwards, this parameter is optional.
required: False required: False
type: int
cluster_name: cluster_name:
description: description:
- Name of the cluster. - Name of the cluster.
- Facts about all SCSI devices for all host system in the given cluster is returned. - Facts about all SCSI devices for all host system in the given cluster is returned.
- This parameter is required, if C(esxi_hostname) is not provided. - This parameter is required, if C(esxi_hostname) is not provided.
version_added: 2.6 version_added: 2.6
type: str
esxi_hostname: esxi_hostname:
description: description:
- Name of the ESXi host system. - Name of the ESXi host system.
- Facts about all SCSI devices for the given ESXi host system is returned. - Facts about all SCSI devices for the given ESXi host system is returned.
- This parameter is required, if C(cluster_name) is not provided. - This parameter is required, if C(cluster_name) is not provided.
version_added: 2.6 version_added: 2.6
type: str
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

@ -37,14 +37,17 @@ options:
description: description:
- "Datacenter to search for given cluster. If not set, we use first cluster we encounter with C(cluster_name)." - "Datacenter to search for given cluster. If not set, we use first cluster we encounter with C(cluster_name)."
required: false required: false
type: str
cluster_name: cluster_name:
description: description:
- "Cluster to create VM-Host rule." - "Cluster to create VM-Host rule."
required: true required: true
type: str
drs_rule_name: drs_rule_name:
description: description:
- "Name of rule to create or remove." - "Name of rule to create or remove."
required: true required: true
type: str
enabled: enabled:
default: false default: false
description: description:
@ -56,6 +59,7 @@ options:
- "Name of Host group to use with rule." - "Name of Host group to use with rule."
- "Effective only if C(state) is set to C(present)." - "Effective only if C(state) is set to C(present)."
required: true required: true
type: str
mandatory: mandatory:
default: false default: false
description: description:
@ -71,11 +75,13 @@ options:
- "If set to C(present) and the rule doesn't exists then the rule will be created." - "If set to C(present) and the rule doesn't exists then the rule will be created."
- "If set to C(absent) and the rule exists then the rule will be deleted." - "If set to C(absent) and the rule exists then the rule will be deleted."
required: true required: true
type: str
vm_group_name: vm_group_name:
description: description:
- "Name of VM group to use with rule." - "Name of VM group to use with rule."
- "Effective only if C(state) is set to C(present)." - "Effective only if C(state) is set to C(present)."
required: true required: true
type: str
requirements: requirements:
- "python >= 2.6" - "python >= 2.6"
- PyVmomi - PyVmomi

@ -35,10 +35,12 @@ options:
description: description:
- The datacenter hosting the virtual machine. - The datacenter hosting the virtual machine.
- If set, it will help to speed up virtual machine search. - If set, it will help to speed up virtual machine search.
type: str
cluster: cluster:
description: description:
- The cluster hosting the virtual machine. - The cluster hosting the virtual machine.
- If set, it will help to speed up virtual machine search. - If set, it will help to speed up virtual machine search.
type: str
folder: folder:
description: description:
- Destination folder, absolute or relative path to find an existing guest or create the new guest. - Destination folder, absolute or relative path to find an existing guest or create the new guest.
@ -54,39 +56,48 @@ options:
- ' folder: folder1/datacenter1/vm' - ' folder: folder1/datacenter1/vm'
- ' folder: /folder1/datacenter1/vm/folder2' - ' folder: /folder1/datacenter1/vm/folder2'
version_added: "2.4" version_added: "2.4"
type: str
vm_id: vm_id:
description: description:
- Name of the virtual machine to work with. - Name of the virtual machine to work with.
required: True required: True
type: str
vm_id_type: vm_id_type:
description: description:
- The VMware identification method by which the virtual machine will be identified. - The VMware identification method by which the virtual machine will be identified.
default: vm_name default: vm_name
choices: ['uuid', 'instance_uuid', 'dns_name', 'inventory_path', 'vm_name'] choices: ['uuid', 'instance_uuid', 'dns_name', 'inventory_path', 'vm_name']
type: str
vm_username: vm_username:
description: description:
- The user to login-in to the virtual machine. - The user to login-in to the virtual machine.
required: True required: True
type: str
vm_password: vm_password:
description: description:
- The password used to login-in to the virtual machine. - The password used to login-in to the virtual machine.
required: True required: True
type: str
vm_shell: vm_shell:
description: description:
- The absolute path to the program to start. - The absolute path to the program to start.
- On Linux, shell is executed via bash. - On Linux, shell is executed via bash.
required: True required: True
type: str
vm_shell_args: vm_shell_args:
description: description:
- The argument to the program. - The argument to the program.
- The characters which must be escaped to the shell also be escaped on the command line provided. - The characters which must be escaped to the shell also be escaped on the command line provided.
default: " " default: " "
type: str
vm_shell_env: vm_shell_env:
description: description:
- Comma separated list of environment variable, specified in the guest OS notation. - Comma separated list of environment variable, specified in the guest OS notation.
type: list
vm_shell_cwd: vm_shell_cwd:
description: description:
- The current working directory of the application from which it will be run. - The current working directory of the application from which it will be run.
type: str
wait_for_process: wait_for_process:
description: description:
- If set to C(True), module will wait for process to complete in the given virtual machine. - If set to C(True), module will wait for process to complete in the given virtual machine.
@ -99,6 +110,7 @@ options:
- If set to positive integers, then C(wait_for_process) will honor this parameter and will exit after this timeout. - If set to positive integers, then C(wait_for_process) will honor this parameter and will exit after this timeout.
default: 3600 default: 3600
version_added: 2.7 version_added: 2.7
type: int
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

@ -32,14 +32,17 @@ options:
description: description:
- Desired cluster name where virtual machines are present for the DRS rule. - Desired cluster name where virtual machines are present for the DRS rule.
required: True required: True
type: str
vms: vms:
description: description:
- List of virtual machines name for which DRS rule needs to be applied. - List of virtual machines name for which DRS rule needs to be applied.
- Required if C(state) is set to C(present). - Required if C(state) is set to C(present).
type: list
drs_rule_name: drs_rule_name:
description: description:
- The name of the DRS rule to manage. - The name of the DRS rule to manage.
required: True required: True
type: str
enabled: enabled:
description: description:
- If set to C(True), the DRS rule will be enabled. - If set to C(True), the DRS rule will be enabled.
@ -67,6 +70,7 @@ options:
required: False required: False
default: present default: present
choices: [ present, absent ] choices: [ present, absent ]
type: str
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

@ -30,10 +30,12 @@ options:
description: description:
- Name of the virtual machine to migrate to a dvSwitch - Name of the virtual machine to migrate to a dvSwitch
required: True required: True
type: str
dvportgroup_name: dvportgroup_name:
description: description:
- Name of the portgroup to migrate to the virtual machine to - Name of the portgroup to migrate to the virtual machine to
required: True required: True
type: str
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

@ -60,6 +60,7 @@ options:
- The name of the port group for the VMKernel interface. - The name of the port group for the VMKernel interface.
required: True required: True
aliases: ['portgroup'] aliases: ['portgroup']
type: str
network: network:
description: description:
- A dictionary of network details. - A dictionary of network details.
@ -83,21 +84,25 @@ options:
- The IP Address for the VMKernel interface. - The IP Address for the VMKernel interface.
- Use C(network) parameter with C(ip_address) instead. - Use C(network) parameter with C(ip_address) instead.
- Deprecated option, will be removed in version 2.9. - Deprecated option, will be removed in version 2.9.
type: str
subnet_mask: subnet_mask:
description: description:
- The Subnet Mask for the VMKernel interface. - The Subnet Mask for the VMKernel interface.
- Use C(network) parameter with C(subnet_mask) instead. - Use C(network) parameter with C(subnet_mask) instead.
- Deprecated option, will be removed in version 2.9. - Deprecated option, will be removed in version 2.9.
type: str
mtu: mtu:
description: description:
- The MTU for the VMKernel interface. - The MTU for the VMKernel interface.
- The default value of 1500 is valid from version 2.5 and onwards. - The default value of 1500 is valid from version 2.5 and onwards.
default: 1500 default: 1500
type: int
device: device:
description: description:
- Search VMkernel adapter by device name. - Search VMkernel adapter by device name.
- The parameter is required only in case of C(type) is set to C(dhcp). - The parameter is required only in case of C(type) is set to C(dhcp).
version_added: 2.8 version_added: 2.8
type: str
enable_vsan: enable_vsan:
description: description:
- Enable VSAN traffic on the VMKernel adapter. - Enable VSAN traffic on the VMKernel adapter.
@ -145,12 +150,14 @@ options:
choices: [ present, absent ] choices: [ present, absent ]
default: present default: present
version_added: 2.5 version_added: 2.5
type: str
esxi_hostname: esxi_hostname:
description: description:
- Name of ESXi host to which VMKernel is to be managed. - Name of ESXi host to which VMKernel is to be managed.
- "From version 2.5 onwards, this parameter is required." - "From version 2.5 onwards, this parameter is required."
required: True required: True
version_added: 2.5 version_added: 2.5
type: str
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

@ -33,11 +33,13 @@ options:
- Name of the cluster. - Name of the cluster.
- VMKernel facts about each ESXi server will be returned for the given cluster. - VMKernel facts about each ESXi server will be returned for the given cluster.
- If C(esxi_hostname) is not given, this parameter is required. - If C(esxi_hostname) is not given, this parameter is required.
type: str
esxi_hostname: esxi_hostname:
description: description:
- ESXi hostname. - ESXi hostname.
- VMKernel facts about this ESXi server will be returned. - VMKernel facts about this ESXi server will be returned.
- If C(cluster_name) is not given, this parameter is required. - If C(cluster_name) is not given, this parameter is required.
type: str
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

@ -31,14 +31,17 @@ options:
description: description:
- VMkernel interface name - VMkernel interface name
required: True required: True
type: str
ip_address: ip_address:
description: description:
- IP address to assign to VMkernel interface - IP address to assign to VMkernel interface
required: True required: True
type: str
subnet_mask: subnet_mask:
description: description:
- Subnet Mask to assign to VMkernel interface - Subnet Mask to assign to VMkernel interface
required: True required: True
type: str
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

@ -41,12 +41,14 @@ options:
- This is required parameter, if C(vm_uuid) is not set. - This is required parameter, if C(vm_uuid) is not set.
- Version 2.6 onwards, this parameter is not a required parameter, unlike the previous versions. - Version 2.6 onwards, this parameter is not a required parameter, unlike the previous versions.
aliases: ['vm'] aliases: ['vm']
type: str
vm_uuid: vm_uuid:
description: description:
- UUID of the virtual machine to perform a vMotion operation on. - UUID of the virtual machine to perform a vMotion operation on.
- This is a required parameter, if C(vm_name) or C(moid) is not set. - This is a required parameter, if C(vm_name) or C(moid) is not set.
aliases: ['uuid'] aliases: ['uuid']
version_added: 2.7 version_added: 2.7
type: str
moid: moid:
description: description:
- Managed Object ID of the instance to manage if known, this is a unique identifier only within a single vCenter instance. - Managed Object ID of the instance to manage if known, this is a unique identifier only within a single vCenter instance.
@ -64,11 +66,13 @@ options:
- Name of the destination host the virtual machine should be running on. - Name of the destination host the virtual machine should be running on.
- Version 2.6 onwards, this parameter is not a required parameter, unlike the previous versions. - Version 2.6 onwards, this parameter is not a required parameter, unlike the previous versions.
aliases: ['destination'] aliases: ['destination']
type: str
destination_datastore: destination_datastore:
description: description:
- "Name of the destination datastore the virtual machine's vmdk should be moved on." - "Name of the destination datastore the virtual machine's vmdk should be moved on."
aliases: ['datastore'] aliases: ['datastore']
version_added: 2.7 version_added: 2.7
type: str
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

@ -30,6 +30,7 @@ options:
description: description:
- Desired cluster UUID - Desired cluster UUID
required: False required: False
type: str
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

@ -23,7 +23,7 @@ description:
- This module can be used to create, delete or edit different kind of port mirroring sessions. - This module can be used to create, delete or edit different kind of port mirroring sessions.
version_added: '2.8' version_added: '2.8'
author: author:
- Peter Gyorgy (@gyorgypeter) <gyorgy.peter1996@gmail.com> - Peter Gyorgy (@gyorgypeter)
notes: notes:
- Tested on vSphere 6.7 - Tested on vSphere 6.7
requirements: requirements:
@ -35,10 +35,12 @@ options:
- The name of the distributed vSwitch on which to add or remove the mirroring session. - The name of the distributed vSwitch on which to add or remove the mirroring session.
required: True required: True
aliases: [ 'switch_name' ] aliases: [ 'switch_name' ]
type: str
name: name:
description: description:
- Name of the session. - Name of the session.
required: True required: True
type: str
state: state:
choices: choices:
- 'present' - 'present'
@ -46,6 +48,7 @@ options:
description: description:
- Create or remove the session. - Create or remove the session.
required: True required: True
type: str
session_type: session_type:
default: 'dvPortMirror' default: 'dvPortMirror'
choices: choices:
@ -64,6 +67,7 @@ options:
- '- C(dvPortMirror) (str): In dvPortMirror session, Distributed Ports can be used as both source and - '- C(dvPortMirror) (str): In dvPortMirror session, Distributed Ports can be used as both source and
destination entities.' destination entities.'
required: False required: False
type: str
enabled: enabled:
type: bool type: bool
default: True default: True
@ -73,23 +77,28 @@ options:
description: description:
- The description for the session. - The description for the session.
required: False required: False
type: str
source_port_transmitted: source_port_transmitted:
description: description:
- Source port for which transmitted packets are mirrored. - Source port for which transmitted packets are mirrored.
required: False required: False
type: str
source_port_received: source_port_received:
description: description:
- Source port for which received packets are mirrored. - Source port for which received packets are mirrored.
required: False required: False
type: str
destination_port: destination_port:
description: description:
- Destination port that received the mirrored packets. Also any port designated in the value of this - Destination port that received the mirrored packets. Also any port designated in the value of this
property can not match the source port in any of the Distributed Port Mirroring session. property can not match the source port in any of the Distributed Port Mirroring session.
required: False required: False
type: str
encapsulation_vlan_id: encapsulation_vlan_id:
description: description:
- VLAN ID used to encapsulate the mirrored traffic. - VLAN ID used to encapsulate the mirrored traffic.
required: False required: False
type: int
strip_original_vlan: strip_original_vlan:
description: description:
- Whether to strip the original VLAN tag. if false, the original VLAN tag will be preserved on the mirrored - Whether to strip the original VLAN tag. if false, the original VLAN tag will be preserved on the mirrored
@ -103,6 +112,7 @@ options:
Setting this property to a smaller value is useful when the consumer will look only at the headers. Setting this property to a smaller value is useful when the consumer will look only at the headers.
The value cannot be less than 60. The value cannot be less than 60.
required: False required: False
type: int
normal_traffic_allowed: normal_traffic_allowed:
description: description:
- Whether or not destination ports can send and receive "normal" traffic. Setting this to false will make - Whether or not destination ports can send and receive "normal" traffic. Setting this to false will make
@ -121,12 +131,14 @@ options:
- 'Valid attributes are:' - 'Valid attributes are:'
- '- C(name) (str): Name of the VM' - '- C(name) (str): Name of the VM'
- '- C(nic_label) (bool): Label of the Network Interface Card to use.' - '- C(nic_label) (bool): Label of the Network Interface Card to use.'
type: dict
source_vm_received: source_vm_received:
description: description:
- With this parameter it is possible, to add a NIC of a VM to a port mirroring session. - With this parameter it is possible, to add a NIC of a VM to a port mirroring session.
- 'Valid attributes are:' - 'Valid attributes are:'
- '- C(name) (str): Name of the VM' - '- C(name) (str): Name of the VM'
- '- C(nic_label) (bool): Label of the Network Interface Card to use.' - '- C(nic_label) (bool): Label of the Network Interface Card to use.'
type: dict
destination_vm: destination_vm:
description: description:
- With this parameter it is possible, to add a NIC of a VM to a port mirroring session. - With this parameter it is possible, to add a NIC of a VM to a port mirroring session.
@ -134,6 +146,7 @@ options:
- '- C(name) (str): Name of the VM' - '- C(name) (str): Name of the VM'
- '- C(nic_label) (bool): Label of the Network Interface Card to use.' - '- C(nic_label) (bool): Label of the Network Interface Card to use.'
required: False required: False
type: dict
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

@ -38,30 +38,36 @@ options:
- Alias C(switch) is added in version 2.4. - Alias C(switch) is added in version 2.4.
required: yes required: yes
aliases: [ switch_name ] aliases: [ switch_name ]
type: str
nics: nics:
description: description:
- A list of vmnic names or vmnic name to attach to vSwitch. - A list of vmnic names or vmnic name to attach to vSwitch.
- Alias C(nics) is added in version 2.4. - Alias C(nics) is added in version 2.4.
aliases: [ nic_name ] aliases: [ nic_name ]
default: [] default: []
type: list
number_of_ports: number_of_ports:
description: description:
- Number of port to configure on vSwitch. - Number of port to configure on vSwitch.
default: 128 default: 128
type: int
mtu: mtu:
description: description:
- MTU to configure on vSwitch. - MTU to configure on vSwitch.
default: 1500 default: 1500
type: int
state: state:
description: description:
- Add or remove the switch. - Add or remove the switch.
default: present default: present
choices: [ absent, present ] choices: [ absent, present ]
type: str
esxi_hostname: esxi_hostname:
description: description:
- Manage the vSwitch using this ESXi host system. - Manage the vSwitch using this ESXi host system.
version_added: "2.5" version_added: "2.5"
aliases: [ 'host' ] aliases: [ 'host' ]
type: str
extends_documentation_fragment: extends_documentation_fragment:
- vmware.documentation - vmware.documentation
''' '''

@ -35,10 +35,12 @@ options:
- Name of the cluster. - Name of the cluster.
- Facts about vswitch belonging to every ESXi host systems under this cluster will be returned. - Facts about vswitch belonging to every ESXi host systems under this cluster will be returned.
- If C(esxi_hostname) is not given, this parameter is required. - If C(esxi_hostname) is not given, this parameter is required.
type: str
esxi_hostname: esxi_hostname:
description: description:
- ESXi hostname to gather facts from. - ESXi hostname to gather facts from.
- If C(cluster_name) is not given, this parameter is required. - If C(cluster_name) is not given, this parameter is required.
type: str
extends_documentation_fragment: vmware.documentation extends_documentation_fragment: vmware.documentation
''' '''

@ -1180,95 +1180,10 @@ lib/ansible/modules/cloud/vmware/vca_nat.py E338
lib/ansible/modules/cloud/vmware/vca_vapp.py E322 lib/ansible/modules/cloud/vmware/vca_vapp.py E322
lib/ansible/modules/cloud/vmware/vca_vapp.py E324 lib/ansible/modules/cloud/vmware/vca_vapp.py E324
lib/ansible/modules/cloud/vmware/vca_vapp.py E338 lib/ansible/modules/cloud/vmware/vca_vapp.py E338
lib/ansible/modules/cloud/vmware/vcenter_extension.py E337
lib/ansible/modules/cloud/vmware/vcenter_folder.py E337
lib/ansible/modules/cloud/vmware/vcenter_license.py E337
lib/ansible/modules/cloud/vmware/vmware_category.py E337
lib/ansible/modules/cloud/vmware/vmware_cfg_backup.py E337
lib/ansible/modules/cloud/vmware/vmware_cluster_facts.py E337
lib/ansible/modules/cloud/vmware/vmware_cluster.py E337 lib/ansible/modules/cloud/vmware/vmware_cluster.py E337
lib/ansible/modules/cloud/vmware/vmware_datacenter.py E337
lib/ansible/modules/cloud/vmware/vmware_datastore_cluster.py E337
lib/ansible/modules/cloud/vmware/vmware_datastore_facts.py E337
lib/ansible/modules/cloud/vmware/vmware_datastore_maintenancemode.py E337
lib/ansible/modules/cloud/vmware/vmware_deploy_ovf.py E337 lib/ansible/modules/cloud/vmware/vmware_deploy_ovf.py E337
lib/ansible/modules/cloud/vmware/vmware_dns_config.py E337
lib/ansible/modules/cloud/vmware/vmware_drs_group_facts.py E337
lib/ansible/modules/cloud/vmware/vmware_drs_group.py E337
lib/ansible/modules/cloud/vmware/vmware_drs_rule_facts.py E337
lib/ansible/modules/cloud/vmware/vmware_dvs_host.py E337
lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup.py E337
lib/ansible/modules/cloud/vmware/vmware_dvswitch_lacp.py E338
lib/ansible/modules/cloud/vmware/vmware_dvswitch_uplink_pg.py E337
lib/ansible/modules/cloud/vmware/vmware_export_ovf.py E337
lib/ansible/modules/cloud/vmware/vmware_guest_boot_facts.py E337
lib/ansible/modules/cloud/vmware/vmware_guest_boot_facts.py E338
lib/ansible/modules/cloud/vmware/vmware_guest_boot_manager.py E337
lib/ansible/modules/cloud/vmware/vmware_guest_boot_manager.py E338
lib/ansible/modules/cloud/vmware/vmware_guest_custom_attribute_defs.py E337
lib/ansible/modules/cloud/vmware/vmware_guest_custom_attributes.py E337
lib/ansible/modules/cloud/vmware/vmware_guest_customization_facts.py E337
lib/ansible/modules/cloud/vmware/vmware_guest_disk_facts.py E337
lib/ansible/modules/cloud/vmware/vmware_guest_disk.py E337
lib/ansible/modules/cloud/vmware/vmware_guest_facts.py E337
lib/ansible/modules/cloud/vmware/vmware_guest_file_operation.py E337
lib/ansible/modules/cloud/vmware/vmware_guest_find.py E337
lib/ansible/modules/cloud/vmware/vmware_guest_move.py E337
lib/ansible/modules/cloud/vmware/vmware_guest_powerstate.py E337
lib/ansible/modules/cloud/vmware/vmware_guest.py E322 lib/ansible/modules/cloud/vmware/vmware_guest.py E322
lib/ansible/modules/cloud/vmware/vmware_guest.py E337 lib/ansible/modules/cloud/vmware/vmware_guest.py E337
lib/ansible/modules/cloud/vmware/vmware_guest_snapshot_facts.py E337
lib/ansible/modules/cloud/vmware/vmware_guest_snapshot.py E337
lib/ansible/modules/cloud/vmware/vmware_guest_snapshot.py E338
lib/ansible/modules/cloud/vmware/vmware_guest_tools_upgrade.py E337
lib/ansible/modules/cloud/vmware/vmware_guest_tools_wait.py E337
lib/ansible/modules/cloud/vmware/vmware_guest_video.py E337
lib/ansible/modules/cloud/vmware/vmware_guest_vnc.py E337
lib/ansible/modules/cloud/vmware/vmware_host_acceptance.py E337
lib/ansible/modules/cloud/vmware/vmware_host_capability_facts.py E337
lib/ansible/modules/cloud/vmware/vmware_host_config_facts.py E337
lib/ansible/modules/cloud/vmware/vmware_host_config_manager.py E337
lib/ansible/modules/cloud/vmware/vmware_host_datastore.py E337
lib/ansible/modules/cloud/vmware/vmware_host_dns_facts.py E337
lib/ansible/modules/cloud/vmware/vmware_host_facts.py E337
lib/ansible/modules/cloud/vmware/vmware_host_feature_facts.py E337
lib/ansible/modules/cloud/vmware/vmware_host_firewall_facts.py E337
lib/ansible/modules/cloud/vmware/vmware_host_firewall_manager.py E337
lib/ansible/modules/cloud/vmware/vmware_host_lockdown.py E337
lib/ansible/modules/cloud/vmware/vmware_host_lockdown.py E338
lib/ansible/modules/cloud/vmware/vmware_host_ntp_facts.py E337
lib/ansible/modules/cloud/vmware/vmware_host_package_facts.py E337
lib/ansible/modules/cloud/vmware/vmware_host_powermgmt_policy.py E337
lib/ansible/modules/cloud/vmware/vmware_host_powerstate.py E337
lib/ansible/modules/cloud/vmware/vmware_host_scanhba.py E337
lib/ansible/modules/cloud/vmware/vmware_host_service_facts.py E337
lib/ansible/modules/cloud/vmware/vmware_host_service_manager.py E337
lib/ansible/modules/cloud/vmware/vmware_host_snmp.py E337
lib/ansible/modules/cloud/vmware/vmware_host_ssl_facts.py E337
lib/ansible/modules/cloud/vmware/vmware_local_role_manager.py E337
lib/ansible/modules/cloud/vmware/vmware_local_user_manager.py E337
lib/ansible/modules/cloud/vmware/vmware_maintenancemode.py E337
lib/ansible/modules/cloud/vmware/vmware_maintenancemode.py E338
lib/ansible/modules/cloud/vmware/vmware_migrate_vmk.py E337
lib/ansible/modules/cloud/vmware/vmware_object_role_permission.py E337
lib/ansible/modules/cloud/vmware/vmware_portgroup_facts.py E337
lib/ansible/modules/cloud/vmware/vmware_portgroup.py E337
lib/ansible/modules/cloud/vmware/vmware_resource_pool.py E337
lib/ansible/modules/cloud/vmware/vmware_tag_manager.py E337
lib/ansible/modules/cloud/vmware/vmware_tag.py E337
lib/ansible/modules/cloud/vmware/vmware_target_canonical_facts.py E337
lib/ansible/modules/cloud/vmware/vmware_vm_host_drs_rule.py E337
lib/ansible/modules/cloud/vmware/vmware_vmkernel_facts.py E337
lib/ansible/modules/cloud/vmware/vmware_vmkernel_ip_config.py E337
lib/ansible/modules/cloud/vmware/vmware_vmkernel.py E337
lib/ansible/modules/cloud/vmware/vmware_vmotion.py E338
lib/ansible/modules/cloud/vmware/vmware_vm_shell.py E337
lib/ansible/modules/cloud/vmware/vmware_vm_vm_drs_rule.py E337
lib/ansible/modules/cloud/vmware/vmware_vm_vss_dvs_migrate.py E337
lib/ansible/modules/cloud/vmware/vmware_vsan_cluster.py E337
lib/ansible/modules/cloud/vmware/vmware_vspan_session.py E337
lib/ansible/modules/cloud/vmware/vmware_vswitch_facts.py E337
lib/ansible/modules/cloud/vmware/vmware_vswitch.py E337
lib/ansible/modules/cloud/vmware/vsphere_copy.py E322 lib/ansible/modules/cloud/vmware/vsphere_copy.py E322
lib/ansible/modules/cloud/vmware/vsphere_copy.py E338 lib/ansible/modules/cloud/vmware/vsphere_copy.py E338
lib/ansible/modules/cloud/vultr/vultr_block_storage.py E337 lib/ansible/modules/cloud/vultr/vultr_block_storage.py E337

Loading…
Cancel
Save