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"
#
Context Example#
Human Readable Output#
SUCCESS
- changed: False
#
Hosts_Info
#
esxi01
- Annotations.WelcomeMessage:
- BufferCache.FlushInterval: 30000
- BufferCache.HardMaxDirty: 95
- BufferCache.PerFileHardMaxDirty: 50
- BufferCache.SoftMaxDirty: 15
- CBRC.DCacheMemReserved: 400
- CBRC.DCacheSize: 32768
- CBRC.DigestJournalBootInterval: 10
- CBRC.Enable: False
- COW.COWMaxHeapSizeMB: 192
- COW.COWMaxREPageCacheszMB: 256
- COW.COWMinREPageCacheszMB: 0
- COW.COWREPageCacheEviction: 1
- Config.Defaults.cpuidMask.mode.0.eax: disable
- Config.Defaults.cpuidMask.mode.0.ebx: disable
- Config.Defaults.cpuidMask.mode.0.ecx: disable
- Config.Defaults.cpuidMask.mode.0.edx: disable
- Config.Defaults.cpuidMask.mode.1.eax: disable
- Config.Defaults.cpuidMask.mode.1.ebx: disable
- Config.Defaults.cpuidMask.mode.1.ecx: disable
- Config.Defaults.cpuidMask.mode.1.edx: disable
- Config.Defaults.cpuidMask.mode.80000000.eax: disable
- Config.Defaults.cpuidMask.mode.80000000.ebx: disable
- Config.Defaults.cpuidMask.mode.80000000.ecx: disable
- Config.Defaults.cpuidMask.mode.80000000.edx: disable
- Config.Defaults.cpuidMask.mode.80000001.eax: disable
- Config.Defaults.cpuidMask.mode.80000001.ebx: disable
- Config.Defaults.cpuidMask.mode.80000001.ecx: disable
- Config.Defaults.cpuidMask.mode.80000001.edx: disable
- Config.Defaults.cpuidMask.mode.80000008.eax: disable
- Config.Defaults.cpuidMask.mode.80000008.ebx: disable
- Config.Defaults.cpuidMask.mode.80000008.ecx: disable
- Config.Defaults.cpuidMask.mode.80000008.edx: disable
- Config.Defaults.cpuidMask.mode.8000000A.eax: disable
- Config.Defaults.cpuidMask.mode.8000000A.ebx: disable
- Config.Defaults.cpuidMask.mode.8000000A.ecx: disable
- Config.Defaults.cpuidMask.mode.8000000A.edx: disable
- Config.Defaults.cpuidMask.mode.d.eax: disable
- Config.Defaults.cpuidMask.mode.d.ebx: disable
- Config.Defaults.cpuidMask.mode.d.ecx: disable
- Config.Defaults.cpuidMask.mode.d.edx: disable
- Config.Defaults.cpuidMask.val.0.eax:
- Config.Defaults.cpuidMask.val.0.ebx:
- Config.Defaults.cpuidMask.val.0.ecx:
- Config.Defaults.cpuidMask.val.0.edx:
- Config.Defaults.cpuidMask.val.1.eax:
- Config.Defaults.cpuidMask.val.1.ebx:
- Config.Defaults.cpuidMask.val.1.ecx:
- Config.Defaults.cpuidMask.val.1.edx:
- Config.Defaults.cpuidMask.val.80000000.eax:
- Config.Defaults.cpuidMask.val.80000000.ebx:
- Config.Defaults.cpuidMask.val.80000000.ecx:
- Config.Defaults.cpuidMask.val.80000000.edx:
- Config.Defaults.cpuidMask.val.80000001.eax:
- Config.Defaults.cpuidMask.val.80000001.ebx:
- Config.Defaults.cpuidMask.val.80000001.ecx:
- Config.Defaults.cpuidMask.val.80000001.edx:
- Config.Defaults.cpuidMask.val.80000008.eax:
- Config.Defaults.cpuidMask.val.80000008.ebx:
- Config.Defaults.cpuidMask.val.80000008.ecx:
- Config.Defaults.cpuidMask.val.80000008.edx:
- Config.Defaults.cpuidMask.val.8000000A.eax:
- Config.Defaults.cpuidMask.val.8000000A.ebx:
- Config.Defaults.cpuidMask.val.8000000A.ecx:
- Config.Defaults.cpuidMask.val.8000000A.edx:
- Config.Defaults.cpuidMask.val.d.eax:
- Config.Defaults.cpuidMask.val.d.ebx:
- Config.Defaults.cpuidMask.val.d.ecx:
- Config.Defaults.cpuidMask.val.d.edx:
- Config.Defaults.security.host.ruissl: True
- Config.Defaults.vGPU.consolidation: False
- Config.Etc.issue:
- Config.Etc.motd: The time and date of this login have been sent to the system logs.
WARNING: All commands run on the ESXi shell are logged and may be included in support bundles. Do not provide passwords directly on the command line. Most tools can prompt for secrets or accept them from standard input.
%1b[00mVMware offers supported, powerful system administration tools. Please see www.vmware.com/go/sysadmintools for details.
The ESXi Shell can be disabled by an administrative user. See the vSphere Security documentation for more information.
#
vmware-host-config-managerManage advanced system settings of an ESXi host Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_host_config_manager_module.html
#
Base Commandvmware-host-config-manager
#
InputArgument Name | Description | Required |
---|---|---|
cluster_name | Name of the cluster. Settings are applied to every ESXi host in given cluster. If esxi_hostname is not given, this parameter is required. | Optional |
esxi_hostname | ESXi hostname. Settings are applied to this ESXi host. If cluster_name is not given, this parameter is required. | Optional |
options | A dictionary of advanced system settings. Invalid options will cause module to error. Note that the list of advanced options (with description and values) can be found by running vim-cmd hostsvc/advopt/options . | Optional |
#
Context OutputPath | Type | Description |
---|
#
Command Example!vmware-host-config-manager cluster_name="cluster" options="{'Config.HostAgent.log.level': 'info'}"
#
Context Example#
Human Readable Output#
SUCCESS
- changed: False
- msg: All settings are already configured.
#
vmware-host-datastoreManage a datastore on ESXi host Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_host_datastore_module.html
#
Base Commandvmware-host-datastore
#
InputArgument Name | Description | Required |
---|---|---|
datacenter_name | Name of the datacenter to add the datastore. The datacenter isn't used by the API to create a datastore. Will be removed in 2.11. | Optional |
datastore_name | Name of the datastore to add/remove. | Required |
datastore_type | Type of the datastore to configure (nfs/nfs41/vmfs). Possible values are: nfs, nfs41, vmfs. | Required |
nfs_server | NFS host serving nfs datastore. Required if datastore type is set to nfs /nfs41 and state is set to present , else unused. Two or more servers can be defined if datastore type is set to nfs41 . | Optional |
nfs_path | Resource path on NFS host. Required if datastore type is set to nfs /nfs41 and state is set to present , else unused. | Optional |
nfs_ro | ReadOnly or ReadWrite mount. Unused if datastore type is not set to nfs /nfs41 and state is not set to present . Possible values are: Yes, No. Default is No. | Optional |
vmfs_device_name | Name of the device to be used as VMFS datastore. Required for VMFS datastore type and state is set to present , else unused. | Optional |
vmfs_version | VMFS version to use for datastore creation. Unused if datastore type is not set to vmfs and state is not set to present . | Optional |
esxi_hostname | ESXi hostname to manage the datastore. Required when used with a vcenter. | Optional |
state | present: Mount datastore on host if datastore is absent else do nothing. absent: Umount datastore if datastore is present else do nothing. Possible values are: present, absent. Default is present. | Optional |
#
Context OutputPath | Type | Description |
---|
#
Command Example!vmware-host-datastore datastore_name="datastore1" datastore_type="vmfs" vmfs_device_name="naa.6000c29d140dea19fc681e3e1b190c46" vmfs_version="6" esxi_hostname="esxi01" state="present"
#
Context Example#
Human Readable Output#
SUCCESS
- changed: False
#
vmware-host-dns-infoGathers info about an ESXi host's DNS configuration information Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_host_dns_info_module.html
#
Base Commandvmware-host-dns-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.VmwareHostDnsInfo.hosts_dns_info | unknown | metadata about DNS config from given cluster / host system |
#
Command Example!vmware-host-dns-info cluster_name="cluster"
#
Context Example#
Human Readable Output#
SUCCESS
#
vmware-host-factsGathers facts about remote ESXi hostsystem Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_host_facts_module.html
#
Base Commandvmware-host-facts
#
InputArgument Name | Description | Required |
---|---|---|
esxi_hostname | ESXi hostname. Host facts about the specified ESXi server will be returned. By specifying this option, you can select which ESXi hostsystem is returned if connecting to a vCenter. | Optional |
show_tag | Tags related to Host are shown if set to True . Possible values are: Yes, No. Default is No. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareHostFacts.facts | unknown | system info about the host machine |
#
vmware-host-feature-infoGathers info about an ESXi host's feature capability information Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_host_feature_info_module.html
#
Base Commandvmware-host-feature-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.VmwareHostFeatureInfo.hosts_feature_info | unknown | metadata about host's feature capability information |
#
Command Example!vmware-host-feature-info cluster_name="cluster"
#
Context Example#
Human Readable Output#
SUCCESS
#
vmware-host-firewall-infoGathers info about an ESXi host's firewall configuration information Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_host_firewall_info_module.html
#
Base Commandvmware-host-firewall-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.VmwareHostFirewallInfo.hosts_firewall_info | unknown | metadata about host's firewall configuration |
#
Command Example!vmware-host-firewall-info cluster_name="cluster"
#
Context Example#
Human Readable Output#
SUCCESS
#
vmware-host-firewall-managerManage firewall configurations about an ESXi host Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_host_firewall_manager_module.html
#
Base Commandvmware-host-firewall-manager
#
InputArgument Name | Description | Required |
---|---|---|
cluster_name | Name of the cluster. Firewall settings are applied to every ESXi host system in given cluster. If esxi_hostname is not given, this parameter is required. | Optional |
esxi_hostname | ESXi hostname. Firewall settings are applied to this ESXi host system. If cluster_name is not given, this parameter is required. | Optional |
rules | A list of Rule set which needs to be managed. Each member of list is rule set name and state to be set the rule. Both rule name and rule state are required parameters. Additional IPs and networks can also be specified Please see examples for more information. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareHostFirewallManager.rule_set_state | unknown | dict with hostname as key and dict with firewall rule set facts as value |
#
Command Example!vmware-host-firewall-manager cluster_name="cluster" rules="{{ [{'name': 'vvold', 'enabled': True}] }}"
#
Context Example#
Human Readable Output#
CHANGED
#
vmware-host-hyperthreadingEnables/Disables Hyperthreading optimization for an ESXi host system Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_host_hyperthreading_module.html
#
Base Commandvmware-host-hyperthreading
#
InputArgument Name | Description | Required |
---|---|---|
state | Enable or disable Hyperthreading. You need to reboot the ESXi host if you change the configuration. Make sure that Hyperthreading is enabled in the BIOS. Otherwise, it will be enabled, but never activated. Possible values are: enabled, disabled. Default is enabled. | 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.VmwareHostHyperthreading.results | unknown | metadata about host system's Hyperthreading configuration |
#
Command Example!vmware-host-hyperthreading esxi_hostname="esxi01" state="enabled"
#
Context Example#
Human Readable Output#
CHANGED
#
vmware-host-ipv6Enables/Disables IPv6 support for an ESXi host system Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_host_ipv6_module.html
#
Base Commandvmware-host-ipv6
#
InputArgument Name | Description | Required |
---|---|---|
state | Enable or disable IPv6 support. You need to reboot the ESXi host if you change the configuration. Possible values are: enabled, disabled. Default is enabled. | Optional |
esxi_hostname | Name of the host system to work with. This is required parameter if cluster_name is not specified. | Optional |
cluster_name | Name of the cluster from which all host systems will be used. This is required parameter if esxi_hostname is not specified. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareHostIpv6.result | unknown | metadata about host system's IPv6 configuration |
#
Command Example!vmware-host-ipv6 esxi_hostname="esxi01" state="enabled"
#
Context Example#
Human Readable Output#
SUCCESS
#
vmware-host-kernel-managerManage kernel module options on ESXi hosts Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_host_kernel_manager_module.html
#
Base Commandvmware-host-kernel-manager
#
InputArgument Name | Description | Required |
---|---|---|
esxi_hostname | Name of the ESXi host to work on. This parameter is required if cluster_name is not specified. | Optional |
cluster_name | Name of the VMware cluster to work on. All ESXi hosts in this cluster will be configured. This parameter is required if esxi_hostname is not specified. | Optional |
kernel_module_name | Name of the kernel module to be configured. | Required |
kernel_module_option | Specified configurations will be applied to the given module. These values are specified in key=value pairs and separated by a space when there are multiple options. | Required |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareHostKernelManager.results | unknown | dict with information on what was changed, by ESXi host in scope. |
#
Command Example!vmware-host-kernel-manager esxi_hostname="esxi01" kernel_module_name="tcpip4" kernel_module_option="ipv6=0"
#
Context Example#
Human Readable Output#
CHANGED
#
vmware-host-lockdownManage administrator permission for the local administrative account for the ESXi host Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_host_lockdown_module.html
#
Base Commandvmware-host-lockdown
#
InputArgument Name | Description | Required |
---|---|---|
cluster_name | Name of cluster. All host systems from given cluster used to manage lockdown. Required parameter, if esxi_hostname is not set. | Optional |
esxi_hostname | List of ESXi hostname to manage lockdown. Required parameter, if cluster_name is not set. See examples for specifications. | Optional |
state | State of hosts system If set to present , all host systems will be set in lockdown mode. If host system is already in lockdown mode and set to present , no action will be taken. If set to absent , all host systems will be removed from lockdown mode. If host system is already out of lockdown mode and set to absent , no action will be taken. Possible values are: present, absent. Default is present. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareHostLockdown.results | unknown | metadata about state of Host system lock down |
#
Command Example!vmware-host-lockdown esxi_hostname="esxi01" state="present"
#
Context Example#
Human Readable Output#
CHANGED
#
vmware-host-ntpManage NTP server configuration of an ESXi host Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_host_ntp_module.html
#
Base Commandvmware-host-ntp
#
InputArgument Name | Description | Required |
---|---|---|
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 |
ntp_servers | IP or FQDN of NTP server(s). This accepts a list of NTP servers. For multiple servers, please look at the examples. | Required |
state | present: Add NTP server(s), if specified server(s) are absent else do nothing. absent: Remove NTP server(s), if specified server(s) are present else do nothing. Specified NTP server(s) will be configured if state isn't specified. Possible values are: present, absent. | Optional |
verbose | Verbose output of the configuration change. Explains if an NTP server was added, removed, or if the NTP server sequence was changed. Possible values are: Yes, No. Default is No. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareHostNtp.results | unknown | metadata about host system's NTP configuration |
#
Command Example!vmware-host-ntp esxi_hostname="esxi01" ntp_servers="{{ ['0.pool.ntp.org', '1.pool.ntp.org'] }}"
#
Context Example#
Human Readable Output#
SUCCESS
#
vmware-host-ntp-infoGathers info about NTP configuration on an ESXi host Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_host_ntp_info_module.html
#
Base Commandvmware-host-ntp-info
#
InputArgument Name | Description | Required |
---|---|---|
cluster_name | Name of the cluster. NTP config information about each ESXi server will be returned for the given cluster. If esxi_hostname is not given, this parameter is required. | Optional |
esxi_hostname | ESXi hostname. NTP config information about this ESXi server will be returned. If cluster_name is not given, this parameter is required. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareHostNtpInfo.hosts_ntp_info | unknown | dict with hostname as key and dict with NTP infos as value |
#
Command Example!vmware-host-ntp-info cluster_name="cluster"
#
Context Example#
Human Readable Output#
SUCCESS
#
vmware-host-package-infoGathers info about available packages on an ESXi host Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_host_package_info_module.html
#
Base Commandvmware-host-package-info
#
InputArgument Name | Description | Required |
---|---|---|
cluster_name | Name of the cluster. Package information about each ESXi server will be returned for given cluster. If esxi_hostname is not given, this parameter is required. | Optional |
esxi_hostname | ESXi hostname. Package information about this ESXi server will be returned. If cluster_name is not given, this parameter is required. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareHostPackageInfo.hosts_package_info | unknown | dict with hostname as key and dict with package information as value |
#
Command Example!vmware-host-package-info cluster_name="cluster"
#
Context Example#
Human Readable Output#
SUCCESS
- changed: False
#
Hosts_Package_Info
#
vmware-host-powermgmt-policyManages the Power Management Policy of an ESXI host system Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_host_powermgmt_policy_module.html
#
Base Commandvmware-host-powermgmt-policy
#
InputArgument Name | Description | Required |
---|---|---|
policy | Set the Power Management Policy of the host system. Possible values are: high-performance, balanced, low-power, custom. Default is balanced. | Optional |
esxi_hostname | Name of the host system to work with. This is required parameter if cluster_name is not specified. | Optional |
cluster_name | Name of the cluster from which all host systems will be used. This is required parameter if esxi_hostname is not specified. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareHostPowermgmtPolicy.result | unknown | metadata about host system's Power Management Policy |
#
Command Example!vmware-host-powermgmt-policy esxi_hostname="esxi01" policy="high-performance"
#
Context Example#
Human Readable Output#
CHANGED
#
vmware-host-powerstateManages power states of host systems in vCenter Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_host_powerstate_module.html
#
Base Commandvmware-host-powerstate
#
InputArgument Name | Description | Required |
---|---|---|
state | Set the state of the host system. Possible values are: power-down-to-standby, power-up-from-standby, shutdown-host, reboot-host. Default is shutdown-host. | Optional |
esxi_hostname | Name of the host system to work with. This is required parameter if cluster_name is not specified. | Optional |
cluster_name | Name of the cluster from which all host systems will be used. This is required parameter if esxi_hostname is not specified. | Optional |
force | This parameter specify if the host should be proceeding with user defined powerstate regardless of whether it is in maintenance mode. If state set to reboot-host and force as true , then host system is rebooted regardless of whether it is in maintenance mode. If state set to shutdown-host and force as true , then host system is shutdown regardless of whether it is in maintenance mode. If state set to power-down-to-standby and force to true , then all powered off VMs will evacuated. Not applicable if state set to power-up-from-standby . Possible values are: Yes, No. Default is No. | Optional |
timeout | This parameter defines timeout for state set to power-down-to-standby or power-up-from-standby . Ignored if state set to reboot-host or shutdown-host . This parameter is defined in seconds. Default is 600. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareHostPowerstate.result | unknown | metadata about host system's state |
#
vmware-host-scanhbaRescan host HBA's and optionally refresh the storage system Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_host_scanhba_module.html
#
Base Commandvmware-host-scanhba
#
InputArgument Name | Description | Required |
---|---|---|
esxi_hostname | ESXi hostname to Rescan the storage subsystem on. | Optional |
cluster_name | Cluster name to Rescan the storage subsystem on (this will run the rescan task on each host in the cluster). | Optional |
refresh_storage | Refresh the storage system in vCenter/ESXi Web Client for each host found. Possible values are: Yes, No. Default is No. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareHostScanhba.result | unknown | return confirmation of requested host and updated / refreshed storage system |
#
Command Example!vmware-host-scanhba esxi_hostname="esxi01" refresh_storage="True"
#
Context Example#
Human Readable Output#
CHANGED
#
vmware-host-service-infoGathers info about an ESXi host's services Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_host_service_info_module.html
#
Base Commandvmware-host-service-info
#
InputArgument Name | Description | Required |
---|---|---|
cluster_name | Name of the cluster. Service information about each ESXi server will be returned for given cluster. If esxi_hostname is not given, this parameter is required. | Optional |
esxi_hostname | ESXi hostname. Service information about this ESXi server will be returned. If cluster_name is not given, this parameter is required. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareHostServiceInfo.host_service_info | unknown | dict with hostname as key and dict with host service config information |
#
Command Example!vmware-host-service-info cluster_name="cluster"
#
Context Example#
Human Readable Output#
SUCCESS
#
vmware-host-service-managerManage services on a given ESXi host Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_host_service_manager_module.html
#
Base Commandvmware-host-service-manager
#
InputArgument Name | Description | Required |
---|---|---|
cluster_name | Name of the cluster. Service settings are applied to every ESXi host system/s in given cluster. If esxi_hostname is not given, this parameter is required. | Optional |
esxi_hostname | ESXi hostname. Service settings are applied to this ESXi host system. If cluster_name is not given, this parameter is required. | Optional |
state | Desired state of service. State value 'start' and 'present' has same effect. State value 'stop' and 'absent' has same effect. Possible values are: absent, present, restart, start, stop. Default is start. | Optional |
service_policy | Set of valid service policy strings. If set on , then service should be started when the host starts up. If set automatic , then service should run if and only if it has open firewall ports. If set off , then Service should not be started when the host starts up. Possible values are: automatic, off, on. | Optional |
service_name | Name of Service to be managed. This is a brief identifier for the service, for example, ntpd, vxsyslogd etc. This value should be a valid ESXi service name. | Required |
#
Context OutputPath | Type | Description |
---|
#
Command Example!vmware-host-service-manager cluster_name="cluster" service_name="ntpd" state="present"
#
Context Example#
Human Readable Output#
CHANGED
#
vmware-host-snmpConfigures SNMP on an ESXi host system Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_host_snmp_module.html
#
Base Commandvmware-host-snmp
#
InputArgument Name | Description | Required |
---|---|---|
state | Enable, disable, or reset the SNMP agent. Possible values are: disabled, enabled, reset. Default is disabled. | Optional |
community | List of SNMP community strings. | Optional |
snmp_port | Port used by the SNMP agent. Default is 161. | Optional |
trap_targets | A list of trap targets. You need to use hostname , port , and community for each trap target. | Optional |
trap_filter | A list of trap oids for traps not to be sent by agent, e.g. [ 1.1.1.1.4.1.6876.1.1.1.2, 1.1.1.1.4.1.6876.4.1.1.1 ] Use value reset to clear settings. | Optional |
send_trap | Send a test trap to validate the configuration. Possible values are: Yes, No. Default is No. | Optional |
hw_source | Source hardware events from IPMI sensors or CIM Indications. The embedded SNMP agent receives hardware events either from IPMI sensors sensors or CIM indications indications . Possible values are: indications, sensors. Default is indications. | Optional |
log_level | Syslog logging level. Possible values are: debug, info, warning, error. Default is info. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareHostSnmp.results | unknown | metadata about host system's SNMP configuration |
#
vmware-host-ssl-infoGather info of ESXi host system about SSL Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_host_ssl_info_module.html
#
Base Commandvmware-host-ssl-info
#
InputArgument Name | Description | Required |
---|---|---|
cluster_name | Name of the cluster. SSL thumbprint information about all ESXi host system in the given cluster will be reported. If esxi_hostname is not given, this parameter is required. | Optional |
esxi_hostname | ESXi hostname. SSL thumbprint information of this ESXi host system will be reported. If cluster_name is not given, this parameter is required. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareHostSslInfo.host_ssl_info | unknown | dict with hostname as key and dict with SSL thumbprint related info |
#
Command Example!vmware-host-ssl-info cluster_name="cluster"
#
Context Example#
Human Readable Output#
SUCCESS
#
vmware-host-vmhba-infoGathers info about vmhbas available on the given ESXi host Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_host_vmhba_info_module.html
#
Base Commandvmware-host-vmhba-info
#
InputArgument Name | Description | Required |
---|---|---|
esxi_hostname | Name of the host system to work with. Vmhba information about this ESXi server will be returned. 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. Vmhba information about each ESXi server will be returned for the given cluster. This parameter is required if esxi_hostname is not specified. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareHostVmhbaInfo.hosts_vmhbas_info | unknown | dict with hostname as key and dict with vmhbas information as value. |
#
Command Example!vmware-host-vmhba-info cluster_name="cluster"
#
Context Example#
Human Readable Output#
SUCCESS
#
vmware-host-vmnic-infoGathers info about vmnics available on the given ESXi host Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_host_vmnic_info_module.html
#
Base Commandvmware-host-vmnic-info
#
InputArgument Name | Description | Required |
---|---|---|
capabilities | Gather information about general capabilities (Auto negotiation, Wake On LAN, and Network I/O Control). Possible values are: Yes, No. Default is No. | Optional |
directpath_io | Gather information about DirectPath I/O capabilities and configuration. Possible values are: Yes, No. Default is No. | Optional |
sriov | Gather information about SR-IOV capabilities and configuration. Possible values are: Yes, No. Default is No. | Optional |
esxi_hostname | Name of the host system to work with. Vmnic information about this ESXi server will be returned. 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. Vmnic information about each ESXi server will be returned for the given cluster. This parameter is required if esxi_hostname is not specified. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareHostVmnicInfo.hosts_vmnics_info | unknown | dict with hostname as key and dict with vmnics information as value. for `num_vmnics`, only NICs starting with vmnic are counted. NICs like vusb* are not counted. details about vswitch and dvswitch was added in version 2.7. details about vmnics was added in version 2.8. |
#
Command Example!vmware-host-vmnic-info cluster_name="cluster"
#
Context Example#
Human Readable Output#
SUCCESS
- changed: False
#
Hosts_Vmnics_Info
#
esxi01
- num_vmnics: 2
#
All
- 0: vmnic0
- 1: vmnic1
#
Available
- 0: vmnic1
#
Dvswitch#
Used
- 0: vmnic0
#
Vmnic_Details#
List
- actual_duplex: Full Duplex
- actual_speed: 10000
- adapter: VMware Inc. vmxnet3 Virtual Ethernet Controller
- configured_duplex: Full Duplex
- configured_speed: 10000
- device: vmnic0
- driver: nvmxnet3
- location: 0000:0b:00.0
- mac: 00:0c:29:d9:27:04
- status: Connected
#
List
- actual_duplex: Full Duplex
- actual_speed: 10000
- adapter: VMware Inc. vmxnet3 Virtual Ethernet Controller
- configured_duplex: Full Duplex
- configured_speed: 10000
- device: vmnic1
- driver: nvmxnet3
- location: 0000:13:00.0
- mac: 00:0c:29:d9:27:0e
- status: Connected
#
Vswitch
#
Vswitch0
- 0: vmnic0
#
vmware-local-role-infoGather info about local roles on an ESXi host Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_local_role_info_module.html
#
Base Commandvmware-local-role-info
#
InputArgument Name | Description | Required |
---|
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareLocalRoleInfo.local_role_info | unknown | Info about role present on ESXi host |
#
Command Example!vmware-local-role-info
#
Context Example#
Human Readable Output#
SUCCESS
#
vmware-local-role-managerManage local roles on an ESXi host Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_local_role_manager_module.html
#
Base Commandvmware-local-role-manager
#
InputArgument Name | Description | Required |
---|---|---|
local_role_name | The local role name to be managed. | Required |
local_privilege_ids | The list of privileges that role needs to have. Please see https://docs.vmware.com/en/VMware-vSphere/6.0/com.vmware.vsphere.security.doc/GUID-ED56F3C4-77D0-49E3-88B6-B99B8B437B62.html . | Optional |
state | Indicate desired state of the role. If the role already exists when state=present , the role info is updated. Possible values are: present, absent. Default is present. | Optional |
force_remove | If set to False then prevents the role from being removed if any permissions are using it. Possible values are: Yes, No. Default is No. | Optional |
action | This parameter is only valid while updating an existing role with privileges. add will add the privileges to the existing privilege list. remove will remove the privileges from the existing privilege list. set will replace the privileges of the existing privileges with user defined list of privileges. Possible values are: add, remove, set. Default is set. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareLocalRoleManager.role_name | string | Name of local role |
VMware.VmwareLocalRoleManager.role_id | number | ESXi generated local role id |
VMware.VmwareLocalRoleManager.privileges | unknown | List of privileges |
VMware.VmwareLocalRoleManager.privileges_previous | unknown | List of privileges of role before the update |
VMware.VmwareLocalRoleManager.local_role_name | string | Name of local role |
VMware.VmwareLocalRoleManager.new_privileges | unknown | List of privileges |
VMware.VmwareLocalRoleManager.old_privileges | unknown | List of privileges of role before the update |
#
Command Example!vmware-local-role-manager local_role_name="vmware_qa" state="present"
#
Context Example#
Human Readable Output#
CHANGED
#
vmware-local-user-infoGather info about users on the given ESXi host Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_local_user_info_module.html
#
Base Commandvmware-local-user-info
#
InputArgument Name | Description | Required |
---|
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareLocalUserInfo.local_user_info | unknown | metadata about all local users |
#
vmware-local-user-managerManage local users on an ESXi host Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_local_user_manager_module.html
#
Base Commandvmware-local-user-manager
#
InputArgument Name | Description | Required |
---|---|---|
local_user_name | The local user name to be changed. | Required |
local_user_password | The password to be set. | Optional |
local_user_description | Description for the user. | Optional |
state | Indicate desired state of the user. If the user already exists when state=present , the user info is updated. Possible values are: present, absent. Default is present. | Optional |
#
Context OutputPath | Type | Description |
---|
#
vmware-maintenancemodePlace a host into maintenance mode Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_maintenancemode_module.html
#
Base Commandvmware-maintenancemode
#
InputArgument Name | Description | Required |
---|---|---|
esxi_hostname | Name of the host as defined in vCenter. | Required |
vsan | Specify which VSAN compliant mode to enter. Possible values are: ensureObjectAccessibility, evacuateAllData, noAction. | Optional |
evacuate | If set to True , evacuate all powered off VMs. Possible values are: Yes, No. Default is No. | Optional |
timeout | Specify a timeout for the operation. Default is 0. | Optional |
state | Enter or exit maintenance mode. Possible values are: present, absent. Default is present. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareMaintenancemode.hostsystem | string | Name of vim reference |
VMware.VmwareMaintenancemode.hostname | string | Name of host in vCenter |
VMware.VmwareMaintenancemode.status | string | Action taken |
#
Command Example!vmware-maintenancemode esxi_hostname="esxi01" vsan="ensureObjectAccessibility" evacuate="True" timeout="3600" state="present"
#
Context Example#
Human Readable Output#
CHANGED
- changed: True
- hostname: esxi01
- hostsystem: 'vim.HostSystem:host-10'
- msg: Host esxi01 entered maintenance mode
- status: ENTER
#
vmware-migrate-vmkMigrate a VMK interface from VSS to VDS Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_migrate_vmk_module.html
#
Base Commandvmware-migrate-vmk
#
InputArgument Name | Description | Required |
---|---|---|
esxi_hostname | ESXi hostname to be managed. | Required |
device | VMK interface name. | Required |
current_switch_name | Switch VMK interface is currently on. | Required |
current_portgroup_name | Portgroup name VMK interface is currently on. | Required |
migrate_switch_name | Switch name to migrate VMK interface to. | Required |
migrate_portgroup_name | Portgroup name to migrate VMK interface to. | Required |
#
Context OutputPath | Type | Description |
---|
#
vmware-object-role-permissionManage local roles on an ESXi host Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_object_role_permission_module.html
#
Base Commandvmware-object-role-permission
#
InputArgument Name | Description | Required |
---|---|---|
role | The role to be assigned permission. | Required |
principal | The user to be assigned permission. Required if group is not specified. | Optional |
group | The group to be assigned permission. Required if principal is not specified. | Optional |
object_name | The object name to assigned permission. | Required |
object_type | The object type being targeted. Possible values are: Folder, VirtualMachine, Datacenter, ResourcePool, Datastore, Network, HostSystem, ComputeResource, ClusterComputeResource, DistributedVirtualSwitch. Default is Folder. | Optional |
recursive | Should the permissions be recursively applied. Possible values are: Yes, No. Default is Yes. | Optional |
state | Indicate desired state of the object's permission. When state=present , the permission will be added if it doesn't already exist. When state=absent , the permission is removed if it exists. Possible values are: present, absent. Default is present. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareObjectRolePermission.changed | boolean | whether or not a change was made to the object's role |
#
vmware-portgroupCreate a VMware portgroup Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_portgroup_module.html
#
Base Commandvmware-portgroup
#
InputArgument Name | Description | Required |
---|---|---|
switch | vSwitch to modify. | Required |
portgroup | Portgroup name to add. | Required |
vlan_id | VLAN ID to assign to portgroup. Set to 0 (no VLAN tagging) by default. Default is 0. | Optional |
security | Network policy specifies layer 2 security settings for a portgroup such as promiscuous mode, where guest adapter listens to all the packets, MAC address changes and forged transmits. Dict which configures the different security values for portgroup. Valid attributes are: - promiscuous_mode (bool): indicates whether promiscuous mode is allowed. (default: None) - forged_transmits (bool): indicates whether forged transmits are allowed. (default: None) - mac_changes (bool): indicates whether mac changes are allowed. (default: None). | Optional |
teaming | Dictionary which configures the different teaming values for portgroup. Valid attributes are: - load_balancing (string): Network adapter teaming policy. load_balance_policy is also alias to this option. (default: loadbalance_srcid) - choices: [ loadbalance_ip, loadbalance_srcmac, loadbalance_srcid, failover_explicit ] - network_failure_detection (string): Network failure detection. (default: link_status_only) - choices: [ link_status_only, beacon_probing ] - notify_switches (bool): Indicate whether or not to notify the physical switch if a link fails. (default: None) - failback (bool): Indicate whether or not to use a failback when restoring links. (default: None) - active_adapters (list): List of active adapters used for load balancing. - standby_adapters (list): List of standby adapters used for failover. - All vmnics are used as active adapters if active_adapters and standby_adapters are not defined. - inbound_policy (bool): Indicate whether or not the teaming policy is applied to inbound frames as well. Deprecated. (default: False) - rolling_order (bool): Indicate whether or not to use a rolling policy when restoring links. Deprecated. (default: False). | Optional |
traffic_shaping | Dictionary which configures traffic shaping for the switch. Valid attributes are: - enabled (bool): Status of Traffic Shaping Policy. (default: None) - average_bandwidth (int): Average bandwidth (kbit/s). (default: None) - peak_bandwidth (int): Peak bandwidth (kbit/s). (default: None) - burst_size (int): Burst size (KB). (default: None). | Optional |
cluster_name | Name of cluster name for host membership. Portgroup will be created on all hosts of the given cluster. This option is required if hosts is not specified. | Optional |
hosts | List of name of host or hosts on which portgroup needs to be added. This option is required if cluster_name is not specified. | Optional |
state | Determines if the portgroup should be present or not. Possible values are: present, absent. Default is present. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwarePortgroup.result | unknown | metadata about the portgroup |
#
Command Example!vmware-portgroup switch="vSwitch0" portgroup="test" vlan_id="123" cluster_name=cluster
#
Context Example#
Human Readable Output#
CHANGED
- changed: True
#
Result
#
esxi01
- changed: True
- msg: Security changed
- portgroup: test
- sec_forged_transmits: No override
- sec_forged_transmits_previous: No override
- sec_mac_changes: No override
- sec_mac_changes_previous: No override
- sec_promiscuous_mode: No override
- sec_promiscuous_mode_previous: No override
- traffic_shaping: No override
- vlan_id: 123
- vswitch: vSwitch0
#
vmware-portgroup-infoGathers info about an ESXi host's Port Group configuration Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_portgroup_info_module.html
#
Base Commandvmware-portgroup-info
#
InputArgument Name | Description | Required |
---|---|---|
policies | Gather information about Security, Traffic Shaping, as well as Teaming and failover. The property ts stands for Traffic Shaping and lb for Load Balancing. Possible values are: Yes, No. Default is No. | Optional |
cluster_name | Name of the cluster. Info will be returned for all hostsystem belonging to this cluster name. 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.VmwarePortgroupInfo.hosts_portgroup_info | unknown | metadata about host's portgroup configuration |
#
vmware-resource-poolAdd/remove resource pools to/from vCenter Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_resource_pool_module.html
#
Base Commandvmware-resource-pool
#
InputArgument Name | Description | Required |
---|---|---|
datacenter | Name of the datacenter to add the host. | Required |
cluster | Name of the cluster to add the host. | Required |
resource_pool | Resource pool name to manage. | Required |
cpu_expandable_reservations | In a resource pool with an expandable reservation, the reservation on a resource pool can grow beyond the specified value. Possible values are: Yes, No. Default is Yes. | Optional |
cpu_reservation | Amount of resource that is guaranteed available to the virtual machine or resource pool. Default is 0. | Optional |
cpu_limit | The utilization of a virtual machine/resource pool will not exceed this limit, even if there are available resources. The default value -1 indicates no limit. Default is -1. | Optional |
cpu_shares | Memory shares are used in case of resource contention. Possible values are: high, custom, low, normal. Default is normal. | Optional |
mem_expandable_reservations | In a resource pool with an expandable reservation, the reservation on a resource pool can grow beyond the specified value. Possible values are: Yes, No. Default is Yes. | Optional |
mem_reservation | Amount of resource that is guaranteed available to the virtual machine or resource pool. Default is 0. | Optional |
mem_limit | The utilization of a virtual machine/resource pool will not exceed this limit, even if there are available resources. The default value -1 indicates no limit. Default is -1. | Optional |
mem_shares | Memory shares are used in case of resource contention. Possible values are: high, custom, low, normal. Default is normal. | Optional |
state | Add or remove the resource pool. Possible values are: present, absent. Default is present. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareResourcePool.instance | unknown | metadata about the new resource pool |
#
vmware-resource-pool-infoGathers info about resource pool information Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_resource_pool_info_module.html
#
Base Commandvmware-resource-pool-info
#
InputArgument Name | Description | Required |
---|
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareResourcePoolInfo.resource_pool_info | unknown | metadata about resource pool configuration |
#
Command Example!vmware-resource-pool-info
#
Context Example#
Human Readable Output#
SUCCESS
- changed: False
#
Resource_Pool_Info#
Resources
- cpu_allocation_expandable_reservation: True
- cpu_allocation_limit: 0
- cpu_allocation_overhead_limit: None
- cpu_allocation_reservation: 0
- cpu_allocation_shares: 4000
- cpu_allocation_shares_level: normal
- mem_allocation_expandable_reservation: True
- mem_allocation_limit: 0
- mem_allocation_overhead_limit: None
- mem_allocation_reservation: 0
- mem_allocation_shares: 163840
- mem_allocation_shares_level: normal
- name: Resources
- overall_status: green
- owner: cluster
- runtime_cpu_max_usage: 0
- runtime_cpu_overall_usage: 0
- runtime_cpu_reservation_used: 0
- runtime_cpu_reservation_used_vm: 0
- runtime_cpu_unreserved_for_pool: 0
- runtime_cpu_unreserved_for_vm: 0
- runtime_memory_max_usage: 0
- runtime_memory_overall_usage: 0
- runtime_memory_reservation_used: 0
- runtime_memory_reservation_used_vm: 0
- runtime_memory_unreserved_for_pool: 0
- runtime_memory_unreserved_for_vm: 0
#
vmware-tagManage VMware tags Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_tag_module.html
#
Base Commandvmware-tag
#
InputArgument Name | Description | Required |
---|---|---|
tag_name | The name of tag to manage. | Required |
tag_description | The tag description. This is required only if state is set to present . This parameter is ignored, when state is set to absent . Process of updating tag only allows description change. | Optional |
category_id | The unique ID generated by vCenter should be used to. User can get this unique ID from facts module. | Optional |
state | The state of tag. If set to present and tag does not exists, then tag is created. If set to present and tag exists, then tag is updated. If set to absent and tag exists, then tag is deleted. If set to absent and tag 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.VmwareTag.results | unknown | dictionary of tag metadata |
#
vmware-tag-infoManage VMware tag info Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_tag_info_module.html
#
Base Commandvmware-tag-info
#
InputArgument Name | Description | Required |
---|---|---|
protocol | The connection to protocol. Possible values are: http, https. Default is https. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareTagInfo.results | unknown | dictionary of tag metadata |
#
vmware-tag-managerManage association of VMware tags with VMware objects Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_tag_manager_module.html
#
Base Commandvmware-tag-manager
#
InputArgument Name | Description | Required |
---|---|---|
tag_names | List of tag(s) to be managed. You can also specify category name by specifying colon separated value. For example, "category_name:tag_name". You can skip category name if you have unique tag names. | Required |
state | If state is set to add or present will add the tags to the existing tag list of the given object. If state is set to remove or absent will remove the tags from the existing tag list of the given object. If state is set to set will replace the tags of the given objects with the user defined list of tags. Possible values are: present, absent, add, remove, set. Default is add. | Optional |
object_type | Type of object to work with. Possible values are: VirtualMachine, Datacenter, ClusterComputeResource, HostSystem, DistributedVirtualSwitch, DistributedVirtualPortgroup. | Required |
object_name | Name of the object to work with. For DistributedVirtualPortgroups the format should be "switch_name:portgroup_name". | Required |
protocol | The connection to protocol. Possible values are: http, https. Default is https. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareTagManager.tag_status | unknown | metadata about tags related to object configuration |
#
vmware-target-canonical-infoReturn canonical (NAA) from an ESXi host system Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_target_canonical_info_module.html
#
Base Commandvmware-target-canonical-info
#
InputArgument Name | Description | Required |
---|---|---|
target_id | The target id based on order of scsi device. version 2.6 onwards, this parameter is optional. | Optional |
cluster_name | Name of the cluster. Info about all SCSI devices for all host system in the given cluster is returned. This parameter is required, if esxi_hostname is not provided. | Optional |
esxi_hostname | Name of the ESXi host system. Info about all SCSI devices for the given ESXi host system is returned. This parameter is required, if cluster_name is not provided. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareTargetCanonicalInfo.canonical | string | metadata about SCSI Target device |
VMware.VmwareTargetCanonicalInfo.scsi_tgt_info | unknown | metadata about all SCSI Target devices |
#
Command Example!vmware-target-canonical-info target_id="7" esxi_hostname="esxi01"
#
Context Example#
Human Readable Output#
SUCCESS
- canonical:
- changed: False
#
vmware-vcenter-settingsConfigures general settings on a vCenter server Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_vcenter_settings_module.html
#
Base Commandvmware-vcenter-settings
#
InputArgument Name | Description | Required |
---|---|---|
database | The database settings for vCenter server. Valid attributes are: - max_connections (int): Maximum connections. (default: 50) - task_cleanup (bool): Task cleanup. (default: true) - task_retention (int): Task retention (days). (default: 30) - event_cleanup (bool): Event cleanup. (default: true) - event_retention (int): Event retention (days). (default: 30). Default is {'max_connections': 50, 'task_cleanup': True, 'task_retention': 30, 'event_cleanup': True, 'event_retention': 30}. | Optional |
runtime_settings | The unique runtime settings for vCenter server. Valid attributes are: - unique_id (int): vCenter server unique ID. - managed_address (str): vCenter server managed address. - vcenter_server_name (str): vCenter server name. (default: FQDN). | Optional |
user_directory | The user directory settings for the vCenter server installation. Valid attributes are: - timeout (int): User directory timeout. (default: 60) - query_limit (bool): Query limit. (default: true) - query_limit_size (int): Query limit size. (default: 5000) - validation (bool): Mail Validation. (default: true) - validation_period (int): Validation period. (default: 1440). Default is {'timeout': 60, 'query_limit': True, 'query_limit_size': 5000, 'validation': True, 'validation_period': 1440}. | Optional |
The settings vCenter server uses to send email alerts. Valid attributes are: - server (str): Mail server - sender (str): Mail sender address. | Optional | |
snmp_receivers | SNMP trap destinations for vCenter server alerts. Valid attributes are: - snmp_receiver_1_url (str): Primary Receiver ULR. (default: "localhost") - snmp_receiver_1_enabled (bool): Enable receiver. (default: True) - snmp_receiver_1_port (int): Receiver port. (default: 162) - snmp_receiver_1_community (str): Community string. (default: "public") - snmp_receiver_2_url (str): Receiver 2 ULR. (default: "") - snmp_receiver_2_enabled (bool): Enable receiver. (default: False) - snmp_receiver_2_port (int): Receiver port. (default: 162) - snmp_receiver_2_community (str): Community string. (default: "") - snmp_receiver_3_url (str): Receiver 3 ULR. (default: "") - snmp_receiver_3_enabled (bool): Enable receiver. (default: False) - snmp_receiver_3_port (int): Receiver port. (default: 162) - snmp_receiver_3_community (str): Community string. (default: "") - snmp_receiver_4_url (str): Receiver 4 ULR. (default: "") - snmp_receiver_4_enabled (bool): Enable receiver. (default: False) - snmp_receiver_4_port (int): Receiver port. (default: 162) - snmp_receiver_4_community (str): Community string. (default: ""). Default is {'snmp_receiver_1_url': 'localhost', 'snmp_receiver_1_enabled': True, 'snmp_receiver_1_port': 162, 'snmp_receiver_1_community': 'public', 'snmp_receiver_2_url': '', 'snmp_receiver_2_enabled': False, 'snmp_receiver_2_port': 162, 'snmp_receiver_2_community': '', 'snmp_receiver_3_url': '', 'snmp_receiver_3_enabled': False, 'snmp_receiver_3_port': 162, 'snmp_receiver_3_community': '', 'snmp_receiver_4_url': '', 'snmp_receiver_4_enabled': False, 'snmp_receiver_4_port': 162, 'snmp_receiver_4_community': ''}. | Optional |
timeout_settings | The vCenter server connection timeout for normal and long operations. Valid attributes are: - normal_operations (int) (default: 30) - long_operations (int) (default: 120). Default is {'normal_operations': 30, 'long_operations': 120}. | Optional |
logging_options | The level of detail that vCenter server usesfor log files. Possible values are: none, error, warning, info, verbose, trivia. Default is info. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareVcenterSettings.results | unknown | metadata about vCenter settings |
#
vmware-vcenter-statisticsConfigures statistics on a vCenter server Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_vcenter_statistics_module.html
#
Base Commandvmware-vcenter-statistics
#
InputArgument Name | Description | Required |
---|---|---|
interval_past_day | Settings for vCenter server past day statistic collection. Valid attributes are: - enabled (bool): Past day statistics collection enabled. (default: True) - interval_minutes (int): Interval duration (minutes). (choices: [1, 2, 3, 4, 5]) (default: 5) - save_for_days (int): Save for (days). (choices: [1, 2, 3, 4, 5]) (default: 1) - level (int): Statistics level. (choices: [1, 2, 3, 4]) (default: 1). | Optional |
interval_past_week | Settings for vCenter server past week statistic collection. Valid attributes are: - enabled (bool): Past week statistics collection enabled. (default: True) - interval_minutes (int): Interval duration (minutes). (choices: [30]) (default: 30) - save_for_weeks (int): Save for (weeks). (choices: [1]) (default: 1) - level (int): Statistics level. (choices: [1, 2, 3, 4]) (default: 1). | Optional |
interval_past_month | Settings for vCenter server past month statistic collection. Valid attributes are: - enabled (bool): Past month statistics collection enabled. (default: True) - interval_hours (int): Interval duration (hours). (choices: [2]) (default: 2) - save_for_months (int): Save for (months). (choices: [1]) (default: 1) - level (int): Statistics level. (choices: [1, 2, 3, 4]) (default: 1). | Optional |
interval_past_year | Settings for vCenter server past month statistic collection. Valid attributes are: - enabled (bool): Past month statistics collection enabled. (default: True) - interval_days (int): Interval duration (days). (choices: [1]) (default: 1) - save_for_years (int): Save for (years). (choices: [1, 2, 3, 4, 5]) (default: 1) - level (int): Statistics level. (choices: [1, 2, 3, 4]) (default: 1). | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareVcenterStatistics.results | unknown | metadata about vCenter statistics settings |
#
Command Example!vmware-vcenter-statistics interval_past_day="{'enabled': True, 'interval_minutes': 5, 'save_for_days': 1, 'level': 1}" interval_past_week="{'enabled': True, 'level': 1}" interval_past_month="{'enabled': True, 'level': 1}" interval_past_year="{'enabled': True, 'save_for_years': 1, 'level': 1}"
#
Context Example#
Human Readable Output#
SUCCESS
- changed: False
- msg: vCenter statistics already configured properly
- past_day_enabled: True
- past_day_interval: 5
- past_day_level: 1
- past_day_save_for: 1
- past_month_enabled: True
- past_month_interval: 2
- past_month_level: 1
- past_month_save_for: 1
- past_week_enabled: True
- past_week_interval: 30
- past_week_level: 1
- past_week_save_for: 1
- past_year_enabled: True
- past_year_interval: 1
- past_year_level: 1
- past_year_save_for: 1
#
vmware-vm-host-drs-ruleCreates vm/host group in a given cluster Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_vm_host_drs_rule_module.html
#
Base Commandvmware-vm-host-drs-rule
#
InputArgument Name | Description | Required |
---|---|---|
affinity_rule | If set to True , the DRS rule will be an Affinity rule. If set to False , the DRS rule will be an Anti-Affinity rule. Effective only if state is set to present . Possible values are: Yes, No. Default is Yes. | Optional |
datacenter | Datacenter to search for given cluster. If not set, we use first cluster we encounter with cluster_name . | Optional |
cluster_name | Cluster to create VM-Host rule. | Required |
drs_rule_name | Name of rule to create or remove. | Required |
enabled | If set to True , the DRS rule will be enabled. Effective only if state is set to present . Possible values are: Yes, No. Default is No. | Optional |
host_group_name | Name of Host group to use with rule. Effective only if state is set to present . | Required |
mandatory | If set to True , the DRS rule will be mandatory. Effective only if state is set to present . Possible values are: Yes, No. Default is No. | Optional |
state | If set to present and the rule doesn't exists then the rule will be created. If set to absent and the rule exists then the rule will be deleted. Possible values are: present, absent. Default is present. | Required |
vm_group_name | Name of VM group to use with rule. Effective only if state is set to present . | Required |
#
Context OutputPath | Type | Description |
---|
#
vmware-vm-infoReturn basic info pertaining to a VMware machine guest Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_vm_info_module.html
#
Base Commandvmware-vm-info
#
InputArgument Name | Description | Required |
---|---|---|
vm_type | If set to vm , then information are gathered for virtual machines only. If set to template , then information are gathered for virtual machine templates only. If set to all , then information are gathered for all virtual machines and virtual machine templates. Possible values are: all, vm, template. Default is all. | Optional |
show_attribute | Attributes related to VM guest shown in information only when this is set true . Possible values are: Yes, No. Default is No. | Optional |
folder | Specify a folder location of VMs to gather information from. 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 |
show_tag | Tags related to virtual machine are shown if set to True . Possible values are: Yes, No. Default is No. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareVmInfo.virtual_machines | unknown | list of dictionary of virtual machines and their information |
#
Command Example!vmware-vm-info
#
Context Example#
Human Readable Output#
SUCCESS
#
vmware-vm-shellRun commands in a VMware guest operating system Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_vm_shell_module.html
#
Base Commandvmware-vm-shell
#
InputArgument Name | Description | Required |
---|---|---|
datacenter | The datacenter hosting the virtual machine. If set, it will help to speed up virtual machine search. | Optional |
cluster | The cluster hosting the virtual machine. If set, it will help to speed up virtual machine search. | Optional |
folder | Destination folder, absolute or relative path to find an existing guest or create the new 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 |
vm_id | Name of the virtual machine to work with. | Required |
vm_id_type | The VMware identification method by which the virtual machine will be identified. Possible values are: uuid, instance_uuid, dns_name, inventory_path, vm_name. Default is vm_name. | Optional |
vm_username | The user to login-in to the virtual machine. | Required |
vm_password | The password used to login-in to the virtual machine. | Required |
vm_shell | The absolute path to the program to start. On Linux, shell is executed via bash. | Required |
vm_shell_args | The argument to the program. The characters which must be escaped to the shell also be escaped on the command line provided. Default is . | Optional |
vm_shell_env | Comma separated list of environment variable, specified in the guest OS notation. | Optional |
vm_shell_cwd | The current working directory of the application from which it will be run. | Optional |
wait_for_process | If set to True , module will wait for process to complete in the given virtual machine. Possible values are: Yes, No. Default is No. | Optional |
timeout | Timeout in seconds. If set to positive integers, then wait_for_process will honor this parameter and will exit after this timeout. Default is 3600. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareVmShell.results | unknown | metadata about the new process after completion with wait_for_process |
#
vmware-vm-storage-policy-infoGather information about vSphere storage profile defined storage policy information. Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_vm_storage_policy_info_module.html
#
Base Commandvmware-vm-storage-policy-info
#
InputArgument Name | Description | Required |
---|
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareVmStoragePolicyInfo.spbm_profiles | unknown | list of dictionary of SPBM info |
#
Command Example!vmware-vm-storage-policy-info
#
Context Example#
Human Readable Output#
SUCCESS
- changed: False
#
Spbm_Profiles#
Vsan Default Storage Policy#
Vm Encryption Policy#
Vvol No Requirements Policy
- description: Allow the datastore to determine the best placement strategy for storage objects
- id: f4e5bade-15a2-4805-bf8e-52318c4ce443
- name: VVol No Requirements Policy
#
Constraints_Sub_Profiles
#
vmware-vm-vm-drs-ruleConfigure VMware DRS Affinity rule for virtual machine in given cluster Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_vm_vm_drs_rule_module.html
#
Base Commandvmware-vm-vm-drs-rule
#
InputArgument Name | Description | Required |
---|---|---|
cluster_name | Desired cluster name where virtual machines are present for the DRS rule. | Required |
vms | List of virtual machines name for which DRS rule needs to be applied. Required if state is set to present . | Optional |
drs_rule_name | The name of the DRS rule to manage. | Required |
enabled | If set to True , the DRS rule will be enabled. Effective only if state is set to present . Possible values are: Yes, No. Default is No. | Optional |
mandatory | If set to True , the DRS rule will be mandatory. Effective only if state is set to present . Possible values are: Yes, No. Default is No. | Optional |
affinity_rule | If set to True , the DRS rule will be an Affinity rule. If set to False , the DRS rule will be an Anti-Affinity rule. Effective only if state is set to present . Possible values are: Yes, No. Default is Yes. | Optional |
state | If set to present , then the DRS rule is created if not present. If set to present , then the DRS rule is already present, it updates to the given configurations. If set to absent , then the DRS rule is deleted if present. Possible values are: present, absent. Default is present. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareVmVmDrsRule.result | unknown | metadata about DRS VM and VM rule |
#
vmware-vm-vss-dvs-migrateMigrates a virtual machine from a standard vswitch to distributed Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_vm_vss_dvs_migrate_module.html
#
Base Commandvmware-vm-vss-dvs-migrate
#
InputArgument Name | Description | Required |
---|---|---|
vm_name | Name of the virtual machine to migrate to a dvSwitch. | Required |
dvportgroup_name | Name of the portgroup to migrate to the virtual machine to. | Required |
#
Context OutputPath | Type | Description |
---|
#
vmware-vmkernelManages a VMware VMkernel Adapter of an ESXi host. Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_vmkernel_module.html
#
Base Commandvmware-vmkernel
#
InputArgument Name | Description | Required |
---|---|---|
vswitch_name | The name of the vSwitch where to add the VMKernel interface. Required parameter only if state is set to present . Optional parameter from version 2.5 and onwards. | Optional |
dvswitch_name | The name of the vSphere Distributed Switch (vDS) where to add the VMKernel interface. Required parameter only if state is set to present . Optional parameter from version 2.8 and onwards. | Optional |
portgroup_name | The name of the port group for the VMKernel interface. | Required |
network | A dictionary of network details. The following parameter is required: - type (string): Type of IP assignment (either dhcp or static ). The following parameters are required in case of type is set to static : - ip_address (string): Static IP address (implies type: static ). - subnet_mask (string): Static netmask required for ip_address . The following parameter is optional in case of type is set to static : - default_gateway (string): Default gateway (Override default gateway for this adapter). The following parameter is optional: - tcpip_stack (string): The TCP/IP stack for the VMKernel interface. Can be default, provisioning, vmotion, or vxlan. (default: default). Default is {'type': 'static', 'tcpip_stack': 'default'}. | Optional |
ip_address | The IP Address for the VMKernel interface. Use network parameter with ip_address instead. Deprecated option, will be removed in version 2.9. | Optional |
subnet_mask | The Subnet Mask for the VMKernel interface. Use network parameter with subnet_mask instead. Deprecated option, will be removed in version 2.9. | Optional |
mtu | The MTU for the VMKernel interface. The default value of 1500 is valid from version 2.5 and onwards. Default is 1500. | Optional |
device | Search VMkernel adapter by device name. The parameter is required only in case of type is set to dhcp . | Optional |
enable_vsan | Enable VSAN traffic on the VMKernel adapter. This option is only allowed if the default TCP/IP stack is used. | Optional |
enable_vmotion | Enable vMotion traffic on the VMKernel adapter. This option is only allowed if the default TCP/IP stack is used. You cannot enable vMotion on an additional adapter if you already have an adapter with the vMotion TCP/IP stack configured. | Optional |
enable_mgmt | Enable Management traffic on the VMKernel adapter. This option is only allowed if the default TCP/IP stack is used. | Optional |
enable_ft | Enable Fault Tolerance traffic on the VMKernel adapter. This option is only allowed if the default TCP/IP stack is used. | Optional |
enable_provisioning | Enable Provisioning traffic on the VMKernel adapter. This option is only allowed if the default TCP/IP stack is used. | Optional |
enable_replication | Enable vSphere Replication traffic on the VMKernel adapter. This option is only allowed if the default TCP/IP stack is used. | Optional |
enable_replication_nfc | Enable vSphere Replication NFC traffic on the VMKernel adapter. This option is only allowed if the default TCP/IP stack is used. | Optional |
state | If set to present , the VMKernel adapter will be created with the given specifications. If set to absent , the VMKernel adapter will be removed. If set to present and VMKernel adapter exists, the configurations will be updated. Possible values are: present, absent. Default is present. | Optional |
esxi_hostname | Name of ESXi host to which VMKernel is to be managed. From version 2.5 onwards, this parameter is required. | Required |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareVmkernel.result | unknown | metadata about VMKernel name |
#
vmware-vmkernel-infoGathers VMKernel info about an ESXi host Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_vmkernel_info_module.html
#
Base Commandvmware-vmkernel-info
#
InputArgument Name | Description | Required |
---|---|---|
cluster_name | Name of the cluster. VMKernel information about each ESXi server will be returned for the given cluster. If esxi_hostname is not given, this parameter is required. | Optional |
esxi_hostname | ESXi hostname. VMKernel information about this ESXi server will be returned. If cluster_name is not given, this parameter is required. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareVmkernelInfo.host_vmk_info | unknown | metadata about VMKernel present on given host system |
#
Command Example!vmware-vmkernel-info cluster_name="cluster"
#
Context Example#
Human Readable Output#
SUCCESS
- changed: False
#
Host_Vmk_Info
#
vmware-vmkernel-ip-configConfigure the VMkernel IP Address Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_vmkernel_ip_config_module.html
#
Base Commandvmware-vmkernel-ip-config
#
InputArgument Name | Description | Required |
---|---|---|
vmk_name | VMkernel interface name. | Required |
ip_address | IP address to assign to VMkernel interface. | Required |
subnet_mask | Subnet Mask to assign to VMkernel interface. | Required |
#
Context OutputPath | Type | Description |
---|
#
vmware-vmotionMove a virtual machine using vMotion, and/or its vmdks using storage vMotion. Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_vmotion_module.html
#
Base Commandvmware-vmotion
#
InputArgument Name | Description | Required |
---|---|---|
vm_name | Name of the VM to perform a vMotion on. This is required parameter, if vm_uuid is not set. Version 2.6 onwards, this parameter is not a required parameter, unlike the previous versions. | Optional |
vm_uuid | UUID of the virtual machine to perform a vMotion operation on. This is a required parameter, if vm_name or moid is not set. | 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 vm_name or vm_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 |
destination_host | Name of the destination host the virtual machine should be running on. Version 2.6 onwards, this parameter is not a required parameter, unlike the previous versions. | Optional |
destination_datastore | Name of the destination datastore the virtual machine's vmdk should be moved on. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareVmotion.running_host | string | List the host the virtual machine is registered to |
#
vmware-vsan-clusterConfigure VSAN clustering on an ESXi host Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_vsan_cluster_module.html
#
Base Commandvmware-vsan-cluster
#
InputArgument Name | Description | Required |
---|---|---|
cluster_uuid | Desired cluster UUID. | Optional |
#
Context OutputPath | Type | Description |
---|
#
Command Example!vmware-vsan-cluster
#
Context Example#
Human Readable Output#
CHANGED
- changed: True
- cluster_uuid: 525e42db-3df5-4184-b178-874f4ef18006
- result: None
#
vmware-vspan-sessionCreate or remove a Port Mirroring session. Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_vspan_session_module.html
#
Base Commandvmware-vspan-session
#
InputArgument Name | Description | Required |
---|---|---|
switch | The name of the distributed vSwitch on which to add or remove the mirroring session. | Required |
name | Name of the session. | Required |
state | Create or remove the session. Possible values are: present, absent. | Required |
session_type | Select the mirroring type. - encapsulatedRemoteMirrorSource (str): In encapsulatedRemoteMirrorSource session, Distributed Ports can be used as source entities, and Ip address can be used as destination entities. - remoteMirrorDest (str): In remoteMirrorDest session, vlan Ids can be used as source entities, and Distributed Ports can be used as destination entities. - remoteMirrorSource (str): In remoteMirrorSource session, Distributed Ports can be used as source entities, and uplink ports name can be used as destination entities. - dvPortMirror (str): In dvPortMirror session, Distributed Ports can be used as both source and destination entities. Possible values are: encapsulatedRemoteMirrorSource, remoteMirrorDest, remoteMirrorSource, dvPortMirror. Default is dvPortMirror. | Optional |
enabled | Whether the session is enabled. Possible values are: Yes, No. Default is Yes. | Optional |
description | The description for the session. | Optional |
source_port_transmitted | Source port for which transmitted packets are mirrored. | Optional |
source_port_received | Source port for which received packets are mirrored. | Optional |
destination_port | Destination port that received the mirrored packets. Also any port designated in the value of this property can not match the source port in any of the Distributed Port Mirroring session. | Optional |
encapsulation_vlan_id | VLAN ID used to encapsulate the mirrored traffic. | Optional |
strip_original_vlan | Whether to strip the original VLAN tag. if false, the original VLAN tag will be preserved on the mirrored traffic. If encapsulationVlanId has been set and this property is false, the frames will be double tagged with the original VLAN ID as the inner tag. | Optional |
mirrored_packet_length | An integer that describes how much of each frame to mirror. If unset, all of the frame would be mirrored. Setting this property to a smaller value is useful when the consumer will look only at the headers. The value cannot be less than 60. | Optional |
normal_traffic_allowed | Whether or not destination ports can send and receive "normal" traffic. Setting this to false will make mirror ports be used solely for mirroring and not double as normal access ports. | Optional |
sampling_rate | Sampling rate of the session. If its value is n, one of every n packets is mirrored. Valid values are between 1 to 65535, and default value is 1. | Optional |
source_vm_transmitted | With this parameter it is possible, to add a NIC of a VM to a port mirroring session. Valid attributes are: - name (str): Name of the VM - nic_label (bool): Label of the Network Interface Card to use. | Optional |
source_vm_received | With this parameter it is possible, to add a NIC of a VM to a port mirroring session. Valid attributes are: - name (str): Name of the VM - nic_label (bool): Label of the Network Interface Card to use. | Optional |
destination_vm | With this parameter it is possible, to add a NIC of a VM to a port mirroring session. Valid attributes are: - name (str): Name of the VM - nic_label (bool): Label of the Network Interface Card to use. | Optional |
#
Context OutputPath | Type | Description |
---|
#
vmware-vswitchManage a VMware Standard Switch to an ESXi host. Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_vswitch_module.html
#
Base Commandvmware-vswitch
#
InputArgument Name | Description | Required |
---|---|---|
switch | vSwitch name to add. Alias switch is added in version 2.4. | Required |
nics | A list of vmnic names or vmnic name to attach to vSwitch. Alias nics is added in version 2.4. | Optional |
number_of_ports | Number of port to configure on vSwitch. Default is 128. | Optional |
mtu | MTU to configure on vSwitch. Default is 1500. | Optional |
state | Add or remove the switch. Possible values are: absent, present. Default is present. | Optional |
esxi_hostname | Manage the vSwitch using this ESXi host system. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VmwareVswitch.result | string | information about performed operation |
#
Command Example!vmware-vswitch switch="vswitch_name" nics="vmnic1" mtu="9000" esxi_hostname="esxi01"
#
Context Example#
Human Readable Output#
SUCCESS
- changed: False
- result: No change in vSwitch 'vswitch_name'
#
vmware-vswitch-infoGathers info about an ESXi host's vswitch configurations Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vmware_vswitch_info_module.html
#
Base Commandvmware-vswitch-info
#
InputArgument Name | Description | Required |
---|---|---|
cluster_name | Name of the cluster. Info about vswitch belonging to every ESXi host systems under this cluster will be returned. 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.VmwareVswitchInfo.hosts_vswitch_info | unknown | metadata about host's vswitch configuration |
#
Command Example!vmware-vswitch-info cluster_name="cluster"
#
Context Example#
Human Readable Output#
SUCCESS
#
vmware-vsphere-fileManage files on a vCenter datastore Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vsphere_file_module.html
#
Base Commandvmware-vsphere-file
#
InputArgument Name | Description | Required |
---|---|---|
host | The vCenter server on which the datastore is available. | Required |
datacenter | The datacenter on the vCenter server that holds the datastore. | Required |
datastore | The datastore on the vCenter server to push files to. | Required |
path | The file or directory on the datastore on the vCenter server. | Required |
timeout | The timeout in seconds for the upload to the datastore. Default is 10. | Optional |
state | The state of or the action on the provided path. If absent , the file will be removed. If directory , the directory will be created. If file , more information of the (existing) file will be returned. If touch , an empty file will be created if the path does not exist. Possible values are: absent, directory, file, touch. Default is file. | Optional |
#
Context OutputPath | Type | Description |
---|
#
vmware-vcenter-extensionRegister/deregister vCenter Extensions Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vcenter_extension_module.html
#
Base Commandvmware-vcenter-extension
#
InputArgument Name | Description | Required |
---|---|---|
extension_key | The extension key of the extension to install or uninstall. | Required |
version | The version of the extension you are installing or uninstalling. | Required |
name | Required for state=present . The name of the extension you are installing. | Optional |
company | Required for state=present . The name of the company that makes the extension. | Optional |
description | Required for state=present . A short description of the extension. | Optional |
Required for state=present . Administrator email to use for extension. | Optional | |
url | Required for state=present . Link to server hosting extension zip file to install. | Optional |
ssl_thumbprint | Required for state=present . SSL thumbprint of the extension hosting server. | Optional |
server_type | Required for state=present . Type of server being used to install the extension (SOAP, REST, HTTP, etc.). Default is vsphere-client-serenity. | Optional |
client_type | Required for state=present . Type of client the extension is (win32, .net, linux, etc.). Default is vsphere-client-serenity. | Optional |
visible | Show the extension in solution manager inside vCenter. Possible values are: Yes, No. Default is Yes. | Optional |
state | Add or remove vCenter Extension. Possible values are: absent, present. Default is present. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VcenterExtension.result | string | information about performed operation |
#
vmware-vcenter-extension-infoGather info vCenter extensions Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vcenter_extension_info_module.html
#
Base Commandvmware-vcenter-extension-info
#
InputArgument Name | Description | Required |
---|
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VcenterExtensionInfo.extension_info | unknown | List of extensions |
#
Command Example!vmware-vcenter-extension-info
#
Context Example#
Human Readable Output#
SUCCESS
- changed: False
#
Extension_Info
- extension_company: VMware Inc.
- extension_key: com.vmware.vim.sms
- extension_label: VMware vCenter Storage Monitoring Service
- extension_last_heartbeat_time: 2021-07-11T15:21:08.666734+00:00
- extension_subject_name:
- extension_summary: Storage Monitoring and Reporting
- extension_type:
- extension_version: 5.5
#
vmware-vcenter-folderManage folders on given datacenter Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vcenter_folder_module.html
#
Base Commandvmware-vcenter-folder
#
InputArgument Name | Description | Required |
---|---|---|
datacenter | Name of the datacenter. | Required |
folder_name | Name of folder to be managed. This is case sensitive parameter. Folder name should be under 80 characters. This is a VMware restriction. | Required |
parent_folder | Name of the parent folder under which new folder needs to be created. This is case sensitive parameter. Please specify unique folder name as there is no way to detect duplicate names. If user wants to create a folder under '/DC0/vm/vm_folder', this value will be 'vm_folder'. | Optional |
folder_type | This is type of folder. If set to vm , then 'VM and Template Folder' is created under datacenter. If set to host , then 'Host and Cluster Folder' is created under datacenter. If set to datastore , then 'Storage Folder' is created under datacenter. If set to network , then 'Network Folder' is created under datacenter. This parameter is required, if state is set to present and parent_folder is absent. This option is ignored, if parent_folder is set. Possible values are: datastore, host, network, vm. Default is vm. | Optional |
state | State of folder. If set to present without parent folder parameter, then folder with folder_type is created. If set to present with parent folder parameter, then folder in created under parent folder. folder_type is ignored. If set to absent , then folder is unregistered and destroyed. Possible values are: present, absent. Default is present. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VcenterFolder.result | unknown | The detail about the new folder |
#
Command Example!vmware-vcenter-folder datacenter="DC1" folder_name="sample_vm_folder" folder_type="vm" state="present"
#
Context Example#
Human Readable Output#
SUCCESS
- changed: False
#
Result
- msg: Folder sample_vm_folder already exists
- path: /DC1/vm/sample_vm_folder
#
vmware-vcenter-licenseManage VMware vCenter license keys Further documentation available at https://docs.ansible.com/ansible/2.9/modules/vcenter_license_module.html
#
Base Commandvmware-vcenter-license
#
InputArgument Name | Description | Required |
---|---|---|
labels | The optional labels of the license key to manage in vSphere vCenter. This is dictionary with key/value pair. Default is {'source': 'ansible'}. | Optional |
license | The license key to manage in vSphere vCenter. | Required |
state | Whether to add (present ) or remove (absent ) the license key. Possible values are: absent, present. Default is present. | Optional |
esxi_hostname | The hostname of the ESXi server to which the specified license will be assigned. This parameter is optional. | Optional |
datacenter | The datacenter name to use for the operation. | Optional |
cluster_name | Name of the cluster to apply vSAN license. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
VMware.VcenterLicense.licenses | unknown | list of license keys after module executed |
#
TroubleshootingThe Ansible-Runner container is not suitable for running as a non-root user. Therefore, the Ansible integrations will fail if you follow the instructions in Cortex XSOAR 6.13 Docker Hardening Guide. and Cortex XSOAR 8 Cloud Docker Hardening Guide.
The docker.run.internal.asuser
server configuration causes the software that is run inside of the Docker containers utilized by Cortex XSOAR to run as a non-root user account inside the container.
The Ansible-Runner software is required to run as root as it applies its own isolation via bwrap to the Ansible execution environment.
This is a limitation of the Ansible-Runner software itself https://github.com/ansible/ansible-runner/issues/611.
A workaround is to use the docker.run.internal.asuser.ignore
server setting and to configure Cortex XSOAR to ignore the Ansible container image by setting the value of demisto/ansible-runner
and afterwards running /reset_containers to reload any containers that might be running to ensure they receive the configuration.
See step 2 of this Docker hardening guide (Cortex XSOAR 6.13). For Cortex XSOAR 8 Cloud see step 3 in Run Docker with non-root internal users of this Docker hardening guide (Cortex XSOAR 8 Cloud). For Cortex XSOAR 8.7 On-prem see step 3 in Run Docker with non-root internal users of this Docker hardening guide (Cortex XSOAR 8.7 On-prem) for complete instructions.