Ansible VMware
Ansible VMware Pack.#
This Integration is part of theSupported versions
Supported Cortex XSOAR versions: 6.0.0 and later.
This integration enables the management of VMware vCenter and ESXi hosts directly from XSOAR using Ansible modules. The Ansible engine is self-contained and pre-configured as part of this pack onto your XSOAR server, all you need to do is provide credentials you are ready to use the feature rich commands. This integration functions without any agents or additional software installed on the hosts by utilising VMware APIs.
#
Requirements- vCenter or ESXi Server 6.5 and above
- Paid License on vCenter or ESXi Server. Free vSphere Hypervistor will be read-only
#
NetworkingBy default, TCP port 443 will be used to initiate a REST API connection to the vSphere host.
The connection will be initiated from the XSOAR engine/server specified in the instance settings.
#
Configure Ansible VMware in CortexParameter | Description | Required |
---|---|---|
Hostname | The hostname or IP address of the vSphere vCenter or ESXi server. | True |
Port | The port of the vSphere vCenter or ESXi server. | True |
Username | The username to access the vSphere vCenter or ESXi server. | True |
Password | The password to access the vSphere vCenter or ESXi server. | True |
Validate Certs | Allows connection when SSL certificates are not valid. Set to `false` when certificates are not trusted. | True |
#
IdempotenceThe action commands in this integration are idempotent. This means that the result of performing it once is exactly the same as the result of performing it repeatedly without any intervening actions.
#
State ArguementSome of the commands in this integration take a state argument. These define the desired end state of the object being managed. As a result these commands are able to perform multiple management operations depending on the desired state value. Common state values are: | State | Result | | --- | --- | | present | Object should exist. If not present, the object will be created with the provided parameters. If present but not with correct parameters, it will be modified to met provided parameters. | | running | Object should be running not stopped. | | stopped | Object should be stopped not running. | | restarted | Object will be restarted. | | absent | Object should not exist. If it it exists it will be deleted. |
#
Complex Command InputsSome commands may require structured input arguments such as lists
or dictionary
, these can be provided in standard JSON notation wrapped in double curly braces. For example a argument called dns_servers
that accepts a list of server IPs 8.8.8.8 and 8.8.4.4 would be entered as dns_servers="{{ ['8.8.8.8', '8.8.4.4'] }}"
.
Other more advanced data manipulation tools such as Ansible/Jinja2 filters can also be used in-line. For example to get a random number between 0 and 60 you can use {{ 60 | random }}
.
#
CommandsYou can execute these commands from the CLI, as part of an automation, or in a playbook. After you successfully execute a command, a DBot message appears in the War Room with the command details.
#
vmware-about-infoProvides information about VMware server to which user is connecting to Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_about_info_module.html
#
Base Commandvmware-about-info
#
InputArgument Name | Description | Required |
---|
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareAboutInfo.about_info | string | dict about VMware server |
#
Command Example!vmware-about-info
#
Context Example#
Human Readable Output#
SUCCESS
- changed: False
#
About_Info
- api_type: VirtualCenter
- api_version: 6.5
- build: 8024368
- instance_uuid: a2ed9f62-9d30-4ee8-90d0-0f8f830448b4
- license_product_name: VMware VirtualCenter Server
- license_product_version: 6.0
- locale_build: 000
- locale_version: INTL
- os_type: linux-x64
- product_full_name: VMware vCenter Server 6.5.0 build-8024368
- product_line_id: vpx
- product_name: VMware vCenter Server
- vendor: VMware, Inc.
- version: 6.5.0
#
vmware-categoryManage VMware categories Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_category_module.html
#
Base Commandvmware-category
#
InputArgument Name | Description | Required |
---|---|---|
category_name | The name of category to manage. | Required |
category_description | The category description. This is required only if state is set to present . This parameter is ignored, when state is set to absent . | Optional |
category_cardinality | The category cardinality. This parameter is ignored, when updating existing category. Possible values are: multiple, single. Default is multiple. | Optional |
new_category_name | The new name for an existing category. This value is used while updating an existing category. | Optional |
state | The state of category. If set to present and category does not exists, then category is created. If set to present and category exists, then category is updated. If set to absent and category exists, then category is deleted. If set to absent and category does not exists, no action is taken. Process of updating category only allows name, description change. Possible values are: present, absent. Default is present. | Optional |
protocol | The connection to protocol. Possible values are: http, https. Default is https. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareCategory.category_results | unknown | dictionary of category metadata |
#
vmware-category-infoGather info about VMware tag categories Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_category_info_module.html
#
Base Commandvmware-category-info
#
InputArgument Name | Description | Required |
---|---|---|
protocol | The connection to protocol. Possible values are: http, https. Default is https. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareCategoryInfo.tag_category_info | unknown | metadata of tag categories |
#
vmware-cfg-backupBackup / Restore / Reset ESXi host configuration Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_cfg_backup_module.html
#
Base Commandvmware-cfg-backup
#
InputArgument Name | Description | Required |
---|---|---|
esxi_hostname | Name of ESXi server. This is required only if authentication against a vCenter is done. | Optional |
dest | The destination where the ESXi configuration bundle will be saved. The dest can be a folder or a file. If dest is a folder, the backup file will be saved in the folder with the default filename generated from the ESXi server. If dest is a file, the backup file will be saved with that filename. The file extension will always be .tgz. | Optional |
src | The file containing the ESXi configuration that will be restored. | Optional |
state | If saved , the .tgz backup bundle will be saved in dest . If absent , the host configuration will be reset to default values. If loaded , the backup file in src will be loaded to the ESXi host rewriting the hosts settings. Possible values are: saved, absent, loaded. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareCfgBackup.dest_file | string | The full path of where the file holding the ESXi configurations was stored |
#
Command Example!vmware-cfg-backup state="saved" dest="/tmp/" esxi_hostname="esxi01"
#
Context Example#
Human Readable Output#
CHANGED
- changed: True
- dest_file: /tmp/configBundle-esxi01.tgz
#
vmware-clusterManage VMware vSphere clusters Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_cluster_module.html
#
Base Commandvmware-cluster
#
InputArgument Name | Description | Required |
---|---|---|
cluster_name | The name of the cluster to be managed. | Required |
datacenter | The name of the datacenter. | Required |
ignore_drs | If set to yes , DRS will not be configured; all explicit and default DRS related configurations will be ignored. Default is no. | Optional |
ignore_ha | If set to yes , HA will not be configured; all explicit and default HA related configurations will be ignored. Default is no. | Optional |
ignore_vsan | If set to yes , VSAN will not be configured; all explicit and default VSAN related configurations will be ignored. Default is no. | Optional |
enable_drs | If set to yes , will enable DRS when the cluster is created. Use enable_drs of vmware_cluster_drs instead. Deprecated option, will be removed in version 2.12. Default is no. | Optional |
drs_enable_vm_behavior_overrides | Determines whether DRS Behavior overrides for individual virtual machines are enabled. If set to True , overrides drs_default_vm_behavior . Use drs_enable_vm_behavior_overrides of vmware_cluster_drs instead. Deprecated option, will be removed in version 2.12. Possible values are: Yes, No. Default is Yes. | Optional |
drs_default_vm_behavior | Specifies the cluster-wide default DRS behavior for virtual machines. If set to partiallyAutomated , then vCenter generate recommendations for virtual machine migration and for the placement with a host. vCenter automatically implement placement at power on. If set to manual , then vCenter generate recommendations for virtual machine migration and for the placement with a host. vCenter should not implement the recommendations automatically. If set to fullyAutomated , then vCenter should automate both the migration of virtual machines and their placement with a host at power on. Use drs_default_vm_behavior of vmware_cluster_drs instead. Deprecated option, will be removed in version 2.12. Possible values are: fullyAutomated, manual, partiallyAutomated. Default is fullyAutomated. | Optional |
drs_vmotion_rate | Threshold for generated ClusterRecommendations. Use drs_vmotion_rate of vmware_cluster_drs instead. Deprecated option, will be removed in version 2.12. Possible values are: 1, 2, 3, 4, 5. Default is 3. | Optional |
enable_ha | If set to yes will enable HA when the cluster is created. Use enable_ha of vmware_cluster_ha instead. Deprecated option, will be removed in version 2.12. Default is no. | Optional |
ha_host_monitoring | Indicates whether HA restarts virtual machines after a host fails. If set to enabled , HA restarts virtual machines after a host fails. If set to disabled , HA does not restart virtual machines after a host fails. If enable_ha is set to no , then this value is ignored. Use ha_host_monitoring of vmware_cluster_ha instead. Deprecated option, will be removed in version 2.12. Possible values are: enabled, disabled. Default is enabled. | Optional |
ha_vm_monitoring | Indicates the state of virtual machine health monitoring service. If set to vmAndAppMonitoring , HA response to both virtual machine and application heartbeat failure. If set to vmMonitoringDisabled , virtual machine health monitoring is disabled. If set to vmMonitoringOnly , HA response to virtual machine heartbeat failure. If enable_ha is set to no , then this value is ignored. Use ha_vm_monitoring of vmware_cluster_ha instead. Deprecated option, will be removed in version 2.12. Possible values are: vmAndAppMonitoring, vmMonitoringOnly, vmMonitoringDisabled. Default is vmMonitoringDisabled. | Optional |
ha_failover_level | Number of host failures that should be tolerated, still guaranteeing sufficient resources to restart virtual machines on available hosts. Accepts integer values only. Use slot_based_admission_control , reservation_based_admission_control or failover_host_admission_control of vmware_cluster_ha instead. Deprecated option, will be removed in version 2.12. Default is 2. | Optional |
ha_admission_control_enabled | Determines if strict admission control is enabled. It is recommended to set this parameter to True , please refer documentation for more details. Use slot_based_admission_control , reservation_based_admission_control or failover_host_admission_control of vmware_cluster_ha instead. Deprecated option, will be removed in version 2.12. Possible values are: Yes, No. Default is Yes. | Optional |
ha_vm_failure_interval | The number of seconds after which virtual machine is declared as failed if no heartbeat has been received. This setting is only valid if ha_vm_monitoring is set to, either vmAndAppMonitoring or vmMonitoringOnly . Unit is seconds. Use ha_vm_failure_interval of vmware_cluster_ha instead. Deprecated option, will be removed in version 2.12. Default is 30. | Optional |
ha_vm_min_up_time | The number of seconds for the virtual machine's heartbeats to stabilize after the virtual machine has been powered on. This setting is only valid if ha_vm_monitoring is set to, either vmAndAppMonitoring or vmMonitoringOnly . Unit is seconds. Use ha_vm_min_up_time of vmware_cluster_ha instead. Deprecated option, will be removed in version 2.12. Default is 120. | Optional |
ha_vm_max_failures | Maximum number of failures and automated resets allowed during the time that ha_vm_max_failure_window specifies. This setting is only valid if ha_vm_monitoring is set to, either vmAndAppMonitoring or vmMonitoringOnly . Use ha_vm_max_failures of vmware_cluster_ha instead. Deprecated option, will be removed in version 2.12. Default is 3. | Optional |
ha_vm_max_failure_window | The number of seconds for the window during which up to ha_vm_max_failures resets can occur before automated responses stop. This setting is only valid if ha_vm_monitoring is set to, either vmAndAppMonitoring or vmMonitoringOnly . Unit is seconds. Default specifies no failure window. Use ha_vm_max_failure_window of vmware_cluster_ha instead. Deprecated option, will be removed in version 2.12. Default is -1. | Optional |
ha_restart_priority | Determines the preference that HA gives to a virtual machine if sufficient capacity is not available to power on all failed virtual machines. This setting is only valid if ha_vm_monitoring is set to, either vmAndAppMonitoring or vmMonitoringOnly . If set to disabled , then HA is disabled for this virtual machine. If set to high , then virtual machine with this priority have a higher chance of powering on after a failure, when there is insufficient capacity on hosts to meet all virtual machine needs. If set to medium , then virtual machine with this priority have an intermediate chance of powering on after a failure, when there is insufficient capacity on hosts to meet all virtual machine needs. If set to low , then virtual machine with this priority have a lower chance of powering on after a failure, when there is insufficient capacity on hosts to meet all virtual machine needs. Use ha_restart_priority of vmware_cluster_ha instead. Deprecated option, will be removed in version 2.12. Possible values are: disabled, high, low, medium. Default is medium. | Optional |
enable_vsan | If set to yes will enable vSAN when the cluster is created. Use enable_vsan of vmware_cluster_vsan instead. Deprecated option, will be removed in version 2.12. Default is no. | Optional |
vsan_auto_claim_storage | Determines whether the VSAN service is configured to automatically claim local storage on VSAN-enabled hosts in the cluster. Use vsan_auto_claim_storage of vmware_cluster_vsan instead. Deprecated option, will be removed in version 2.12. Possible values are: Yes, No. Default is No. | Optional |
state | Create present or remove absent a VMware vSphere cluster. Possible values are: absent, present. Default is present. | Optional |
#
Context OutputPath | Type | Description |
---|
#
Command Example!vmware-cluster datacenter="DC1" cluster_name="cluster" enable_ha="False" enable_drs="False" enable_vsan="False"
#
Context Example#
Human Readable Output#
SUCCESS
- changed: False
- result: None
#
vmware-cluster-drsManage Distributed Resource Scheduler (DRS) on VMware vSphere clusters Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_cluster_drs_module.html
#
Base Commandvmware-cluster-drs
#
InputArgument Name | Description | Required |
---|---|---|
cluster_name | The name of the cluster to be managed. | Required |
datacenter | The name of the datacenter. | Required |
enable_drs | Whether to enable DRS. Default is no. | Optional |
drs_enable_vm_behavior_overrides | Whether DRS Behavior overrides for individual virtual machines are enabled. If set to True , overrides drs_default_vm_behavior . Possible values are: Yes, No. Default is Yes. | Optional |
drs_default_vm_behavior | Specifies the cluster-wide default DRS behavior for virtual machines. If set to partiallyAutomated , vCenter generates recommendations for virtual machine migration and for the placement with a host, then automatically implements placement recommendations at power on. If set to manual , then vCenter generates recommendations for virtual machine migration and for the placement with a host, but does not implement the recommendations automatically. If set to fullyAutomated , then vCenter automates both the migration of virtual machines and their placement with a host at power on. Possible values are: fullyAutomated, manual, partiallyAutomated. Default is fullyAutomated. | Optional |
drs_vmotion_rate | Threshold for generated ClusterRecommendations. Possible values are: 1, 2, 3, 4, 5. Default is 3. | Optional |
#
Context OutputPath | Type | Description |
---|
#
Command Example!vmware-cluster-drs datacenter="DC1" cluster_name="cluster" enable_drs="False"
#
Context Example#
Human Readable Output#
SUCCESS
- changed: False
- result: None
#
vmware-cluster-haManage High Availability (HA) on VMware vSphere clusters Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_cluster_ha_module.html
#
Base Commandvmware-cluster-ha
#
InputArgument Name | Description | Required |
---|---|---|
cluster_name | The name of the cluster to be managed. | Required |
datacenter | The name of the datacenter. | Required |
enable_ha | Whether to enable HA. Default is no. | Optional |
ha_host_monitoring | Whether HA restarts virtual machines after a host fails. If set to enabled , HA restarts virtual machines after a host fails. If set to disabled , HA does not restart virtual machines after a host fails. If enable_ha is set to no , then this value is ignored. Possible values are: enabled, disabled. Default is enabled. | Optional |
ha_vm_monitoring | State of virtual machine health monitoring service. If set to vmAndAppMonitoring , HA response to both virtual machine and application heartbeat failure. If set to vmMonitoringDisabled , virtual machine health monitoring is disabled. If set to vmMonitoringOnly , HA response to virtual machine heartbeat failure. If enable_ha is set to no , then this value is ignored. Possible values are: vmAndAppMonitoring, vmMonitoringOnly, vmMonitoringDisabled. Default is vmMonitoringDisabled. | Optional |
host_isolation_response | Indicates whether or VMs should be powered off if a host determines that it is isolated from the rest of the compute resource. If set to none , do not power off VMs in the event of a host network isolation. If set to powerOff , power off VMs in the event of a host network isolation. If set to shutdown , shut down VMs guest operating system in the event of a host network isolation. Possible values are: none, powerOff, shutdown. Default is none. | Optional |
slot_based_admission_control | Configure slot based admission control policy. slot_based_admission_control , reservation_based_admission_control and failover_host_admission_control are mutually exclusive. | Optional |
reservation_based_admission_control | Configure reservation based admission control policy. slot_based_admission_control , reservation_based_admission_control and failover_host_admission_control are mutually exclusive. | Optional |
failover_host_admission_control | Configure dedicated failover hosts. slot_based_admission_control , reservation_based_admission_control and failover_host_admission_control are mutually exclusive. | Optional |
ha_vm_failure_interval | The number of seconds after which virtual machine is declared as failed if no heartbeat has been received. This setting is only valid if ha_vm_monitoring is set to, either vmAndAppMonitoring or vmMonitoringOnly . Unit is seconds. Default is 30. | Optional |
ha_vm_min_up_time | The number of seconds for the virtual machine's heartbeats to stabilize after the virtual machine has been powered on. Valid only when ha_vm_monitoring is set to either vmAndAppMonitoring or vmMonitoringOnly . Unit is seconds. Default is 120. | Optional |
ha_vm_max_failures | Maximum number of failures and automated resets allowed during the time that ha_vm_max_failure_window specifies. Valid only when ha_vm_monitoring is set to either vmAndAppMonitoring or vmMonitoringOnly . Default is 3. | Optional |
ha_vm_max_failure_window | The number of seconds for the window during which up to ha_vm_max_failures resets can occur before automated responses stop. Valid only when ha_vm_monitoring is set to either vmAndAppMonitoring or vmMonitoringOnly . Unit is seconds. Default specifies no failure window. Default is -1. | Optional |
ha_restart_priority | Priority HA gives to a virtual machine if sufficient capacity is not available to power on all failed virtual machines. Valid only if ha_vm_monitoring is set to either vmAndAppMonitoring or vmMonitoringOnly . If set to disabled , then HA is disabled for this virtual machine. If set to high , then virtual machine with this priority have a higher chance of powering on after a failure, when there is insufficient capacity on hosts to meet all virtual machine needs. If set to medium , then virtual machine with this priority have an intermediate chance of powering on after a failure, when there is insufficient capacity on hosts to meet all virtual machine needs. If set to low , then virtual machine with this priority have a lower chance of powering on after a failure, when there is insufficient capacity on hosts to meet all virtual machine needs. Possible values are: disabled, high, low, medium. Default is medium. | Optional |
#
Context OutputPath | Type | Description |
---|
#
Command Example!vmware-cluster-ha datacenter="DC1" cluster_name="cluster" enable_ha="False"
#
Context Example#
Human Readable Output#
SUCCESS
- changed: False
- result: None
#
vmware-cluster-infoGather info about clusters available in given vCenter Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_cluster_info_module.html
#
Base Commandvmware-cluster-info
#
InputArgument Name | Description | Required |
---|---|---|
datacenter | Datacenter to search for cluster/s. This parameter is required, if cluster_name is not supplied. | Optional |
cluster_name | Name of the cluster. If set, information of this cluster will be returned. This parameter is required, if datacenter is not supplied. | Optional |
show_tag | Tags related to cluster are shown if set to True . Possible values are: Yes, No. Default is No. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareClusterInfo.clusters | unknown | metadata about the available clusters |
#
Command Example!vmware-cluster-info datacenter="DC1"
#
Context Example#
Human Readable Output#
SUCCESS
- changed: False
#
Clusters
#
Cluster
- datacenter: DC1
- drs_default_vm_behavior: fullyAutomated
- drs_enable_vm_behavior_overrides: True
- drs_vmotion_rate: 3
- enable_ha: False
- enabled_drs: False
- enabled_vsan: False
- ha_admission_control_enabled: True
- ha_failover_level: 2
- ha_host_monitoring: enabled
- ha_vm_monitoring: vmMonitoringDisabled
- moid: domain-c7
- vsan_auto_claim_storage: False
#
Ha_Restart_Priority
- 0: medium
#
Ha_Vm_Failure_Interval
- 0: 30
#
Ha_Vm_Max_Failure_Window
- 0: -1
#
Ha_Vm_Max_Failures
- 0: 3
#
Ha_Vm_Min_Up_Time
- 0: 120
#
Ha_Vm_Tools_Monitoring
- 0: vmMonitoringDisabled
#
Hosts#
esxi01
- folder: /DC1/host/cluster
- name: esxi01
#
Resource_Summary
- cpuCapacityMHz: 5330
- cpuUsedMHz: 32
- memCapacityMB: 6143
- memUsedMB: 1487
- pMemAvailableMB: None
- pMemCapacityMB: None
- storageCapacityMB: 7936
- storageUsedMB: 1439
#
Tags
#
vmware-cluster-vsanManages virtual storage area network (vSAN) configuration on VMware vSphere clusters Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_cluster_vsan_module.html
#
Base Commandvmware-cluster-vsan
#
InputArgument Name | Description | Required |
---|---|---|
cluster_name | The name of the cluster to be managed. | Required |
datacenter | The name of the datacenter. | Required |
enable_vsan | Whether to enable vSAN. Default is no. | Optional |
vsan_auto_claim_storage | Whether the VSAN service is configured to automatically claim local storage on VSAN-enabled hosts in the cluster. Possible values are: Yes, No. Default is No. | Optional |
#
Context OutputPath | Type | Description |
---|
#
vmware-content-deploy-templateDeploy Virtual Machine from template stored in content library. Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_content_deploy_template_module.html
#
Base Commandvmware-content-deploy-template
#
InputArgument Name | Description | Required |
---|---|---|
template | The name of template from which VM to be deployed. | Required |
name | The name of the VM to be deployed. | Required |
datacenter | Name of the datacenter, where VM to be deployed. | Required |
datastore | Name of the datastore to store deployed VM and disk. | Required |
folder | Name of the folder in datacenter in which to place deployed VM. | Required |
host | Name of the ESX Host in datacenter in which to place deployed VM. | Required |
resource_pool | Name of the resourcepool in datacenter in which to place deployed VM. | Optional |
cluster | Name of the cluster in datacenter in which to place deployed VM. | Optional |
state | The state of Virtual Machine deployed from template in content library. If set to present and VM does not exists, then VM is created. If set to present and VM exists, no action is taken. If set to poweredon and VM does not exists, then VM is created with powered on state. If set to poweredon and VM exists, no action is taken. Possible values are: present, poweredon. Default is present. | Optional |
protocol | The connection to protocol. Possible values are: http, https. Default is https. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareContentDeployTemplate.vm_deploy_info | unknown | Virtual machine deployment message and vm_id |
#
vmware-content-library-infoGather information about VMware Content Library Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_content_library_info_module.html
#
Base Commandvmware-content-library-info
#
InputArgument Name | Description | Required |
---|---|---|
library_id | content library id for which details needs to be fetched. | Optional |
protocol | The connection to protocol. Possible values are: http, https. Default is https. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareContentLibraryInfo.content_lib_details | unknown | list of content library metadata |
VMware.VmwareContentLibraryInfo.content_libs | unknown | list of content libraries |
#
vmware-content-library-managerCreate, update and delete VMware content library Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_content_library_manager_module.html
#
Base Commandvmware-content-library-manager
#
InputArgument Name | Description | Required |
---|---|---|
library_name | The name of VMware content library to manage. | Required |
library_description | The content library description. This is required only if state is set to present . This parameter is ignored, when state is set to absent . Process of updating content library only allows description change. | Optional |
library_type | The content library type. This is required only if state is set to present . This parameter is ignored, when state is set to absent . Possible values are: local, subscribed. Default is local. | Optional |
datastore_name | Name of the datastore on which backing content library is created. This is required only if state is set to present . This parameter is ignored, when state is set to absent . Currently only datastore backing creation is supported. | Optional |
state | The state of content library. If set to present and library does not exists, then content library is created. If set to present and library exists, then content library is updated. If set to absent and library exists, then content library is deleted. If set to absent and library does not exists, no action is taken. Possible values are: present, absent. Default is present. | Optional |
protocol | The connection to protocol. Possible values are: http, https. Default is https. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareContentLibraryManager.content_library_info | unknown | library creation success and library_id |
#
vmware-datacenterManage VMware vSphere Datacenters Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_datacenter_module.html
#
Base Commandvmware-datacenter
#
InputArgument Name | Description | Required |
---|---|---|
datacenter_name | The name of the datacenter the cluster will be created in. | Required |
state | If the datacenter should be present or absent. Possible values are: present, absent. Default is present. | Optional |
#
Context OutputPath | Type | Description |
---|
#
Command Example!vmware-datacenter datacenter_name="DC1" state="present"
#
Context Example#
Human Readable Output#
SUCCESS
- changed: False
#
vmware-datastore-clusterManage VMware vSphere datastore clusters Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_datastore_cluster_module.html
#
Base Commandvmware-datastore-cluster
#
InputArgument Name | Description | Required |
---|---|---|
datacenter_name | The name of the datacenter. You must specify either a datacenter_name or a folder . Mutually exclusive with folder parameter. | Optional |
datastore_cluster_name | The name of the datastore cluster. | Required |
state | If the datastore cluster should be present or absent. Possible values are: present, absent. Default is present. | Optional |
folder | Destination folder, absolute path to place datastore cluster in. The folder should include the datacenter. This parameter is case sensitive. You must specify either a folder or a datacenter_name . Examples: folder: /datacenter1/datastore folder: datacenter1/datastore folder: /datacenter1/datastore/folder1 folder: datacenter1/datastore/folder1 folder: /folder1/datacenter1/datastore folder: folder1/datacenter1/datastore folder: /folder1/datacenter1/datastore/folder2. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareDatastoreCluster.result | string | information about datastore cluster operation |
#
Command Example!vmware-datastore-cluster datacenter_name="DC1" datastore_cluster_name="Storage_Cluster" state="present"
#
Context Example#
Human Readable Output#
CHANGED
- changed: True
- result: Datastore cluster 'Storage_Cluster' created successfully.
#
vmware-datastore-infoGather info about datastores available in given vCenter Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_datastore_info_module.html
#
Base Commandvmware-datastore-info
#
InputArgument Name | Description | Required |
---|---|---|
name | Name of the datastore to match. If set, information of specific datastores are returned. | Optional |
datacenter | Datacenter to search for datastores. This parameter is required, if cluster is not supplied. | Optional |
cluster | Cluster to search for datastores. If set, information of datastores belonging this clusters will be returned. This parameter is required, if datacenter is not supplied. | Optional |
gather_nfs_mount_info | Gather mount information of NFS datastores. Disabled per default because this slows down the execution if you have a lot of datastores. Possible values are: Yes, No. Default is No. | Optional |
gather_vmfs_mount_info | Gather mount information of VMFS datastores. Disabled per default because this slows down the execution if you have a lot of datastores. Possible values are: Yes, No. Default is No. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareDatastoreInfo.datastores | unknown | metadata about the available datastores |
#
Command Example!vmware-datastore-info datacenter_name="DC1"
#
Context Example#
Human Readable Output#
SUCCESS
#
vmware-datastore-maintenancemodePlace a datastore into maintenance mode Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_datastore_maintenancemode_module.html
#
Base Commandvmware-datastore-maintenancemode
#
InputArgument Name | Description | Required |
---|---|---|
datastore | Name of datastore to manage. If datastore_cluster or cluster_name are not set, this parameter is required. | Optional |
datastore_cluster | Name of the datastore cluster from all child datastores to be managed. If datastore or cluster_name are not set, this parameter is required. | Optional |
cluster_name | 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 state . If datastore or datastore_cluster are not set, this parameter is required. | Optional |
state | If set to present , then enter datastore into maintenance mode. If set to present and datastore is already in maintenance mode, then no action will be taken. If set to absent and datastore is in maintenance mode, then exit maintenance mode. If set to absent and datastore is not in maintenance mode, then no action will be taken. Possible values are: present, absent. Default is present. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareDatastoreMaintenancemode.results | unknown | Action taken for datastore |
#
Command Example!vmware-datastore-maintenancemode datastore="datastore1" state="present"
#
Context Example#
Human Readable Output#
CHANGED
- changed: True
#
Datastore_Status
- datastore1: Datastore 'datastore1' entered in maintenance mode.
#
vmware-dns-configManage VMware ESXi DNS Configuration Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_dns_config_module.html
#
Base Commandvmware-dns-config
#
InputArgument Name | Description | Required |
---|---|---|
change_hostname_to | The hostname that an ESXi host should be changed to. | Required |
domainname | The domain the ESXi host should be apart of. | Required |
dns_servers | The DNS servers that the host should be configured to use. | Required |
#
Context OutputPath | Type | Description |
---|
#
Command Example!vmware-dns-config change_hostname_to="esxi01" domainname="foo.org" dns_servers="{{ ['8.8.8.8', '8.8.4.4'] }}"
#
Context Example#
Human Readable Output#
SUCCESS
- changed: False
#
vmware-drs-groupCreates vm/host group in a given cluster. Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_drs_group_module.html
#
Base Commandvmware-drs-group
#
InputArgument Name | Description | Required |
---|---|---|
cluster_name | Cluster to create vm/host group. | Required |
datacenter | Datacenter to search for given cluster. If not set, we use first cluster we encounter with cluster_name . | Optional |
group_name | The name of the group to create or remove. | Required |
hosts | List of hosts to create in group. Required only if vms is not set. | Optional |
state | If set to present and the group doesn't exists then the group will be created. If set to absent and the group exists then the group will be deleted. Possible values are: present, absent. Default is present. | Required |
vms | List of vms to create in group. Required only if hosts is not set. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareDrsGroup.drs_group_facts | unknown | Metadata about DRS group created |
#
Command Example!vmware-drs-group cluster_name="cluster" datacenter_name="DC1" group_name="TEST_VM_01" vms="Sample_VM" state="present"
#
Context Example#
Human Readable Output#
SUCCESS
#
vmware-drs-group-infoGathers info about DRS VM/Host groups on the given cluster Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_drs_group_info_module.html
#
Base Commandvmware-drs-group-info
#
InputArgument Name | Description | Required |
---|---|---|
cluster_name | Cluster to search for VM/Host groups. If set, information of DRS groups belonging this cluster will be returned. Not needed if datacenter is set. | Optional |
datacenter | Datacenter to search for DRS VM/Host groups. | Required |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareDrsGroupInfo.drs_group_info | unknown | Metadata about DRS group from given cluster / datacenter |
#
Command Example!vmware-drs-group-info datacenter="DC1"
#
Context Example#
Human Readable Output#
SUCCESS
#
vmware-drs-rule-infoGathers info about DRS rule on the given cluster Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_drs_rule_info_module.html
#
Base Commandvmware-drs-rule-info
#
InputArgument Name | Description | Required |
---|---|---|
cluster_name | Name of the cluster. DRS information for the given cluster will be returned. This is required parameter if datacenter parameter is not provided. | Optional |
datacenter | Name of the datacenter. DRS information for all the clusters from the given datacenter will be returned. This is required parameter if cluster_name parameter is not provided. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareDrsRuleInfo.drs_rule_info | unknown | metadata about DRS rule from given cluster / datacenter |
#
Command Example!vmware-drs-rule-info cluster_name="cluster"
#
Context Example#
Human Readable Output#
SUCCESS
#
vmware-dvs-hostAdd or remove a host from distributed virtual switch Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_dvs_host_module.html
#
Base Commandvmware-dvs-host
#
InputArgument Name | Description | Required |
---|---|---|
esxi_hostname | The ESXi hostname. | Required |
switch_name | The name of the Distributed vSwitch. | Required |
vmnics | The ESXi hosts vmnics to use with the Distributed vSwitch. | Required |
state | If the host should be present or absent attached to the vSwitch. Possible values are: present, absent. Default is present. | Required |
vendor_specific_config | List of key,value dictionaries for the Vendor Specific Configuration. Element attributes are: - key (str): Key of setting. (default: None) - value (str): Value of setting. (default: None). | Optional |
#
Context OutputPath | Type | Description |
---|
#
vmware-dvs-portgroupCreate or remove a Distributed vSwitch portgroup. Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_dvs_portgroup_module.html
#
Base Commandvmware-dvs-portgroup
#
InputArgument Name | Description | Required |
---|---|---|
portgroup_name | The name of the portgroup that is to be created or deleted. | Required |
switch_name | The name of the distributed vSwitch the port group should be created on. | Required |
vlan_id | The VLAN ID that should be configured with the portgroup, use 0 for no VLAN. If vlan_trunk is configured to be true , this can be a combination of multiple ranges and numbers, example: 1-200, 205, 400-4094. The valid vlan_id range is from 0 to 4094. Overlapping ranges are allowed. | Required |
num_ports | The number of ports the portgroup should contain. | Required |
portgroup_type | See VMware KB 1022312 regarding portgroup types. Possible values are: earlyBinding, lateBinding, ephemeral. | Required |
state | Determines if the portgroup should be present or not. Possible values are: present, absent. | Required |
vlan_trunk | Indicates whether this is a VLAN trunk or not. Possible values are: Yes, No. Default is No. | Optional |
network_policy | Dictionary which configures the different security values for portgroup. Valid attributes are: - promiscuous (bool): indicates whether promiscuous mode is allowed. (default: false) - forged_transmits (bool): indicates whether forged transmits are allowed. (default: false) - mac_changes (bool): indicates whether mac changes are allowed. (default: false). Default is {'promiscuous': False, 'forged_transmits': False, 'mac_changes': False}. | Optional |
teaming_policy | Dictionary which configures the different teaming values for portgroup. Valid attributes are: - load_balance_policy (string): Network adapter teaming policy. (default: loadbalance_srcid) - choices: [ loadbalance_ip, loadbalance_srcmac, loadbalance_srcid, loadbalance_loadbased, failover_explicit] - "loadbalance_loadbased" is available from version 2.6 and onwards - inbound_policy (bool): Indicate whether or not the teaming policy is applied to inbound frames as well. (default: False) - notify_switches (bool): Indicate whether or not to notify the physical switch if a link fails. (default: True) - rolling_order (bool): Indicate whether or not to use a rolling policy when restoring links. (default: False). Default is {'notify_switches': True, 'load_balance_policy': 'loadbalance_srcid', 'inbound_policy': False, 'rolling_order': False}. | Optional |
port_policy | Dictionary which configures the advanced policy settings for the portgroup. Valid attributes are: - block_override (bool): indicates if the block policy can be changed per port. (default: true) - ipfix_override (bool): indicates if the ipfix policy can be changed per port. (default: false) - live_port_move (bool): indicates if a live port can be moved in or out of the portgroup. (default: false) - network_rp_override (bool): indicates if the network resource pool can be changed per port. (default: false) - port_config_reset_at_disconnect (bool): indicates if the configuration of a port is reset automatically after disconnect. (default: true) - security_override (bool): indicates if the security policy can be changed per port. (default: false) - shaping_override (bool): indicates if the shaping policy can be changed per port. (default: false) - traffic_filter_override (bool): indicates if the traffic filter can be changed per port. (default: false) - uplink_teaming_override (bool): indicates if the uplink teaming policy can be changed per port. (default: false) - vendor_config_override (bool): indicates if the vendor config can be changed per port. (default: false) - vlan_override (bool): indicates if the vlan can be changed per port. (default: false). Default is {'traffic_filter_override': False, 'network_rp_override': False, 'live_port_move': False, 'security_override': False, 'vendor_config_override': False, 'port_config_reset_at_disconnect': True, 'uplink_teaming_override': False, 'block_override': True, 'shaping_override': False, 'vlan_override': False, 'ipfix_override': False}. | Optional |
#
Context OutputPath | Type | Description |
---|
#
Command Example!vmware-dvs-portgroup portgroup_name="vlan-123-portrgoup" switch_name="dvSwitch" vlan_id="123" num_ports="120" portgroup_type="earlyBinding" state="present"
#
Context Example#
Human Readable Output#
CHANGED
- changed: True
- result: None
#
vmware-dvs-portgroup-findFind portgroup(s) in a VMware environment Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_dvs_portgroup_find_module.html
#
Base Commandvmware-dvs-portgroup-find
#
InputArgument Name | Description | Required |
---|---|---|
dvswitch | Name of a distributed vSwitch to look for. | Optional |
vlanid | VLAN id can be any number between 1 and 4094. This search criteria will looks into VLAN ranges to find possible matches. | Optional |
name | string to check inside the name of the portgroup. Basic containment check using python in operation. | Optional |
show_uplink | Show or hide uplink portgroups. Only relevant when vlanid is supplied. Possible values are: Yes, No. Default is No. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareDvsPortgroupFind.dvs_portgroups | unknown | basic details of portgroups found |
#
Command Example!vmware-dvs-portgroup-find dvswitch="dvSwitch"
#
Context Example#
Human Readable Output#
SUCCESS
#
vmware-dvs-portgroup-infoGathers info DVS portgroup configurations Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_dvs_portgroup_info_module.html
#
Base Commandvmware-dvs-portgroup-info
#
InputArgument Name | Description | Required |
---|---|---|
datacenter | Name of the datacenter. | Required |
dvswitch | Name of a dvswitch to look for. | Optional |
show_network_policy | Show or hide network policies of DVS portgroup. Possible values are: Yes, No. Default is Yes. | Optional |
show_port_policy | Show or hide port policies of DVS portgroup. Possible values are: Yes, No. Default is Yes. | Optional |
show_teaming_policy | Show or hide teaming policies of DVS portgroup. Possible values are: Yes, No. Default is Yes. | Optional |
show_vlan_info | Show or hide vlan information of the DVS portgroup. Possible values are: Yes, No. Default is No. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareDvsPortgroupInfo.dvs_portgroup_info | unknown | metadata about DVS portgroup configuration |
#
Command Example!vmware-dvs-portgroup-info datacenter="DC1"
#
Context Example#
Human Readable Output#
SUCCESS
- changed: False
#
Dvs_Portgroup_Info
#
Dvswitch#
Dvswitch
- description: None
- dvswitch_name: dvSwitch
- key: dvportgroup-25
- num_ports: 120
- portgroup_name: vlan-123-portrgoup
- type: earlyBinding
#
Network_Policy
- forged_transmits: False
- mac_changes: False
- promiscuous: False
#
Port_Policy
- block_override: True
- ipfix_override: False
- live_port_move: False
- network_rp_override: False
- port_config_reset_at_disconnect: True
- security_override: False
- shaping_override: False
- traffic_filter_override: False
- uplink_teaming_override: False
- vendor_config_override: False
- vlan_override: False
#
Teaming_Policy
- inbound_policy: False
- notify_switches: True
- policy: loadbalance_srcid
- rolling_order: False
#
Vlan_Info#
Dvswitch
- description: None
- dvswitch_name: dvSwitch
- key: dvportgroup-24
- num_ports: 0
- portgroup_name: dvSwitch-DVUplinks-23
- type: earlyBinding
#
Network_Policy
- forged_transmits: True
- mac_changes: False
- promiscuous: False
#
Port_Policy
- block_override: True
- ipfix_override: False
- live_port_move: False
- network_rp_override: False
- port_config_reset_at_disconnect: True
- security_override: False
- shaping_override: False
- traffic_filter_override: False
- uplink_teaming_override: False
- vendor_config_override: False
- vlan_override: False
#
Teaming_Policy
- inbound_policy: True
- notify_switches: True
- policy: loadbalance_srcid
- rolling_order: False
#
Vlan_Info
#
vmware-dvswitchCreate or remove a Distributed Switch Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_dvswitch_module.html
#
Base Commandvmware-dvswitch
#
InputArgument Name | Description | Required |
---|---|---|
datacenter_name | The name of the datacenter that will contain the Distributed Switch. This parameter is optional, if folder is provided. Mutually exclusive with folder parameter. | Optional |
switch_name | The name of the distribute vSwitch to create or remove. | Required |
switch_version | 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.6.0, 6.5.0, 6.0.0 with a vCenter running vSphere 6.7. 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. Required only if state is set to present . Possible values are: 5.0.0, 5.1.0, 5.5.0, 6.0.0, 6.5.0, 6.6.0. | Optional |
mtu | The switch maximum transmission unit. Required parameter for state both present and absent , before Ansible 2.6 version. Required only if state is set to present , for Ansible 2.6 and onwards. Accepts value between 1280 to 9000 (both inclusive). Default is 1500. | Optional |
multicast_filtering_mode | The multicast filtering mode. basic mode: multicast traffic for virtual machines is forwarded according to the destination MAC address of the multicast group. snooping mode: the Distributed Switch provides IGMP and MLD snooping according to RFC 4541. Possible values are: basic, snooping. Default is basic. | Optional |
uplink_quantity | Quantity of uplink per ESXi host added to the Distributed Switch. The uplink quantity can be increased or decreased, but a decrease will only be successfull if the uplink isn't used by a portgroup. Required parameter for state both present and absent , before Ansible 2.6 version. Required only if state is set to present , for Ansible 2.6 and onwards. | Optional |
uplink_prefix | The prefix used for the naming of the uplinks. Only valid if the Distributed Switch will be created. Not used if the Distributed Switch is already present. Uplinks are created as Uplink 1, Uplink 2, etc. pp. by default. Default is Uplink . | Optional |
discovery_proto | Link discovery protocol between Cisco and Link Layer discovery. Required parameter for state both present and absent , before Ansible 2.6 version. Required only if state is set to present , for Ansible 2.6 and onwards. cdp : Use Cisco Discovery Protocol (CDP). lldp : Use Link Layer Discovery Protocol (LLDP). disabled : Do not use a discovery protocol. Possible values are: cdp, lldp, disabled. Default is cdp. | Optional |
discovery_operation | Select the discovery operation. Required parameter for state both present and absent , before Ansible 2.6 version. Required only if state is set to present , for Ansible 2.6 and onwards. Possible values are: both, advertise, listen. Default is listen. | Optional |
contact | Dictionary which configures administrator contact name and description for the Distributed Switch. Valid attributes are: - name (str): Administrator name. - description (str): Description or other details. | Optional |
description | Description of the Distributed Switch. | Optional |
health_check | Dictionary which configures Health Check for the Distributed Switch. Valid attributes are: - vlan_mtu (bool): VLAN and MTU health check. (default: False) - teaming_failover (bool): Teaming and failover health check. (default: False) - vlan_mtu_interval (int): VLAN and MTU health check interval (minutes). (default: 0) - The default for vlan_mtu_interval is 1 in the vSphere Client if the VLAN and MTU health check is enabled. - teaming_failover_interval (int): Teaming and failover health check interval (minutes). (default: 0) - The default for teaming_failover_interval is 1 in the vSphere Client if the Teaming and failover health check is enabled. Default is {'vlan_mtu': False, 'teaming_failover': False, 'vlan_mtu_interval': 0, 'teaming_failover_interval': 0}. | Optional |
state | If set to present and the Distributed Switch doesn't exists then the Distributed Switch will be created. If set to absent and the Distributed Switch exists then the Distributed Switch will be deleted. Possible values are: present, absent. Default is present. | Optional |
folder | Destination folder, absolute path to place dvswitch in. The folder should include the datacenter. This parameter is case sensitive. This parameter is optional, if datacenter is provided. Examples: folder: /datacenter1/network folder: datacenter1/network folder: /datacenter1/network/folder1 folder: datacenter1/network/folder1 folder: /folder1/datacenter1/network folder: folder1/datacenter1/network folder: /folder1/datacenter1/network/folder2. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareDvswitch.result | string | information about performed operation |
#
Command Example!vmware-dvswitch datacenter="DC1" switch_name="dvSwitch" version="6.0.0" mtu="9000" uplink_quantity="2" discovery_protocol="lldp" discovery_operation="both" state="present" datacenter_name="DC1"
#
Context Example#
Human Readable Output#
CHANGED
- changed: True
- result: DVS created
#
vmware-dvswitch-lacpManage LACP configuration on a Distributed Switch Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_dvswitch_lacp_module.html
#
Base Commandvmware-dvswitch-lacp
#
InputArgument Name | Description | Required |
---|---|---|
switch | The name of the Distributed Switch to manage. | Required |
support_mode | The LACP support mode. basic : One Link Aggregation Control Protocol group in the switch (singleLag). enhanced : Multiple Link Aggregation Control Protocol groups in the switch (multipleLag). Possible values are: basic, enhanced. Default is basic. | Optional |
link_aggregation_groups | Can only be used if lacp_support is set to enhanced . The following parameters are required: - name (string): Name of the LAG. - uplink_number (int): Number of uplinks. Can 1 to 30. - mode (string): The negotiating state of the uplinks/ports. - choices: [ active, passive ] - load_balancing_mode (string): Load balancing algorithm. - Valid attributes are: - srcTcpUdpPort: Source TCP/UDP port number. - srcDestIpTcpUdpPortVlan: Source and destination IP, source and destination TCP/UDP port number and VLAN. - srcIpVlan: Source IP and VLAN. - srcDestTcpUdpPort: Source and destination TCP/UDP port number. - srcMac: Source MAC address. - destIp: Destination IP. - destMac: Destination MAC address. - vlan: VLAN only. - srcDestIp: Source and Destination IP. - srcIpTcpUdpPortVlan: Source IP, TCP/UDP port number and VLAN. - srcDestIpTcpUdpPort: Source and destination IP and TCP/UDP port number. - srcDestMac: Source and destination MAC address. - destIpTcpUdpPort: Destination IP and TCP/UDP port number. - srcPortId: Source Virtual Port Id. - srcIp: Source IP. - srcIpTcpUdpPort: Source IP and TCP/UDP port number. - destIpTcpUdpPortVlan: Destination IP, TCP/UDP port number and VLAN. - destTcpUdpPort: Destination TCP/UDP port number. - destIpVlan: Destination IP and VLAN. - srcDestIpVlan: Source and destination IP and VLAN. - The default load balancing mode in the vSphere Client is srcDestIpTcpUdpPortVlan. Please see examples for more information. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareDvswitchLacp.result | string | information about performed operation |
#
Command Example!vmware-dvswitch-lacp switch="dvSwitch" support_mode="enhanced"
#
Context Example#
Human Readable Output#
CHANGED
- changed: True
- dvswitch: dvSwitch
- result: support mode changed
- support_mode: enhanced
- support_mode_previous: basic
#
Link_Aggregation_Groups
#
vmware-dvswitch-niocManage distributed switch Network IO Control Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_dvswitch_nioc_module.html
#
Base Commandvmware-dvswitch-nioc
#
InputArgument Name | Description | Required |
---|---|---|
switch | The name of the distributed switch. | Required |
version | Network IO control version. Possible values are: version2, version3. | Optional |
state | Enable or disable NIOC on the distributed switch. Possible values are: present, absent. Default is present. | Optional |
resources | List of dicts containing { name: Resource name is one of the following: "faultTolerance", "hbr", "iSCSI", "management", "nfs", "vdp", "virtualMachine", "vmotion", "vsan" limit: The maximum allowed usage for a traffic class belonging to this resource pool per host physical NIC. reservation: (Ignored if NIOC version is set to version2) Amount of bandwidth resource that is guaranteed available to the host infrastructure traffic class. If the utilization is less than the reservation, the extra bandwidth is used for other host infrastructure traffic class types. Reservation is not allowed to exceed the value of limit, if limit is set. Unit is Mbits/sec. shares_level: The allocation level ("low", "normal", "high", "custom"). The level is a simplified view of shares. Levels map to a pre-determined set of numeric values for shares. shares: Ignored unless shares_level is "custom". The number of shares allocated. reservation: Ignored unless version is "version3". Amount of bandwidth resource that is guaranteed available to the host infrastructure traffic class. }. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareDvswitchNioc.dvswitch_nioc_status | string | result of the changes |
VMware.VmwareDvswitchNioc.resources_changed | unknown | list of resources which were changed |
#
Command Example!vmware-dvswitch-nioc switch="dvSwitch" version="version3" resources="{{ [{'name': 'vmotion', 'limit': -1, 'reservation': 128, 'shares_level': 'normal'}, {'name': 'vsan', 'limit': -1, 'shares_level': 'custom', 'shares': 99, 'reservation': 256}] }}" state="present"
#
Context Example#
Human Readable Output#
CHANGED
- changed: True
- dvswitch_nioc_status: Enabled NIOC with version version3
#
Resources_Changed
- 0: vmotion
- 1: vsan
#
vmware-dvswitch-pvlansManage Private VLAN configuration of a Distributed Switch Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_dvswitch_pvlans_module.html
#
Base Commandvmware-dvswitch-pvlans
#
InputArgument Name | Description | Required |
---|---|---|
switch | The name of the Distributed Switch. | Required |
primary_pvlans | A list of VLAN IDs that should be configured as Primary PVLANs. If primary_pvlans isn't specified, all PVLANs will be deleted if present. Each member of the list requires primary_pvlan_id (int) set. The secondary promiscuous PVLAN will be created automatically. If secondary_pvlans isn't specified, the primary PVLANs and each secondary promiscuous PVLAN will be created. Please see examples for more information. | Optional |
secondary_pvlans | A list of VLAN IDs that should be configured as Secondary PVLANs. primary_pvlans need to be specified to create any Secondary PVLAN. If 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. The type of the secondary PVLAN can be isolated or community. The secondary promiscuous PVLAN will be created automatically. Please see examples for more information. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareDvswitchPvlans.result | string | information about performed operation |
#
vmware-dvswitch-uplink-pgManage uplink portproup configuration of a Distributed Switch Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_dvswitch_uplink_pg_module.html
#
Base Commandvmware-dvswitch-uplink-pg
#
InputArgument Name | Description | Required |
---|---|---|
switch | The name of the Distributed Switch. | Required |
name | The name of the uplink portgroup. The current name will be used if not specified. | Optional |
description | The description of the uplink portgroup. | Optional |
advanced | Dictionary which configures the advanced policy settings for the uplink portgroup. Valid attributes are: - port_config_reset_at_disconnect (bool): indicates if the configuration of a port is reset automatically after disconnect. (default: true) - block_override (bool): indicates if the block policy can be changed per port. (default: true) - netflow_override (bool): indicates if the NetFlow policy can be changed per port. (default: false) - traffic_filter_override (bool): indicates if the traffic filter can be changed per port. (default: false) - vendor_config_override (bool): indicates if the vendor config can be changed per port. (default: false) - vlan_override (bool): indicates if the vlan can be changed per port. (default: false). Default is {'port_config_reset_at_disconnect': True, 'block_override': True, 'vendor_config_override': False, 'vlan_override': False, 'netflow_override': False, 'traffic_filter_override': False}. | Optional |
vlan_trunk_range | The VLAN trunk range that should be configured with the uplink portgroup. This can be a combination of multiple ranges and numbers, example: [ 2-3967, 4049-4092 ]. Default is ['0-4094']. | Optional |
lacp | Dictionary which configures the LACP settings for the uplink portgroup. The options are only used if the LACP support mode is set to 'basic'. The following parameters are required: - status (str): Indicates if LACP is enabled. (default: disabled) - mode (str): The negotiating state of the uplinks/ports. (default: passive). Default is {'status': 'disabled', 'mode': 'passive'}. | Optional |
netflow_enabled | Indicates if NetFlow is enabled on the uplink portgroup. Possible values are: Yes, No. Default is No. | Optional |
block_all_ports | Indicates if all ports are blocked on the uplink portgroup. Possible values are: Yes, No. Default is No. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareDvswitchUplinkPg.result | string | information about performed operation |
#
Command Example!vmware-dvswitch-uplink-pg switch="dvSwitch" name="dvSwitch-DVUplinks" advanced="{{ {'port_config_reset_at_disconnect': True, 'block_override': True, 'vendor_config_override': False, 'vlan_override': False, 'netflow_override': False, 'traffic_filter_override': False} }}" vlan_trunk_range="0-4094" netflow_enabled="False" block_all_ports="False"
#
Context Example#
Human Readable Output#
CHANGED
- adv_block_ports: True
- adv_netflow: False
- adv_reset_at_disconnect: True
- adv_traffic_filtering: False
- adv_vendor_conf: False
- adv_vlan: False
- block_all_ports: False
- changed: True
- description: None
- dvswitch: dvSwitch
- name: dvSwitch-DVUplinks
- name_previous: dvSwitch-DVUplinks-23
- netflow_enabled: False
- result: name changed
#
Vlan_Trunk_Range
- 0: 0-4094
#
vmware-evc-modeEnable/Disable EVC mode on vCenter Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_evc_mode_module.html
#
Base Commandvmware-evc-mode
#
InputArgument Name | Description | Required |
---|---|---|
datacenter_name | The name of the datacenter the cluster belongs to that you want to enable or disable EVC mode on. | Required |
cluster_name | The name of the cluster to enable or disable EVC mode on. | Required |
evc_mode | Required for state=present . The EVC mode to enable or disable on the cluster. (intel-broadwell, intel-nehalem, intel-merom, etc.). | Required |
state | Add or remove EVC mode. Possible values are: absent, present. Default is present. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareEvcMode.result | string | information about performed operation |
#
Command Example!vmware-evc-mode datacenter_name="DC1" cluster_name="cluster" evc_mode="intel-merom" state="present"
#
Context Example#
Human Readable Output#
SUCCESS
- changed: False
- msg: EVC Mode is already set to 'intel-merom' on 'cluster'.
#
vmware-folder-infoProvides information about folders in a datacenter Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_folder_info_module.html
#
Base Commandvmware-folder-info
#
InputArgument Name | Description | Required |
---|---|---|
datacenter | Name of the datacenter. | Required |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareFolderInfo.folder_info | string | dict about folders |
#
Command Example!vmware-folder-info datacenter="DC1"
#
Context Example#
Human Readable Output#
SUCCESS
#
vmware-guestManages virtual machines in vCenter Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_guest_module.html
#
Base Commandvmware-guest
#
InputArgument Name | Description | Required |
---|---|---|
state | Specify the state the virtual machine should be in. If state is set to present and virtual machine exists, ensure the virtual machine configurations conforms to task arguments. If state is set to absent and virtual machine exists, then the specified virtual machine is removed with its associated components. If state is set to one of the following poweredon , poweredoff , present , restarted , suspended and virtual machine does not exists, then virtual machine is deployed with given parameters. If state is set to poweredon and virtual machine exists with powerstate other than powered on, then the specified virtual machine is powered on. If state is set to poweredoff and virtual machine exists with powerstate other than powered off, then the specified virtual machine is powered off. If state is set to restarted and virtual machine exists, then the virtual machine is restarted. If state is set to suspended and virtual machine exists, then the virtual machine is set to suspended mode. If state is set to shutdownguest and virtual machine exists, then the virtual machine is shutdown. If state is set to rebootguest and virtual machine exists, then the virtual machine is rebooted. Possible values are: present, absent, poweredon, poweredoff, restarted, suspended, shutdownguest, rebootguest. Default is present. | Optional |
name | Name of the virtual machine to work with. Virtual machine names in vCenter are not necessarily unique, which may be problematic, see name_match . If multiple virtual machines with same name exists, then folder is required parameter to identify uniqueness of the virtual machine. This parameter is required, if state is set to poweredon , poweredoff , present , restarted , suspended and virtual machine does not exists. This parameter is case sensitive. | Required |
name_match | If multiple virtual machines matching the name, use the first or last found. Possible values are: first, last. Default is first. | Optional |
uuid | UUID of the virtual machine to manage if known, this is VMware's unique identifier. This is required if name is not supplied. If virtual machine does not exists, then this parameter is ignored. Please note that a supplied UUID will be ignored on virtual machine creation, as VMware creates the UUID internally. | Optional |
use_instance_uuid | Whether to use the VMware instance UUID rather than the BIOS UUID. Possible values are: Yes, No. Default is No. | Optional |
template | Template or existing virtual machine used to create new virtual machine. If this value is not set, virtual machine is created without using a template. If the virtual machine already exists, this parameter will be ignored. This parameter is case sensitive. You can also specify template or VM UUID for identifying source. version_added 2.8. Use hw_product_uuid from vmware_guest_facts as UUID value. From version 2.8 onwards, absolute path to virtual machine or template can be used. | Optional |
is_template | Flag the instance as a template. This will mark the given virtual machine as template. Default is no. | Optional |
folder | Destination folder, absolute path to find an existing guest or create the new guest. The folder should include the datacenter. ESX's datacenter is ha-datacenter. This parameter is case sensitive. This parameter is required, while deploying new virtual machine. version_added 2.5. If multiple machines are found with same name, this parameter is used to identify uniqueness of the virtual machine. version_added 2.5 Examples: folder: /ha-datacenter/vm folder: ha-datacenter/vm folder: /datacenter1/vm folder: datacenter1/vm folder: /datacenter1/vm/folder1 folder: datacenter1/vm/folder1 folder: /folder1/datacenter1/vm folder: folder1/datacenter1/vm folder: /folder1/datacenter1/vm/folder2. | Optional |
hardware | Manage virtual machine's hardware attributes. All parameters case sensitive. Valid attributes are: - hotadd_cpu (boolean): Allow virtual CPUs to be added while the virtual machine is running. - hotremove_cpu (boolean): Allow virtual CPUs to be removed while the virtual machine is running. version_added: 2.5 - hotadd_memory (boolean): Allow memory to be added while the virtual machine is running. - memory_mb (integer): Amount of memory in MB. - nested_virt (bool): Enable nested virtualization. version_added: 2.5 - num_cpus (integer): Number of CPUs. - num_cpu_cores_per_socket (integer): Number of Cores Per Socket. num_cpus must be a multiple of num_cpu_cores_per_socket . For example to create a VM with 2 sockets of 4 cores, specify num_cpus : 8 and num_cpu_cores_per_socket : 4 - scsi (string): Valid values are buslogic , lsilogic , lsilogicsas and paravirtual (default). - memory_reservation_lock (boolean): If set true, memory resource reservation for the virtual machine will always be equal to the virtual machine's memory size. version_added: 2.5 - max_connections (integer): Maximum number of active remote display connections for the virtual machines. version_added: 2.5. - mem_limit (integer): The memory utilization of a virtual machine will not exceed this limit. Unit is MB. version_added: 2.5 - mem_reservation (integer): The amount of memory resource that is guaranteed available to the virtual machine. Unit is MB. memory_reservation is alias to this. version_added: 2.5 - cpu_limit (integer): The CPU utilization of a virtual machine will not exceed this limit. Unit is MHz. version_added: 2.5 - cpu_reservation (integer): The amount of CPU resource that is guaranteed available to the virtual machine. Unit is MHz. version_added: 2.5 - version (integer): The Virtual machine hardware versions. Default is 10 (ESXi 5.5 and onwards). Please check VMware documentation for correct virtual machine hardware version. Incorrect hardware version may lead to failure in deployment. If hardware version is already equal to the given version then no action is taken. version_added: 2.6 - boot_firmware (string): Choose which firmware should be used to boot the virtual machine. Allowed values are "bios" and "efi". version_added: 2.7 - virt_based_security (bool): Enable Virtualization Based Security feature for Windows 10. (Support from Virtual machine hardware version 14, Guest OS Windows 10 64 bit, Windows Server 2016). | Optional |
guest_id | Set the guest ID. This parameter is case sensitive. Examples: virtual machine with RHEL7 64 bit, will be 'rhel7_64Guest' virtual machine with CentOS 64 bit, will be 'centos64Guest' virtual machine with Ubuntu 64 bit, will be 'ubuntu64Guest' This field is required when creating a virtual machine, not required when creating from the template. Valid values are referenced here: https://code.vmware.com/apis/358/doc/vim.vm.GuestOsDescriptor.GuestOsIdentifier.html . | Optional |
disk | A list of disks to add. This parameter is case sensitive. Shrinking disks is not supported. Removing existing disks of the virtual machine is not supported. Valid attributes are: - size_[tb,gb,mb,kb] (integer): Disk storage size in specified unit. - type (string): Valid values are: - thin thin disk - eagerzeroedthick eagerzeroedthick disk, added in version 2.5 Default: None thick disk, no eagerzero. - datastore (string): The name of datastore which will be used for the disk. If autoselect_datastore is set to True, then will select the less used datastore whose name contains this "disk.datastore" string. - filename (string): Existing disk image to be used. Filename must already exist on the datastore. Specify filename string in [datastore_name] path/to/file.vmdk format. Added in version 2.8. - autoselect_datastore (bool): select the less used datastore. "disk.datastore" and "disk.autoselect_datastore" will not be used if datastore is specified outside this disk configuration. - disk_mode (string): Type of disk mode. Added in version 2.6 - Available options are : - persistent : Changes are immediately and permanently written to the virtual disk. This is default. - independent_persistent : Same as persistent, but not affected by snapshots. - independent_nonpersistent : Changes to virtual disk are made to a redo log and discarded at power off, but not affected by snapshots. | Optional |
cdrom | A CD-ROM configuration for the virtual machine. Or a list of CD-ROMs configuration for the virtual machine. Added in version 2.9. Parameters controller_type , controller_number , unit_number , state are added for a list of CD-ROMs configuration support. Valid attributes are: - type (string): The type of CD-ROM, valid options are none , client or iso . With none the CD-ROM will be disconnected but present. - iso_path (string): The datastore path to the ISO file to use, in the form of [datastore1] path/to/file.iso . Required if type is set iso . - controller_type (string): Default value is ide . Only ide controller type for CD-ROM is supported for now, will add SATA controller type in the future. - controller_number (int): For ide controller, valid value is 0 or 1. - unit_number (int): For CD-ROM device attach to ide controller, valid value is 0 or 1. controller_number and unit_number are mandatory attributes. - state (string): Valid value is present or absent . Default is present . If set to absent , then the specified CD-ROM will be removed. For ide controller, hot-add or hot-remove CD-ROM is not supported. | Optional |
resource_pool | Use the given resource pool for virtual machine operation. This parameter is case sensitive. Resource pool should be child of the selected host parent. | Optional |
wait_for_ip_address | Wait until vCenter detects an IP address for the virtual machine. This requires vmware-tools (vmtoolsd) to properly work after creation. vmware-tools needs to be installed on the given virtual machine in order to work with this parameter. Default is no. | Optional |
wait_for_customization | Wait until vCenter detects all guest customizations as successfully completed. When enabled, the VM will automatically be powered on. Default is no. | Optional |
state_change_timeout | If the state is set to shutdownguest , by default the module will return immediately after sending the shutdown signal. If this argument is set to a positive integer, the module will instead wait for the virtual machine to reach the poweredoff state. The value sets a timeout in seconds for the module to wait for the state change. Default is 0. | Optional |
snapshot_src | Name of the existing snapshot to use to create a clone of a virtual machine. This parameter is case sensitive. While creating linked clone using linked_clone parameter, this parameter is required. | Optional |
linked_clone | Whether to create a linked clone from the snapshot specified. If specified, then snapshot_src is required parameter. Default is no. | Optional |
force | Ignore warnings and complete the actions. This parameter is useful while removing virtual machine which is powered on state. This module reflects the VMware vCenter API and UI workflow, as such, in some cases the force flag will be mandatory to perform the action to ensure you are certain the action has to be taken, no matter what the consequence. This is specifically the case for removing a powered on the virtual machine when state is set to absent . Default is no. | Optional |
datacenter | Destination datacenter for the deploy operation. This parameter is case sensitive. Default is ha-datacenter. | Optional |
cluster | The cluster name where the virtual machine will run. This is a required parameter, if esxi_hostname is not set. esxi_hostname and cluster are mutually exclusive parameters. This parameter is case sensitive. | Optional |
esxi_hostname | The ESXi hostname where the virtual machine will run. This is a required parameter, if cluster is not set. esxi_hostname and cluster are mutually exclusive parameters. This parameter is case sensitive. | Optional |
annotation | A note or annotation to include in the virtual machine. | Optional |
customvalues | Define a list of custom values to set on virtual machine. A custom value object takes two fields key and value . Incorrect key and values will be ignored. | Optional |
networks | A list of networks (in the order of the NICs). Removing NICs is not allowed, while reconfiguring the virtual machine. All parameters and VMware object names are case sensitive. One of the below parameters is required per entry: - name (string): Name of the portgroup or distributed virtual portgroup for this interface. When specifying distributed virtual portgroup make sure given esxi_hostname or cluster is associated with it. - vlan (integer): VLAN number for this interface. Optional parameters per entry (used for virtual hardware): - device_type (string): Virtual network device (one of e1000 , e1000e , pcnet32 , vmxnet2 , vmxnet3 (default), sriov ). - mac (string): Customize MAC address. - dvswitch_name (string): Name of the distributed vSwitch. This value is required if multiple distributed portgroups exists with the same name. version_added 2.7 - start_connected (bool): Indicates that virtual network adapter starts with associated virtual machine powers on. version_added: 2.5 Optional parameters per entry (used for OS customization): - type (string): Type of IP assignment (either dhcp or static ). dhcp is default. - ip (string): Static IP address (implies type: static ). - netmask (string): Static netmask required for ip . - gateway (string): Static gateway. - dns_servers (string): DNS servers for this network interface (Windows). - domain (string): Domain name for this network interface (Windows). - wake_on_lan (bool): Indicates if wake-on-LAN is enabled on this virtual network adapter. version_added: 2.5 - allow_guest_control (bool): Enables guest control over whether the connectable device is connected. version_added: 2.5. | Optional |
customization | Parameters for OS customization when cloning from the template or the virtual machine, or apply to the existing virtual machine directly. Not all operating systems are supported for customization with respective vCenter version, please check VMware documentation for respective OS customization. For supported customization operating system matrix, (see http://partnerweb.vmware.com/programs/guestOS/guest-os-customization-matrix.pdf ) All parameters and VMware object names are case sensitive. Linux based OSes requires Perl package to be installed for OS customizations. Common parameters (Linux/Windows): - existing_vm (bool): If set to True , do OS customization on the specified virtual machine directly. If set to False or not specified, do OS customization when cloning from the template or the virtual machine. version_added: 2.8 - dns_servers (list): List of DNS servers to configure. - dns_suffix (list): List of domain suffixes, also known as DNS search path (default: domain parameter). - domain (string): DNS domain name to use. - hostname (string): Computer hostname (default: shorted name parameter). Allowed characters are alphanumeric (uppercase and lowercase) and minus, rest of the characters are dropped as per RFC 952. Parameters related to Linux customization: - timezone (string): Timezone (See List of supported time zones for different vSphere versions in Linux/Unix systems (2145518) https://kb.vmware.com/s/article/2145518 ). version_added: 2.9 - hwclockUTC (bool): Specifies whether the hardware clock is in UTC or local time. True when the hardware clock is in UTC, False when the hardware clock is in local time. version_added: 2.9 Parameters related to Windows customization: - autologon (bool): Auto logon after virtual machine customization (default: False). - autologoncount (int): Number of autologon after reboot (default: 1). - domainadmin (string): User used to join in AD domain (mandatory with joindomain ). - domainadminpassword (string): Password used to join in AD domain (mandatory with joindomain ). - fullname (string): Server owner name (default: Administrator). - joindomain (string): AD domain to join (Not compatible with joinworkgroup ). - joinworkgroup (string): Workgroup to join (Not compatible with joindomain , default: WORKGROUP). - orgname (string): Organisation name (default: ACME). - password (string): Local administrator password. - productid (string): Product ID. - runonce (list): List of commands to run at first user logon. - timezone (int): Timezone (See https://msdn.microsoft.com/en-us/library/ms912391.aspx ). | Optional |
vapp_properties | A list of vApp properties For full list of attributes and types refer to: https://github.com/vmware/pyvmomi/blob/master/docs/vim/vApp/PropertyInfo.rst Basic attributes are: - id (string): Property id - required. - value (string): Property value. - type (string): Value type, string type by default. - operation : remove : This attribute is required only when removing properties. | Optional |
customization_spec | Unique name identifying the requested customization specification. This parameter is case sensitive. If set, then overrides customization parameter values. | Optional |
datastore | Specify datastore or datastore cluster to provision virtual machine. This parameter takes precedence over "disk.datastore" parameter. This parameter can be used to override datastore or datastore cluster setting of the virtual machine when deployed from the template. Please see example for more usage. | Optional |
convert | Specify convert disk type while cloning template or virtual machine. Possible values are: thin, thick, eagerzeroedthick. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareGuest.instance | unknown | metadata about the new virtual machine |
#
vmware-guest-boot-infoGather info about boot options for the given virtual machine Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_guest_boot_info_module.html
#
Base Commandvmware-guest-boot-info
#
InputArgument Name | Description | Required |
---|---|---|
name | Name of the VM to work with. This is required if uuid or moid parameter is not supplied. | Optional |
uuid | UUID of the instance to manage if known, this is VMware's BIOS UUID by default. This is required if name or moid parameter is not supplied. | Optional |
moid | Managed Object ID of the instance to manage if known, this is a unique identifier only within a single vCenter instance. This is required if name or uuid is not supplied. | Optional |
use_instance_uuid | Whether to use the VMware instance UUID rather than the BIOS UUID. Possible values are: Yes, No. Default is No. | Optional |
name_match | If multiple virtual machines matching the name, use the first or last found. Possible values are: first, last. Default is first. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareGuestBootInfo.vm_boot_info | unknown | metadata about boot order of virtual machine |
#
vmware-guest-boot-managerManage boot options for the given virtual machine Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_guest_boot_manager_module.html
#
Base Commandvmware-guest-boot-manager
#
InputArgument Name | Description | Required |
---|---|---|
name | Name of the VM to work with. This is required if uuid or moid parameter is not supplied. | Optional |
uuid | UUID of the instance to manage if known, this is VMware's BIOS UUID by default. This is required if name or moid parameter is not supplied. | Optional |
moid | Managed Object ID of the instance to manage if known, this is a unique identifier only within a single vCenter instance. This is required if name or uuid is not supplied. | Optional |
use_instance_uuid | Whether to use the VMware instance UUID rather than the BIOS UUID. Possible values are: Yes, No. Default is No. | Optional |
boot_order | List of the boot devices. | Optional |
name_match | If multiple virtual machines matching the name, use the first or last found. Possible values are: first, last. Default is first. | Optional |
boot_delay | Delay in milliseconds before starting the boot sequence. Default is 0. | Optional |
enter_bios_setup | If set to True , the virtual machine automatically enters BIOS setup the next time it boots. The virtual machine resets this flag, so that the machine boots proceeds normally. Possible values are: Yes, No. Default is No. | Optional |
boot_retry_enabled | If set to True , the virtual machine that fails to boot, will try to boot again after boot_retry_delay is expired. If set to False , the virtual machine waits indefinitely for user intervention. Possible values are: Yes, No. Default is No. | Optional |
boot_retry_delay | Specify the time in milliseconds between virtual machine boot failure and subsequent attempt to boot again. If set, will automatically set boot_retry_enabled to True as this parameter is required. Default is 0. | Optional |
boot_firmware | Choose which firmware should be used to boot the virtual machine. Possible values are: bios, efi. | Optional |
secure_boot_enabled | Choose if EFI secure boot should be enabled. EFI secure boot can only be enabled with boot_firmware = efi. Possible values are: Yes, No. Default is No. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareGuestBootManager.vm_boot_status | unknown | metadata about boot order of virtual machine |
#
vmware-guest-custom-attribute-defsManage custom attributes definitions for virtual machine from VMware Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_guest_custom_attribute_defs_module.html
#
Base Commandvmware-guest-custom-attribute-defs
#
InputArgument Name | Description | Required |
---|---|---|
attribute_key | Name of the custom attribute definition. This is required parameter, if state is set to present or absent . | Optional |
state | Manage definition of custom attributes. If set to present and definition not present, then custom attribute definition is created. If set to present and definition is present, then no action taken. If set to absent and definition is present, then custom attribute definition is removed. If set to absent and definition is absent, then no action taken. Possible values are: present, absent. Default is present. | Required |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareGuestCustomAttributeDefs.custom_attribute_defs | unknown | list of all current attribute definitions |
#
Command Example!vmware-guest-custom-attribute-defs state="present" attribute_key="custom_attr_def_1"
#
Context Example#
Human Readable Output#
CHANGED
- changed: True
#
Custom_Attribute_Defs
- 0: AutoDeploy.MachineIdentity
- 1: com.vmware.vcIntegrity.customField.scheduledTask.action
- 2: com.vmware.vcIntegrity.customField.scheduledTask.signature
- 3: com.vmware.vcIntegrity.customField.scheduledTask.target
- 4: custom_attr_def_1
#
vmware-guest-custom-attributesManage custom attributes from VMware for the given virtual machine Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_guest_custom_attributes_module.html
#
Base Commandvmware-guest-custom-attributes
#
InputArgument Name | Description | Required |
---|---|---|
name | Name of the virtual machine to work with. This is required parameter, if uuid or moid is not supplied. | Required |
state | The action to take. If set to present , then custom attribute is added or updated. If set to absent , then custom attribute is removed. Possible values are: present, absent. Default is present. | Optional |
uuid | UUID of the virtual machine to manage if known. This is VMware's unique identifier. This is required parameter, if name or moid is not supplied. | Optional |
moid | Managed Object ID of the instance to manage if known, this is a unique identifier only within a single vCenter instance. This is required if name or uuid is not supplied. | Optional |
use_instance_uuid | Whether to use the VMware instance UUID rather than the BIOS UUID. Possible values are: Yes, No. Default is No. | Optional |
folder | Absolute path to find an existing guest. This is required parameter, if name is supplied and multiple virtual machines with same name are found. | Optional |
datacenter | Datacenter name where the virtual machine is located in. | Required |
attributes | 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 state is set to absent . | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareGuestCustomAttributes.custom_attributes | unknown | metadata about the virtual machine attributes |
#
vmware-guest-customization-infoGather info about VM customization specifications Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_guest_customization_info_module.html
#
Base Commandvmware-guest-customization-info
#
InputArgument Name | Description | Required |
---|---|---|
spec_name | Name of customization specification to find. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareGuestCustomizationInfo.custom_spec_info | unknown | metadata about the customization specification |
#
Command Example!vmware-guest-customization-info
#
Context Example#
Human Readable Output#
SUCCESS
- changed: False
#
Custom_Spec_Info
#
vmware-guest-diskManage disks related to virtual machine in given vCenter infrastructure Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_guest_disk_module.html
#
Base Commandvmware-guest-disk
#
InputArgument Name | Description | Required |
---|---|---|
name | Name of the virtual machine. This is a required parameter, if parameter uuid or moid is not supplied. | Optional |
uuid | UUID of the instance to gather facts if known, this is VMware's unique identifier. This is a required parameter, if parameter name or moid is not supplied. | Optional |
moid | Managed Object ID of the instance to manage if known, this is a unique identifier only within a single vCenter instance. This is required if name or uuid is not supplied. | Optional |
folder | Destination folder, absolute or relative path to find an existing guest. This is a required parameter, only if multiple VMs are found with same name. The folder should include the datacenter. ESX's datacenter is ha-datacenter Examples: folder: /ha-datacenter/vm folder: ha-datacenter/vm folder: /datacenter1/vm folder: datacenter1/vm folder: /datacenter1/vm/folder1 folder: datacenter1/vm/folder1 folder: /folder1/datacenter1/vm folder: folder1/datacenter1/vm folder: /folder1/datacenter1/vm/folder2. | Optional |
datacenter | The datacenter name to which virtual machine belongs to. | Required |
use_instance_uuid | Whether to use the VMware instance UUID rather than the BIOS UUID. Possible values are: Yes, No. Default is No. | Optional |
disk | A list of disks to add. The virtual disk related information is provided using this list. All values and parameters are case sensitive. Valid attributes are: - size[_tb,_gb,_mb,_kb] (integer): Disk storage size in specified unit. If size specified then unit must be specified. There is no space allowed in between size number and unit. Only first occurrence in disk element will be considered, even if there are multiple size* parameters available. - type (string): Valid values are: - thin thin disk - eagerzeroedthick eagerzeroedthick disk - thick thick disk Default: thick thick disk, no eagerzero. - datastore (string): Name of datastore or datastore cluster to be used for the disk. - autoselect_datastore (bool): Select the less used datastore. Specify only if datastore is not specified. - scsi_controller (integer): SCSI controller number. Valid value range from 0 to 3. Only 4 SCSI controllers are allowed per VM. Care should be taken while specifying scsi_controller is 0 and unit_number as 0 as this disk may contain OS. - unit_number (integer): Disk Unit Number. Valid value range from 0 to 15. Only 15 disks are allowed per SCSI Controller. - scsi_type (string): Type of SCSI controller. This value is required only for the first occurrence of SCSI Controller. This value is ignored, if SCSI Controller is already present or state is absent . Valid values are buslogic , lsilogic , lsilogicsas and paravirtual . paravirtual is default value for this parameter. - state (string): State of disk. This is either "absent" or "present". If state is set to absent , disk will be removed permanently from virtual machine configuration and from VMware storage. If state is set to present , disk will be added if not present at given SCSI Controller and Unit Number. If state is set to present and disk exists with different size, disk size is increased. Reducing disk size is not allowed. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareGuestDisk.disk_status | unknown | metadata about the virtual machine's disks after managing them |
#
vmware-guest-disk-infoGather info about disks of given virtual machine Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_guest_disk_info_module.html
#
Base Commandvmware-guest-disk-info
#
InputArgument Name | Description | Required |
---|---|---|
name | Name of the virtual machine. This is required parameter, if parameter uuid or moid is not supplied. | Optional |
uuid | UUID of the instance to gather information if known, this is VMware's unique identifier. This is required parameter, if parameter name or moid is not supplied. | Optional |
moid | Managed Object ID of the instance to manage if known, this is a unique identifier only within a single vCenter instance. This is required if name or uuid is not supplied. | Optional |
use_instance_uuid | Whether to use the VMware instance UUID rather than the BIOS UUID. Possible values are: Yes, No. Default is No. | Optional |
folder | Destination folder, absolute or relative path to find an existing guest. This is required parameter, only if multiple VMs are found with same name. The folder should include the datacenter. ESX's datacenter is ha-datacenter Examples: folder: /ha-datacenter/vm folder: ha-datacenter/vm folder: /datacenter1/vm folder: datacenter1/vm folder: /datacenter1/vm/folder1 folder: datacenter1/vm/folder1 folder: /folder1/datacenter1/vm folder: folder1/datacenter1/vm folder: /folder1/datacenter1/vm/folder2. | Optional |
datacenter | The datacenter name to which virtual machine belongs to. | Required |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareGuestDiskInfo.guest_disk_info | unknown | metadata about the virtual machine's disks |
#
Command Example!vmware-guest-disk-info datacenter="DC1" name="test_vm_0001"
#
Context Example#
Human Readable Output#
SUCCESS
- changed: False
#
Guest_Disk_Info
#
0
- backing_datastore: datastore1
- backing_disk_mode: persistent
- backing_diskmode: persistent
- backing_eagerlyscrub: False
- backing_filename: [datastore1] test_vm_0001/test_vm_0001.vmdk
- backing_thinprovisioned: True
- backing_type: FlatVer2
- backing_uuid: 6000C294-3cd2-f966-9fb7-556870ae6bdf
- backing_writethrough: False
- capacity_in_bytes: 1073741824
- capacity_in_kb: 1048576
- controller_bus_number: 0
- controller_key: 1000
- controller_type: paravirtual
- key: 2000
- label: Hard disk 1
- summary: 1,048,576 KB
- unit_number: 0
#
vmware-guest-findFind the folder path(s) for a virtual machine by name or UUID Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_guest_find_module.html
#
Base Commandvmware-guest-find
#
InputArgument Name | Description | Required |
---|---|---|
name | Name of the VM to work with. This is required if uuid parameter is not supplied. | Optional |
uuid | UUID of the instance to manage if known, this is VMware's BIOS UUID by default. This is required if name parameter is not supplied. | Optional |
use_instance_uuid | Whether to use the VMware instance UUID rather than the BIOS UUID. Possible values are: Yes, No. Default is No. | Optional |
datacenter | Destination datacenter for the find operation. Deprecated in 2.5, will be removed in 2.9 release. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareGuestFind.folders | unknown | List of folders for user specified virtual machine |
#
Command Example!vmware-guest-find name="test_vm_0001"
#
Context Example#
Human Readable Output#
SUCCESS
- changed: False
#
Folders
- 0: /DC1/vm
#
vmware-guest-infoGather info about a single VM Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_guest_info_module.html
#
Base Commandvmware-guest-info
#
InputArgument Name | Description | Required |
---|---|---|
name | Name of the VM to work with This is required if uuid or moid is not supplied. | Optional |
name_match | If multiple VMs matching the name, use the first or last found. Possible values are: first, last. Default is first. | Optional |
uuid | UUID of the instance to manage if known, this is VMware's unique identifier. This is required if name or moid is not supplied. | Optional |
use_instance_uuid | Whether to use the VMware instance UUID rather than the BIOS UUID. Possible values are: Yes, No. Default is No. | Optional |
moid | Managed Object ID of the instance to manage if known, this is a unique identifier only within a single vCenter instance. This is required if name or uuid is not supplied. | Optional |
folder | Destination folder, absolute or relative path to find an existing guest. This is required if name is supplied. The folder should include the datacenter. ESX's datacenter is ha-datacenter Examples: folder: /ha-datacenter/vm folder: ha-datacenter/vm folder: /datacenter1/vm folder: datacenter1/vm folder: /datacenter1/vm/folder1 folder: datacenter1/vm/folder1 folder: /folder1/datacenter1/vm folder: folder1/datacenter1/vm folder: /folder1/datacenter1/vm/folder2. | Optional |
datacenter | Destination datacenter for the deploy operation. | Required |
tags | Whether to show tags or not. If set True , shows tag information. If set False , hides tags information. vSphere Automation SDK and vCloud Suite SDK is required. Default is no. | Optional |
schema | Specify the output schema desired. The 'summary' output schema is the legacy output from the module The 'vsphere' output schema is the vSphere API class definition which requires pyvmomi>6.7.1. Possible values are: summary, vsphere. Default is summary. | Optional |
properties | Specify the properties to retrieve. If not specified, all properties are retrieved (deeply). Results are returned in a structure identical to the vsphere API. Example: properties: [ "config.hardware.memoryMB", "config.hardware.numCPU", "guest.disk", "overallStatus" ] Only valid when schema is vsphere . | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareGuestInfo.instance | unknown | metadata about the virtual machine |
#
Command Example!vmware-guest-info datacenter="DC1" name="test_vm_0001"
#
Context Example#
Human Readable Output#
SUCCESS
- changed: False
#
Instance
- annotation:
- current_snapshot: None
- guest_consolidation_needed: False
- guest_question: None
- guest_tools_status: guestToolsNotRunning
- guest_tools_version: 0
- hw_cluster: cluster
- hw_cores_per_socket: 1
- hw_esxi_host: esxi01
- hw_folder: /DC1/vm
- hw_guest_full_name: None
- hw_guest_ha_state: None
- hw_guest_id: None
- hw_is_template: False
- hw_memtotal_mb: 512
- hw_name: test_vm_0001
- hw_power_status: poweredOff
- hw_processor_count: 4
- hw_product_uuid: 42166c31-2bd1-6ac0-1ebb-a6db907f529e
- hw_version: vmx-13
- instance_uuid: 5016ea58-ccce-5688-f16b-82ca0b25e513
- ipv4: None
- ipv6: None
- module_hw: True
- moid: vm-21
- vimref: vim.VirtualMachine:vm-21
#
Customvalues#
Hw_Datastores
- 0: datastore1
#
Hw_Eth0
- addresstype: manual
- ipaddresses: None
- label: Network adapter 1
- macaddress: aa:bb:dd:aa:00:14
- macaddress_dash: aa-bb-dd-aa-00-14
- portgroup_key: None
- portgroup_portkey: None
- summary: VM Network
#
Hw_Files
- 0: [datastore1] test_vm_0001/test_vm_0001.vmx
- 1: [datastore1] test_vm_0001/test_vm_0001.vmsd
- 2: [datastore1] test_vm_0001/test_vm_0001.vmdk
#
Hw_Interfaces
- 0: eth0
#
Snapshots#
Vnc
#
vmware-guest-moveMoves virtual machines in vCenter Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_guest_move_module.html
#
Base Commandvmware-guest-move
#
InputArgument Name | Description | Required |
---|---|---|
name | Name of the existing virtual machine to move. This is required if uuid or moid is not supplied. | Optional |
uuid | UUID of the virtual machine to manage if known, this is VMware's unique identifier. This is required if name or moid is not supplied. | Optional |
moid | Managed Object ID of the instance to manage if known, this is a unique identifier only within a single vCenter instance. This is required if name or uuid is not supplied. | Optional |
use_instance_uuid | Whether to use the VMware instance UUID rather than the BIOS UUID. Possible values are: Yes, No. Default is No. | Optional |
name_match | If multiple virtual machines matching the name, use the first or last found. Possible values are: first, last. Default is first. | Optional |
dest_folder | Absolute path to move an existing guest The dest_folder should include the datacenter. ESX's datacenter is ha-datacenter. This parameter is case sensitive. Examples: dest_folder: /ha-datacenter/vm dest_folder: ha-datacenter/vm dest_folder: /datacenter1/vm dest_folder: datacenter1/vm dest_folder: /datacenter1/vm/folder1 dest_folder: datacenter1/vm/folder1 dest_folder: /folder1/datacenter1/vm dest_folder: folder1/datacenter1/vm dest_folder: /folder1/datacenter1/vm/folder2. | Required |
datacenter | Destination datacenter for the move operation. | Required |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareGuestMove.instance | unknown | metadata about the virtual machine |
#
Command Example!vmware-guest-move datacenter="DC1" name="test_vm_0001" dest_folder="/DC1/vm"
#
Context Example#
Human Readable Output#
SUCCESS
- changed: False
#
Instance
- annotation:
- current_snapshot: None
- guest_consolidation_needed: False
- guest_question: None
- guest_tools_status: guestToolsNotRunning
- guest_tools_version: 0
- hw_cluster: cluster
- hw_cores_per_socket: 1
- hw_esxi_host: esxi01
- hw_folder: /DC1/vm
- hw_guest_full_name: None
- hw_guest_ha_state: None
- hw_guest_id: None
- hw_is_template: False
- hw_memtotal_mb: 512
- hw_name: test_vm_0001
- hw_power_status: poweredOff
- hw_processor_count: 4
- hw_product_uuid: 42166c31-2bd1-6ac0-1ebb-a6db907f529e
- hw_version: vmx-13
- instance_uuid: 5016ea58-ccce-5688-f16b-82ca0b25e513
- ipv4: None
- ipv6: None
- module_hw: True
- moid: vm-21
- vimref: vim.VirtualMachine:vm-21
#
Customvalues#
Hw_Datastores
- 0: datastore1
#
Hw_Eth0
- addresstype: manual
- ipaddresses: None
- label: Network adapter 1
- macaddress: aa:bb:dd:aa:00:14
- macaddress_dash: aa-bb-dd-aa-00-14
- portgroup_key: None
- portgroup_portkey: None
- summary: VM Network
#
Hw_Files
- 0: [datastore1] test_vm_0001/test_vm_0001.vmx
- 1: [datastore1] test_vm_0001/test_vm_0001.vmsd
- 2: [datastore1] test_vm_0001/test_vm_0001.vmdk
#
Hw_Interfaces
- 0: eth0
#
Snapshots#
Vnc
#
vmware-guest-networkManage network adapters of specified virtual machine in given vCenter infrastructure Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_guest_network_module.html
#
Base Commandvmware-guest-network
#
InputArgument Name | Description | Required |
---|---|---|
name | Name of the virtual machine. This is a required parameter, if parameter uuid or moid is not supplied. | Optional |
uuid | UUID of the instance to gather info if known, this is VMware's unique identifier. This is a required parameter, if parameter name or moid is not supplied. | Optional |
moid | Managed Object ID of the instance to manage if known, this is a unique identifier only within a single vCenter instance. This is required if name or uuid is not supplied. | Optional |
folder | Destination folder, absolute or relative path to find an existing guest. This is a required parameter, only if multiple VMs are found with same name. The folder should include the datacenter. ESXi server's datacenter is ha-datacenter. Examples: folder: /ha-datacenter/vm folder: ha-datacenter/vm folder: /datacenter1/vm folder: datacenter1/vm folder: /datacenter1/vm/folder1 folder: datacenter1/vm/folder1 folder: /folder1/datacenter1/vm folder: folder1/datacenter1/vm folder: /folder1/datacenter1/vm/folder2. | Optional |
cluster | The name of cluster where the virtual machine will run. This is a required parameter, if esxi_hostname is not set. esxi_hostname and cluster are mutually exclusive parameters. | Optional |
esxi_hostname | The ESXi hostname where the virtual machine will run. This is a required parameter, if cluster is not set. esxi_hostname and cluster are mutually exclusive parameters. | Optional |
datacenter | The datacenter name to which virtual machine belongs to. Default is ha-datacenter. | Optional |
gather_network_info | If set to True , return settings of all network adapters, other parameters are ignored. If set to False , will add, reconfigure or remove network adapters according to the parameters in networks . Possible values are: Yes, No. Default is No. | Optional |
networks | A list of network adapters. mac or label or device_type is required to reconfigure or remove an existing network adapter. If there are multiple network adapters with the same device_type , you should set label or mac to match one of them, or will apply changes on all network adapters with the device_type specified. mac , label , device_type is the order of precedence from greatest to least if all set. Valid attributes are: - mac (string): MAC address of the existing network adapter to be reconfigured or removed. - label (string): Label of the existing network adapter to be reconfigured or removed, e.g., "Network adapter 1". - device_type (string): Valid virtual network device types are: e1000 , e1000e , pcnet32 , vmxnet2 , vmxnet3 (default), sriov . Used to add new network adapter, reconfigure or remove the existing network adapter with this type. If mac and label not specified or not find network adapter by mac or label will use this parameter. - name (string): Name of the portgroup or distributed virtual portgroup for this interface. When specifying distributed virtual portgroup make sure given esxi_hostname or cluster is associated with it. - vlan (integer): VLAN number for this interface. - dvswitch_name (string): Name of the distributed vSwitch. This value is required if multiple distributed portgroups exists with the same name. - state (string): State of the network adapter. If set to present , then will do reconfiguration for the specified network adapter. If set to new , then will add the specified network adapter. If set to absent , then will remove this network adapter. - manual_mac (string): Manual specified MAC address of the network adapter when creating, or reconfiguring. If not specified when creating new network adapter, mac address will be generated automatically. When reconfigure MAC address, VM should be in powered off state. - connected (bool): Indicates that virtual network adapter connects to the associated virtual machine. - start_connected (bool): Indicates that virtual network adapter starts with associated virtual machine powers on. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareGuestNetwork.network_data | unknown | metadata about the virtual machine's network adapter after managing them |
#
vmware-guest-powerstateManages power states of virtual machines in vCenter Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_guest_powerstate_module.html
#
Base Commandvmware-guest-powerstate
#
InputArgument Name | Description | Required |
---|---|---|
state | Set the state of the virtual machine. Possible values are: powered-off, powered-on, reboot-guest, restarted, shutdown-guest, suspended, present. Default is present. | Optional |
name | Name of the virtual machine to work with. Virtual machine names in vCenter are not necessarily unique, which may be problematic, see name_match . | Optional |
name_match | If multiple virtual machines matching the name, use the first or last found. Possible values are: first, last. Default is first. | Optional |
uuid | UUID of the instance to manage if known, this is VMware's unique identifier. This is required if name or moid is not supplied. | Optional |
moid | Managed Object ID of the instance to manage if known, this is a unique identifier only within a single vCenter instance. This is required if name or uuid is not supplied. | Optional |
use_instance_uuid | Whether to use the VMware instance UUID rather than the BIOS UUID. Possible values are: Yes, No. Default is No. | Optional |
folder | Destination folder, absolute or relative path to find an existing guest. The folder should include the datacenter. ESX's datacenter is ha-datacenter Examples: folder: /ha-datacenter/vm folder: ha-datacenter/vm folder: /datacenter1/vm folder: datacenter1/vm folder: /datacenter1/vm/folder1 folder: datacenter1/vm/folder1 folder: /folder1/datacenter1/vm folder: folder1/datacenter1/vm folder: /folder1/datacenter1/vm/folder2. | Optional |
scheduled_at | Date and time in string format at which specified task needs to be performed. 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. | Optional |
schedule_task_name | Name of schedule task. Valid only if scheduled_at is specified. | Optional |
schedule_task_description | Description of schedule task. Valid only if scheduled_at is specified. | Optional |
schedule_task_enabled | Flag to indicate whether the scheduled task is enabled or disabled. Possible values are: Yes, No. Default is Yes. | Optional |
force | Ignore warnings and complete the actions. This parameter is useful while forcing virtual machine state. Possible values are: Yes, No. Default is No. | Optional |
state_change_timeout | If the state is set to shutdown-guest , by default the module will return immediately after sending the shutdown signal. If this argument is set to a positive integer, the module will instead wait for the VM to reach the poweredoff state. The value sets a timeout in seconds for the module to wait for the state change. Default is 0. | Optional |
#
Context OutputPath | Type | Description |
---|
#
vmware-guest-screenshotCreate a screenshot of the Virtual Machine console. Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_guest_screenshot_module.html
#
Base Commandvmware-guest-screenshot
#
InputArgument Name | Description | Required |
---|---|---|
name | Name of the virtual machine. This is a required parameter, if parameter uuid or moid is not supplied. | Optional |
uuid | UUID of the instance to gather facts if known, this is VMware's unique identifier. This is a required parameter, if parameter name or moid is not supplied. | Optional |
moid | Managed Object ID of the instance to manage if known, this is a unique identifier only within a single vCenter instance. This is required if name or uuid is not supplied. | Optional |
folder | Destination folder, absolute or relative path to find an existing guest. This is a required parameter, only if multiple VMs are found with same name. The folder should include the datacenter. ESXi server's datacenter is ha-datacenter. Examples: folder: /ha-datacenter/vm folder: ha-datacenter/vm folder: /datacenter1/vm folder: datacenter1/vm folder: /datacenter1/vm/folder1 folder: datacenter1/vm/folder1 folder: /folder1/datacenter1/vm folder: folder1/datacenter1/vm folder: /folder1/datacenter1/vm/folder2. | Optional |
cluster | The name of cluster where the virtual machine is running. This is a required parameter, if esxi_hostname is not set. esxi_hostname and cluster are mutually exclusive parameters. | Optional |
esxi_hostname | The ESXi hostname where the virtual machine is running. This is a required parameter, if cluster is not set. esxi_hostname and cluster are mutually exclusive parameters. | Optional |
datacenter | The datacenter name to which virtual machine belongs to. | Optional |
local_path | If local_path is not set, the created screenshot file will be kept in the directory of the virtual machine on ESXi host. If local_path is set to a valid path on local machine, then the screenshot file will be downloaded from ESXi host to the local directory. If not download screenshot file to local machine, you can open it through the returned file URL in screenshot facts manually. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareGuestScreenshot.screenshot_info | unknown | display the facts of captured virtual machine screenshot file |
#
vmware-guest-sendkeySend USB HID codes to the Virtual Machine's keyboard. Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_guest_sendkey_module.html
#
Base Commandvmware-guest-sendkey
#
InputArgument Name | Description | Required |
---|---|---|
name | Name of the virtual machine. This is a required parameter, if parameter uuid or moid is not supplied. | Optional |
uuid | UUID of the instance to gather facts if known, this is VMware's unique identifier. This is a required parameter, if parameter name or moid is not supplied. | Optional |
moid | Managed Object ID of the instance to manage if known, this is a unique identifier only within a single vCenter instance. This is required if name or uuid is not supplied. | Optional |
folder | Destination folder, absolute or relative path to find an existing guest. This is a required parameter, only if multiple VMs are found with same name. The folder should include the datacenter. ESXi server's datacenter is ha-datacenter. Examples: folder: /ha-datacenter/vm folder: ha-datacenter/vm folder: /datacenter1/vm folder: datacenter1/vm folder: /datacenter1/vm/folder1 folder: datacenter1/vm/folder1 folder: /folder1/datacenter1/vm folder: folder1/datacenter1/vm folder: /folder1/datacenter1/vm/folder2. | Optional |
cluster | The name of cluster where the virtual machine is running. This is a required parameter, if esxi_hostname is not set. esxi_hostname and cluster are mutually exclusive parameters. | Optional |
esxi_hostname | The ESXi hostname where the virtual machine is running. This is a required parameter, if cluster is not set. esxi_hostname and cluster are mutually exclusive parameters. | Optional |
datacenter | The datacenter name to which virtual machine belongs to. | Optional |
string_send | The string will be sent to the virtual machine. This string can contain valid special character, alphabet and digit on the keyboard. | Optional |
keys_send | The list of the keys will be sent to the virtual machine. Valid values are ENTER , ESC , BACKSPACE , TAB , SPACE , CAPSLOCK , DELETE , CTRL_ALT_DEL , CTRL_C and F1 to F12 , RIGHTARROW , LEFTARROW , DOWNARROW , UPARROW . If both keys_send and string_send are specified, keys in keys_send list will be sent in front of the string_send . | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareGuestSendkey.sendkey_info | unknown | display the keys and the number of keys sent to the virtual machine |
#
vmware-guest-snapshotManages virtual machines snapshots in vCenter Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_guest_snapshot_module.html
#
Base Commandvmware-guest-snapshot
#
InputArgument Name | Description | Required |
---|---|---|
state | Manage snapshot(s) attached to a specific virtual machine. If set to present and snapshot absent, then will create a new snapshot with the given name. If set to present and snapshot present, then no changes are made. If set to absent and snapshot present, then snapshot with the given name is removed. If set to absent and snapshot absent, then no changes are made. If set to revert and snapshot present, then virtual machine state is reverted to the given snapshot. If set to revert and snapshot absent, then no changes are made. If set to remove_all and snapshot(s) present, then all snapshot(s) will be removed. If set to remove_all and snapshot(s) absent, then no changes are made. Possible values are: present, absent, revert, remove_all. Default is present. | Required |
name | Name of the virtual machine to work with. This is required parameter, if uuid or moid is not supplied. | Optional |
name_match | If multiple VMs matching the name, use the first or last found. Possible values are: first, last. Default is first. | Optional |
uuid | UUID of the instance to manage if known, this is VMware's BIOS UUID by default. This is required if name or moid parameter is not supplied. | Optional |
moid | Managed Object ID of the instance to manage if known, this is a unique identifier only within a single vCenter instance. This is required if name or uuid is not supplied. | Optional |
use_instance_uuid | Whether to use the VMware instance UUID rather than the BIOS UUID. Possible values are: Yes, No. Default is No. | Optional |
folder | Destination folder, absolute or relative path to find an existing guest. This is required parameter, if name is supplied. The folder should include the datacenter. ESX's datacenter is ha-datacenter. Examples: folder: /ha-datacenter/vm folder: ha-datacenter/vm folder: /datacenter1/vm folder: datacenter1/vm folder: /datacenter1/vm/folder1 folder: datacenter1/vm/folder1 folder: /folder1/datacenter1/vm folder: folder1/datacenter1/vm folder: /folder1/datacenter1/vm/folder2. | Optional |
datacenter | Destination datacenter for the deploy operation. | Required |
snapshot_name | Sets the snapshot name to manage. This param is required only if state is not remove_all . | Optional |
description | Define an arbitrary description to attach to snapshot. | Optional |
quiesce | If set to true and virtual machine is powered on, it will quiesce the file system in virtual machine. Note that VMware Tools are required for this flag. If virtual machine is powered off or VMware Tools are not available, then this flag is set to false . If virtual machine does not provide capability to take quiesce snapshot, then this flag is set to false . Possible values are: Yes, No. Default is No. | Optional |
memory_dump | If set to true , memory dump of virtual machine is also included in snapshot. Note that memory snapshots take time and resources, this will take longer time to create. If virtual machine does not provide capability to take memory snapshot, then this flag is set to false . Possible values are: Yes, No. Default is No. | Optional |
remove_children | If set to true and state is set to absent , then entire snapshot subtree is set for removal. Possible values are: Yes, No. Default is No. | Optional |
new_snapshot_name | Value to rename the existing snapshot to. | Optional |
new_description | Value to change the description of an existing snapshot to. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareGuestSnapshot.snapshot_results | unknown | metadata about the virtual machine snapshots |
#
Command Example!vmware-guest-snapshot datacenter="DC1" folder="/DC1/vm/" name="test_vm_0001" state="present" snapshot_name="snap1" description="snap1_description"
#
Context Example#
Human Readable Output#
CHANGED
#
vmware-guest-snapshot-infoGather info about virtual machine's snapshots in vCenter Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_guest_snapshot_info_module.html
#
Base Commandvmware-guest-snapshot-info
#
InputArgument Name | Description | Required |
---|---|---|
name | Name of the VM to work with. This is required if uuid or moid is not supplied. | Optional |
uuid | UUID of the instance to manage if known, this is VMware's BIOS UUID by default. This is required if name or moid parameter is not supplied. The folder is ignored, if uuid is provided. | Optional |
moid | Managed Object ID of the instance to manage if known, this is a unique identifier only within a single vCenter instance. This is required if name or uuid is not supplied. | Optional |
use_instance_uuid | Whether to use the VMware instance UUID rather than the BIOS UUID. Possible values are: Yes, No. Default is No. | Optional |
folder | Destination folder, absolute or relative path to find an existing guest. This is required only, if multiple virtual machines with same name are found on given vCenter. The folder should include the datacenter. ESX's datacenter is ha-datacenter Examples: folder: /ha-datacenter/vm folder: ha-datacenter/vm folder: /datacenter1/vm folder: datacenter1/vm folder: /datacenter1/vm/folder1 folder: datacenter1/vm/folder1 folder: /folder1/datacenter1/vm folder: folder1/datacenter1/vm folder: /folder1/datacenter1/vm/folder2. | Optional |
datacenter | Name of the datacenter. | Required |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareGuestSnapshotInfo.guest_snapshots | unknown | metadata about the snapshot information |
#
vmware-guest-tools-upgradeModule to upgrade VMTools Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_guest_tools_upgrade_module.html
#
Base Commandvmware-guest-tools-upgrade
#
InputArgument Name | Description | Required |
---|---|---|
name | Name of the virtual machine to work with. This is required if uuid or moid is not supplied. | Optional |
name_match | If multiple virtual machines matching the name, use the first or last found. Possible values are: first, last. Default is first. | Optional |
uuid | UUID of the instance to manage if known, this is VMware's unique identifier. This is required if name or moid is not supplied. | Optional |
moid | Managed Object ID of the instance to manage if known, this is a unique identifier only within a single vCenter instance. This is required if name or uuid is not supplied. | Optional |
folder | Destination folder, absolute or relative path to find an existing guest. This is required, if name is supplied. The folder should include the datacenter. ESX's datacenter is ha-datacenter Examples: folder: /ha-datacenter/vm folder: ha-datacenter/vm folder: /datacenter1/vm folder: datacenter1/vm folder: /datacenter1/vm/folder1 folder: datacenter1/vm/folder1 folder: /folder1/datacenter1/vm folder: folder1/datacenter1/vm folder: /folder1/datacenter1/vm/folder2. | Optional |
datacenter | Destination datacenter where the virtual machine exists. | Required |
#
Context OutputPath | Type | Description |
---|
#
vmware-guest-tools-waitWait for VMware tools to become available Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_guest_tools_wait_module.html
#
Base Commandvmware-guest-tools-wait
#
InputArgument Name | Description | Required |
---|---|---|
name | Name of the VM for which to wait until the tools become available. This is required if uuid or moid is not supplied. | Optional |
name_match | If multiple VMs match the name, use the first or last found. Possible values are: first, last. Default is first. | Optional |
folder | Destination folder, absolute or relative path to find an existing guest. This is required only, if multiple VMs with same name is found. The folder should include the datacenter. ESX's datacenter is ha-datacenter . Examples: folder: /ha-datacenter/vm folder: ha-datacenter/vm folder: /datacenter1/vm folder: datacenter1/vm folder: /datacenter1/vm/folder1 folder: datacenter1/vm/folder1 folder: /folder1/datacenter1/vm folder: folder1/datacenter1/vm folder: /folder1/datacenter1/vm/folder2. | Optional |
uuid | 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 name or moid is not supplied. | Optional |
moid | Managed Object ID of the instance to manage if known, this is a unique identifier only within a single vCenter instance. This is required if name or uuid is not supplied. | Optional |
use_instance_uuid | Whether to use the VMware instance UUID rather than the BIOS UUID. Possible values are: Yes, No. Default is No. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareGuestToolsWait.instance | unknown | metadata about the virtual machine |
#
vmware-guest-videoModify video card configurations of specified virtual machine in given vCenter infrastructure Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_guest_video_module.html
#
Base Commandvmware-guest-video
#
InputArgument Name | Description | Required |
---|---|---|
name | Name of the virtual machine. This is a required parameter, if parameter uuid or moid is not supplied. | Optional |
uuid | UUID of the instance to gather facts if known, this is VMware's unique identifier. This is a required parameter, if parameter name or moid is not supplied. | Optional |
moid | Managed Object ID of the instance to manage if known, this is a unique identifier only within a single vCenter instance. This is required if name or uuid is not supplied. | Optional |
folder | Destination folder, absolute or relative path to find an existing guest. This is a required parameter, only if multiple VMs are found with same name. The folder should include the datacenter. ESXi server's datacenter is ha-datacenter. Examples: folder: /ha-datacenter/vm folder: ha-datacenter/vm folder: /datacenter1/vm folder: datacenter1/vm folder: /datacenter1/vm/folder1 folder: datacenter1/vm/folder1 folder: /folder1/datacenter1/vm folder: folder1/datacenter1/vm folder: /folder1/datacenter1/vm/folder2. | Optional |
datacenter | The datacenter name to which virtual machine belongs to. This parameter is case sensitive. Default is ha-datacenter. | Optional |
gather_video_facts | If set to True, return settings of the video card, other attributes are ignored. If set to False, will do reconfiguration and return video card settings. Default is no. | Optional |
use_auto_detect | If set to True, applies common video settings to the guest operating system, attributes display_number and video_memory_mb are ignored. If set to False, the number of display and the total video memory will be reconfigured using display_number and video_memory_mb . | Optional |
display_number | The number of display. Valid value from 1 to 10. The maximum display number is 4 on vCenter 6.0, 6.5 web UI. | Optional |
video_memory_mb | 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. For specific guest OS, supported minimum and maximum video memory are different, please be careful on setting this. | Optional |
enable_3D | Enable 3D for guest operating systems on which VMware supports 3D. | Optional |
renderer_3D | If set to automatic , selects the appropriate option (software or hardware) for this virtual machine automatically. If set to software , uses normal CPU processing for 3D calculations. If set to hardware , requires graphics hardware (GPU) for faster 3D calculations. Possible values are: automatic, software, hardware. | Optional |
memory_3D_mb | The value of 3D Memory must be power of 2 and valid value is from 32 MB to 2048 MB. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareGuestVideo.video_status | unknown | metadata about the virtual machine's video card after managing them |
#
vmware-guest-vncManages VNC remote display on virtual machines in vCenter Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_guest_vnc_module.html
#
Base Commandvmware-guest-vnc
#
InputArgument Name | Description | Required |
---|---|---|
datacenter | Destination datacenter for the deploy operation. This parameter is case sensitive. Default is ha-datacenter. | Optional |
state | Set the state of VNC on virtual machine. Possible values are: present, absent. Default is present. | Optional |
name | Name of the virtual machine to work with. Virtual machine names in vCenter are not necessarily unique, which may be problematic, see name_match . | Optional |
name_match | If multiple virtual machines matching the name, use the first or last found. Possible values are: first, last. Default is first. | Optional |
uuid | UUID of the instance to manage if known, this is VMware's unique identifier. This is required, if name or moid is not supplied. | Optional |
moid | Managed Object ID of the instance to manage if known, this is a unique identifier only within a single vCenter instance. This is required if name or uuid is not supplied. | Optional |
folder | Destination folder, absolute or relative path to find an existing guest. The folder should include the datacenter. ESX's datacenter is ha-datacenter. | Optional |
vnc_ip | Sets an IP for VNC on virtual machine. This is required only when state is set to present and will be ignored if state is absent. Default is 0.0.0.0. | Optional |
vnc_port | The port that VNC listens on. Usually a number between 5900 and 7000 depending on your config. This is required only when state is set to present and will be ignored if state is absent. Default is 0. | Optional |
vnc_password | Sets a password for VNC on virtual machine. This is required only when state is set to present and will be ignored if state is absent. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareGuestVnc.changed | boolean | If anything changed on VM's extraConfig. |
VMware.VmwareGuestVnc.failed | boolean | If changes failed. |
VMware.VmwareGuestVnc.instance | unknown | Dictionary describing the VM, including VNC info. |
#
Command Example!vmware-guest-vnc folder="/DC1/vm" name="test_vm_0001" vnc_port="5990" vnc_password="vNc5ecr3t" datacenter="DC1" state="present"
#
Context Example#
Human Readable Output#
CHANGED
- changed: True
#
Instance
- annotation:
- guest_consolidation_needed: False
- guest_question: None
- guest_tools_status: guestToolsNotRunning
- guest_tools_version: 0
- hw_cluster: cluster
- hw_cores_per_socket: 1
- hw_esxi_host: esxi01
- hw_folder: /DC1/vm
- hw_guest_full_name: None
- hw_guest_ha_state: None
- hw_guest_id: None
- hw_is_template: False
- hw_memtotal_mb: 512
- hw_name: test_vm_0001
- hw_power_status: poweredOff
- hw_processor_count: 4
- hw_product_uuid: 42166c31-2bd1-6ac0-1ebb-a6db907f529e
- hw_version: vmx-13
- instance_uuid: 5016ea58-ccce-5688-f16b-82ca0b25e513
- ipv4: None
- ipv6: None
- module_hw: True
- moid: vm-21
- vimref: vim.VirtualMachine:vm-21
#
Current_Snapshot
- creation_time: 2021-07-11T17:02:28.131433+00:00
- description: snap1_description
- id: 1
- name: snap1
- state: poweredOff
#
Customvalues#
Hw_Datastores
- 0: datastore1
#
Hw_Eth0
- addresstype: manual
- ipaddresses: None
- label: Network adapter 1
- macaddress: aa:bb:dd:aa:00:14
- macaddress_dash: aa-bb-dd-aa-00-14
- portgroup_key: None
- portgroup_portkey: None
- summary: VM Network
#
Hw_Files
- 0: [datastore1] test_vm_0001/test_vm_0001.vmx
- 1: [datastore1] test_vm_0001/test_vm_0001-Snapshot1.vmsn
- 2: [datastore1] test_vm_0001/test_vm_0001.vmsd
- 3: [datastore1] test_vm_0001/test_vm_0001.vmdk
- 4: [datastore1] test_vm_0001/test_vm_0001-000001.vmdk
#
Hw_Interfaces
- 0: eth0
#
Snapshots#
Snap1
- creation_time: 2021-07-11T17:02:28.131433+00:00
- description: snap1_description
- id: 1
- name: snap1
- state: poweredOff
#
Vnc
- enabled: TRUE
- ip: 0.0.0.0
- password: VALUE_SPECIFIED_IN_NO_LOG_PARAMETER
- port: 5990
#
vmware-hostAdd, remove, or move an ESXi host to, from, or within vCenter Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_host_module.html
#
Base Commandvmware-host
#
InputArgument Name | Description | Required |
---|---|---|
datacenter_name | Name of the datacenter to add the host. Aliases added in version 2.6. | Required |
cluster_name | Name of the cluster to add the host. If folder is not set, then this parameter is required. Aliases added in version 2.6. | Optional |
folder | Name of the folder under which host to add. If cluster_name is not set, then this parameter is required. For example, if there is a datacenter 'dc1' under folder called 'Site1' then, this value will be '/Site1/dc1/host'. Here 'host' is an invisible folder under VMware Web Client. Another example, if there is a nested folder structure like '/myhosts/india/pune' under datacenter 'dc2', then folder value will be '/dc2/host/myhosts/india/pune'. Other Examples: - '/Site2/dc2/Asia-Cluster/host' - '/dc3/Asia-Cluster/host'. | Optional |
add_connected | If set to True , then the host should be connected as soon as it is added. This parameter is ignored if state is set to a value other than present . Possible values are: Yes, No. Default is Yes. | Optional |
esxi_hostname | ESXi hostname to manage. | Required |
esxi_username | ESXi username. Required for adding a host. Optional for reconnect. If both esxi_username and esxi_password are used Unused for removing. No longer a required parameter from version 2.5. | Optional |
esxi_password | ESXi password. Required for adding a host. Optional for reconnect. Unused for removing. No longer a required parameter from version 2.5. | Optional |
state | If set to present , add the host if host is absent. If set to present , update the location of the host if host already exists. If set to absent , remove the host if host is present. If set to absent , do nothing if host already does not exists. If set to add_or_reconnect , add the host if it's absent else reconnect it and update the location. If set to reconnect , then reconnect the host if it's present and update the location. Possible values are: present, absent, add_or_reconnect, reconnect. Default is present. | Optional |
esxi_ssl_thumbprint | Specifying the hostsystem certificate's thumbprint. Use following command to get hostsystem certificate's thumbprint - # openssl x509 -in /etc/vmware/ssl/rui.crt -fingerprint -sha1 -noout Only used if fetch_thumbprint isn't set to true . | Optional |
fetch_ssl_thumbprint | Fetch the thumbprint of the host's SSL certificate. This basically disables the host certificate verification (check if it was signed by a recognized CA). Disable this option if you want to allow only hosts with valid certificates to be added to vCenter. If this option is set to false and the certificate can't be verified, an add or reconnect will fail. Unused when esxi_ssl_thumbprint is set. Optional for reconnect, but only used if esxi_username and esxi_password are used. Unused for removing. Possible values are: Yes, No. Default is Yes. | Optional |
force_connection | Force the connection if the host is already being managed by another vCenter server. Possible values are: Yes, No. Default is Yes. | Optional |
reconnect_disconnected | Reconnect disconnected hosts. This is only used if state is set to present and if the host already exists. Possible values are: Yes, No. Default is Yes. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareHost.result | string | metadata about the new host system added |
#
Command Example!vmware-host datacenter_name="DC1" cluster_name="cluster" esxi_hostname="esxi01" esxi_username="root" esxi_password="PASSWORD" state="present"
#
Context Example#
Human Readable Output#
SUCCESS
- changed: False
- result: Host already connected to vCenter 'vcenter' in cluster 'cluster'
#
vmware-host-acceptanceManage the host acceptance level of an ESXi host Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_host_acceptance_module.html
#
Base Commandvmware-host-acceptance
#
InputArgument Name | Description | Required |
---|---|---|
cluster_name | Name of the cluster. Acceptance level of all ESXi host system in the given cluster will be managed. If esxi_hostname is not given, this parameter is required. | Optional |
esxi_hostname | ESXi hostname. Acceptance level of this ESXi host system will be managed. If cluster_name is not given, this parameter is required. | Optional |
state | Set or list acceptance level of the given ESXi host. If set to list , then will return current acceptance level of given host system/s. If set to present , then will set given acceptance level. Possible values are: list, present. Default is list. | Optional |
acceptance_level | Name of acceptance level. If set to partner , then accept only partner and VMware signed and certified VIBs. If set to vmware_certified , then accept only VIBs that are signed and certified by VMware. If set to vmware_accepted , then accept VIBs that have been accepted by VMware. If set to community , then accept all VIBs, even those that are not signed. Possible values are: community, partner, vmware_accepted, vmware_certified. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareHostAcceptance.facts | unknown | dict with hostname as key and dict with acceptance level facts, error as value |
#
Command Example!vmware-host-acceptance cluster_name="cluster" acceptance_level="community" state="present"
#
Context Example#
Human Readable Output#
CHANGED
#
vmware-host-active-directoryJoins an ESXi host system to an Active Directory domain or leaves it Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_host_active_directory_module.html
#
Base Commandvmware-host-active-directory
#
InputArgument Name | Description | Required |
---|---|---|
ad_domain | AD Domain to join. | Optional |
ad_user | Username for AD domain join. | Optional |
ad_password | Password for AD domain join. | Optional |
ad_state | Whether the ESXi host is joined to an AD domain or not. Possible values are: present, absent. Default is absent. | Optional |
esxi_hostname | Name of the host system to work with. This parameter is required if cluster_name is not specified. | Optional |
cluster_name | Name of the cluster from which all host systems will be used. This parameter is required if esxi_hostname is not specified. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareHostActiveDirectory.results | unknown | metadata about host system's AD domain join state |
#
vmware-host-capability-infoGathers info about an ESXi host's capability information Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_host_capability_info_module.html
#
Base Commandvmware-host-capability-info
#
InputArgument Name | Description | Required |
---|---|---|
cluster_name | Name of the cluster from all host systems to be used for information gathering. If esxi_hostname is not given, this parameter is required. | Optional |
esxi_hostname | ESXi hostname to gather information from. If cluster_name is not given, this parameter is required. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareHostCapabilityInfo.hosts_capability_info | unknown | metadata about host's capability info |
#
Command Example!vmware-host-capability-info cluster_name="cluster"
#
Context Example#
Human Readable Output#
SUCCESS
- changed: False
#
Hosts_Capability_Info
#
esxi01
- accel3dSupported: False
- backgroundSnapshotsSupported: False
- checkpointFtSupported: False
- cloneFromSnapshotSupported: True
- cpuHwMmuSupported: True
- cpuMemoryResourceConfigurationSupported: True
- cryptoSupported: True
- datastorePrincipalSupported: False
- deltaDiskBackingsSupported: True
- eightPlusHostVmfsSharedAccessSupported: True
- encryptedVMotionSupported: True
- encryptionCBRCSupported: False
- encryptionChangeOnAddRemoveSupported: False
- encryptionFaultToleranceSupported: False
- encryptionHBRSupported: False
- encryptionHotOperationSupported: False
- encryptionMemorySaveSupported: False
- encryptionRDMSupported: False
- encryptionVFlashSupported: False
- encryptionWithSnapshotsSupported: False
- featureCapabilitiesSupported: True
- firewallIpRulesSupported: True
- ftSupported: False
- gatewayOnNicSupported: True
- hbrNicSelectionSupported: True
- highGuestMemSupported: True
- hostAccessManagerSupported: True
- interVMCommunicationThroughVMCISupported: False
- ipmiSupported: True
- iscsiSupported: True
- latencySensitivitySupported: True
- localSwapDatastoreSupported: True
- loginBySSLThumbprintSupported: True
- maintenanceModeSupported: True
- markAsLocalSupported: True
- markAsSsdSupported: True
- maxHostRunningVms: 19
- maxHostSupportedVcpus: 64
- maxNumDisksSVMotion: 248
- maxRegisteredVMs: 76
- maxRunningVMs: 0
- maxSupportedVMs: None
- maxSupportedVcpus: None
- maxVcpusPerFtVm: 4
- messageBusProxySupported: True
- multipleNetworkStackInstanceSupported: True
- nestedHVSupported: True
- nfs41Krb5iSupported: True
- nfs41Supported: True
- nfsSupported: True
- nicTeamingSupported: True
- oneKVolumeAPIsSupported: True
- perVMNetworkTrafficShapingSupported: False
- perVmSwapFiles: True
- preAssignedPCIUnitNumbersSupported: True
- provisioningNicSelectionSupported: True
- rebootSupported: True
- recordReplaySupported: False
- recursiveResourcePoolsSupported: True
- reliableMemoryAware: True
- replayUnsupportedReason: incompatibleCpu
- restrictedSnapshotRelocateSupported: True
- sanSupported: True
- scaledScreenshotSupported: True
- scheduledHardwareUpgradeSupported: True
- screenshotSupported: True
- servicePackageInfoSupported: True
- shutdownSupported: True
- smartCardAuthenticationSupported: True
- smpFtSupported: False
- snapshotRelayoutSupported: True
- standbySupported: True
- storageIORMSupported: True
- storagePolicySupported: True
- storageVMotionSupported: True
- suspendedRelocateSupported: True
- tpmSupported: False
- turnDiskLocatorLedSupported: True
- unsharedSwapVMotionSupported: True
- upitSupported: None
- vFlashSupported: True
- vPMCSupported: False
- vStorageCapable: True
- virtualExecUsageSupported: True
- virtualVolumeDatastoreSupported: True
- vlanTaggingSupported: True
- vmDirectPathGen2Supported: False
- vmDirectPathGen2UnsupportedReasonExtended: None
- vmfsDatastoreMountCapable: True
- vmotionAcrossNetworkSupported: True
- vmotionSupported: True
- vmotionWithStorageVMotionSupported: True
- vrNfcNicSelectionSupported: True
- vsanSupported: True
#
Checkpointftcompatibilityissues
- 0: haAgentIssue
- 1: missingFTLoggingNic
- 2: missingVMotionNic
#
Ftcompatibilityissues
- 0: haAgentIssue
- 1: incompatibleCpu
- 2: missingFTLoggingNic
- 3: missingVMotionNic
#
Replaycompatibilityissues#
Smpftcompatibilityissues
- 0: haAgentIssue
- 1: missingFTLoggingNic
- 2: missingVMotionNic
#
Supportedvmfsmajorversion
- 0: 5
- 1: 6
#
Vmdirectpathgen2Unsupportedreason
- 0: hostNptIncompatibleHardware
#
vmware-host-config-infoGathers info about an ESXi host's advance configuration information Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_host_config_info_module.html
#
Base Commandvmware-host-config-info
#
InputArgument Name | Description | Required |
---|---|---|
cluster_name | Name of the cluster from which the ESXi host belong to. If esxi_hostname is not given, this parameter is required. | Optional |
esxi_hostname | ESXi hostname to gather information from. If cluster_name is not given, this parameter is required. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareHostConfigInfo.hosts_info | unknown | dict with hostname as key and dict with host config information |
#
Command Example!vmware-host-config-info cluster_name="cluster"