From 4491bf097149556fb7da4e1d1fd2d919ae395237 Mon Sep 17 00:00:00 2001 From: Mario Lenz Date: Wed, 25 Oct 2023 18:56:46 +0200 Subject: [PATCH] Implement semantic markup (4) (#1888) Implement semantic markup (4) SUMMARY Implementing semantic markup part 4. ISSUE TYPE Docs Pull Request COMPONENT NAME vmware_drs_group vmware_drs_group_info vmware_drs_group_manager vmware_drs_rule_info vmware_dvs_portgroup vmware_dvs_portgroup_find vmware_dvswitch vmware_dvswitch_info vmware_dvswitch_lacp vmware_dvswitch_nioc vmware_dvswitch_pvlans vmware_evc_mode vmware_export_ovf vmware_folder_info vmware_guest vmware_guest_boot_info vmware_guest_boot_manager vmware_guest_controller vmware_guest_cross_vc_clone vmware_guest_custom_attribute_defs ADDITIONAL INFORMATION #1771 --- ...ty.vmware.vmware_drs_group_info_module.rst | 273 -- ...vmware.vmware_drs_group_manager_module.rst | 397 --- ...mmunity.vmware.vmware_drs_group_module.rst | 364 --- ...ity.vmware.vmware_drs_rule_info_module.rst | 273 -- ...mware.vmware_dvs_portgroup_find_module.rst | 304 -- ...ity.vmware.vmware_dvs_portgroup_module.rst | 1250 -------- ...ity.vmware.vmware_dvswitch_info_module.rst | 349 -- ...ity.vmware.vmware_dvswitch_lacp_module.rst | 405 --- ...ommunity.vmware.vmware_dvswitch_module.rst | 877 ----- ...ity.vmware.vmware_dvswitch_nioc_module.rst | 449 --- ...y.vmware.vmware_dvswitch_pvlans_module.rst | 323 -- ...ommunity.vmware.vmware_evc_mode_module.rst | 313 -- ...munity.vmware.vmware_export_ovf_module.rst | 397 --- ...unity.vmware.vmware_folder_info_module.rst | 277 -- ...y.vmware.vmware_guest_boot_info_module.rst | 323 -- ...mware.vmware_guest_boot_manager_module.rst | 490 --- ....vmware.vmware_guest_controller_module.rst | 522 --- ...are.vmware_guest_cross_vc_clone_module.rst | 566 ---- ...are_guest_custom_attribute_defs_module.rst | 281 -- docs/community.vmware.vmware_guest_module.rst | 2824 ----------------- plugins/modules/vmware_drs_group.py | 14 +- plugins/modules/vmware_drs_group_info.py | 5 +- plugins/modules/vmware_drs_group_manager.py | 10 +- plugins/modules/vmware_drs_rule_info.py | 4 +- plugins/modules/vmware_dvs_portgroup.py | 39 +- plugins/modules/vmware_dvs_portgroup_find.py | 2 +- plugins/modules/vmware_dvswitch.py | 35 +- plugins/modules/vmware_dvswitch_info.py | 4 +- plugins/modules/vmware_dvswitch_lacp.py | 6 +- plugins/modules/vmware_dvswitch_nioc.py | 2 +- plugins/modules/vmware_dvswitch_pvlans.py | 8 +- plugins/modules/vmware_evc_mode.py | 2 +- plugins/modules/vmware_export_ovf.py | 6 +- plugins/modules/vmware_folder_info.py | 2 - plugins/modules/vmware_guest.py | 150 +- plugins/modules/vmware_guest_boot_info.py | 6 +- plugins/modules/vmware_guest_boot_manager.py | 14 +- plugins/modules/vmware_guest_controller.py | 18 +- .../modules/vmware_guest_cross_vc_clone.py | 14 +- .../vmware_guest_custom_attribute_defs.py | 10 +- 40 files changed, 170 insertions(+), 11438 deletions(-) delete mode 100644 docs/community.vmware.vmware_drs_group_info_module.rst delete mode 100644 docs/community.vmware.vmware_drs_group_manager_module.rst delete mode 100644 docs/community.vmware.vmware_drs_group_module.rst delete mode 100644 docs/community.vmware.vmware_drs_rule_info_module.rst delete mode 100644 docs/community.vmware.vmware_dvs_portgroup_find_module.rst delete mode 100644 docs/community.vmware.vmware_dvs_portgroup_module.rst delete mode 100644 docs/community.vmware.vmware_dvswitch_info_module.rst delete mode 100644 docs/community.vmware.vmware_dvswitch_lacp_module.rst delete mode 100644 docs/community.vmware.vmware_dvswitch_module.rst delete mode 100644 docs/community.vmware.vmware_dvswitch_nioc_module.rst delete mode 100644 docs/community.vmware.vmware_dvswitch_pvlans_module.rst delete mode 100644 docs/community.vmware.vmware_evc_mode_module.rst delete mode 100644 docs/community.vmware.vmware_export_ovf_module.rst delete mode 100644 docs/community.vmware.vmware_folder_info_module.rst delete mode 100644 docs/community.vmware.vmware_guest_boot_info_module.rst delete mode 100644 docs/community.vmware.vmware_guest_boot_manager_module.rst delete mode 100644 docs/community.vmware.vmware_guest_controller_module.rst delete mode 100644 docs/community.vmware.vmware_guest_cross_vc_clone_module.rst delete mode 100644 docs/community.vmware.vmware_guest_custom_attribute_defs_module.rst delete mode 100644 docs/community.vmware.vmware_guest_module.rst diff --git a/docs/community.vmware.vmware_drs_group_info_module.rst b/docs/community.vmware.vmware_drs_group_info_module.rst deleted file mode 100644 index 97457bc91..000000000 --- a/docs/community.vmware.vmware_drs_group_info_module.rst +++ /dev/null @@ -1,273 +0,0 @@ -.. _community.vmware.vmware_drs_group_info_module: - - -************************************** -community.vmware.vmware_drs_group_info -************************************** - -**Gathers info about DRS VM/Host groups on the given cluster** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- This module can be used to gather information about DRS VM/HOST groups from the given cluster. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- cluster_name - -
- string -
-
- -
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.
-
-
- datacenter - -
- string -
-
- -
Datacenter to search for DRS VM/Host groups.
-

aliases: datacenter_name
-
-
- hostname - -
- string -
-
- -
The hostname or IP address of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_HOST will be used instead.
-
Environment variable support added in Ansible 2.6.
-
-
- password - -
- string -
-
- -
The password of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_PASSWORD will be used instead.
-
Environment variable support added in Ansible 2.6.
-

aliases: pass, pwd
-
-
- port - -
- integer -
-
- Default:
443
-
-
The port number of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_PORT will be used instead.
-
Environment variable support added in Ansible 2.6.
-
-
- proxy_host - -
- string -
-
- -
Address of a proxy that will receive all HTTPS requests and relay them.
-
The format is a hostname or a IP.
-
If the value is not specified in the task, the value of environment variable VMWARE_PROXY_HOST will be used instead.
-
This feature depends on a version of pyvmomi greater than v6.7.1.2018.12
-
-
- proxy_port - -
- integer -
-
- -
Port of the HTTP proxy that will receive all HTTPS requests and relay them.
-
If the value is not specified in the task, the value of environment variable VMWARE_PROXY_PORT will be used instead.
-
-
- username - -
- string -
-
- -
The username of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_USER will be used instead.
-
Environment variable support added in Ansible 2.6.
-

aliases: admin, user
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Allows connection when SSL certificates are not valid. Set to false when certificates are not trusted.
-
If the value is not specified in the task, the value of environment variable VMWARE_VALIDATE_CERTS will be used instead.
-
Environment variable support added in Ansible 2.6.
-
If set to true, please make sure Python >= 2.7.9 is installed on the given machine.
-
-
- - -Notes ------ - -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - - - -Examples --------- - -.. code-block:: yaml - - --- - - name: "Gather DRS info about given Cluster" - register: cluster_drs_group_info - community.vmware.vmware_drs_group_info: - hostname: "{{ vcenter_hostname }}" - password: "{{ vcenter_password }}" - username: "{{ vcenter_username }}" - cluster_name: "{{ cluster_name }}" - delegate_to: localhost - - - name: "Gather DRS group info about all clusters in given datacenter" - register: cluster_drs_group_info - community.vmware.vmware_drs_group_info: - hostname: "{{ vcenter_hostname }}" - password: "{{ vcenter_password }}" - username: "{{ vcenter_username }}" - datacenter: "{{ datacenter }}" - delegate_to: localhost - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - -
KeyReturnedDescription
-
- drs_group_info - -
- dictionary -
-
always -
Metadata about DRS group from given cluster / datacenter
-
-
Sample:
-
{'drs_group_info': {'DC0_C0': [{'group_name': 'GROUP_HOST_S01', 'hosts': ['vm-01.zone', 'vm-02.zone'], 'type': 'host'}, {'group_name': 'GROUP_HOST_S02', 'hosts': ['vm-03.zone', 'vm-04.zone'], 'type': 'host'}, {'group_name': 'GROUP_VM_S01', 'type': 'vm', 'vms': ['test-node01']}, {'group_name': 'GROUP_VM_S02', 'type': 'vm', 'vms': ['test-node02']}], 'DC0_C1': []}}
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Karsten Kaj Jakobsen (@karstenjakobsen) diff --git a/docs/community.vmware.vmware_drs_group_manager_module.rst b/docs/community.vmware.vmware_drs_group_manager_module.rst deleted file mode 100644 index 5bfe13f38..000000000 --- a/docs/community.vmware.vmware_drs_group_manager_module.rst +++ /dev/null @@ -1,397 +0,0 @@ -.. _community.vmware.vmware_drs_group_manager_module: - - -***************************************** -community.vmware.vmware_drs_group_manager -***************************************** - -**Manage VMs and Hosts in DRS group.** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- The module can be used to add VMs / Hosts to or remove them from a DRS group. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- cluster - -
- string - / required -
-
- -
Cluster to which DRS group associated with.
-

aliases: cluster_name
-
-
- datacenter - -
- string -
-
- -
Name of the datacenter.
-

aliases: datacenter_name
-
-
- group_name - -
- string - / required -
-
- -
The name of the group to manage.
-
-
- hostname - -
- string -
-
- -
The hostname or IP address of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_HOST will be used instead.
-
Environment variable support added in Ansible 2.6.
-
-
- hosts - -
- list - / elements=string -
-
- -
A List of hosts to add / remove in the group.
-
Required only if vms is not set.
-
-
- password - -
- string -
-
- -
The password of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_PASSWORD will be used instead.
-
Environment variable support added in Ansible 2.6.
-

aliases: pass, pwd
-
-
- port - -
- integer -
-
- Default:
443
-
-
The port number of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_PORT will be used instead.
-
Environment variable support added in Ansible 2.6.
-
-
- proxy_host - -
- string -
-
- -
Address of a proxy that will receive all HTTPS requests and relay them.
-
The format is a hostname or a IP.
-
If the value is not specified in the task, the value of environment variable VMWARE_PROXY_HOST will be used instead.
-
This feature depends on a version of pyvmomi greater than v6.7.1.2018.12
-
-
- proxy_port - -
- integer -
-
- -
Port of the HTTP proxy that will receive all HTTPS requests and relay them.
-
If the value is not specified in the task, the value of environment variable VMWARE_PROXY_PORT will be used instead.
-
-
- state - -
- string -
-
-
    Choices: -
  • present ←
  • -
  • absent
  • -
-
-
If set to present, VMs/hosts will be added to the given DRS group.
-
If set to absent, VMs/hosts will be removed from the given DRS group.
-
-
- username - -
- string -
-
- -
The username of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_USER will be used instead.
-
Environment variable support added in Ansible 2.6.
-

aliases: admin, user
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Allows connection when SSL certificates are not valid. Set to false when certificates are not trusted.
-
If the value is not specified in the task, the value of environment variable VMWARE_VALIDATE_CERTS will be used instead.
-
Environment variable support added in Ansible 2.6.
-
If set to true, please make sure Python >= 2.7.9 is installed on the given machine.
-
-
- vms - -
- list - / elements=string -
-
- -
A List of vms to add / remove in the group.
-
Required only if hosts is not set.
-
-
- - -Notes ------ - -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - - - -Examples --------- - -.. code-block:: yaml - - --- - - name: Add VMs in an existing DRS VM group - delegate_to: localhost - community.vmware.vmware_drs_group_manager: - hostname: "{{ vcenter_hostname }}" - password: "{{ vcenter_password }}" - username: "{{ vcenter_username }}" - cluster: DC0_C0 - datacenter: DC0 - group_name: TEST_VM_01 - vms: - - DC0_C0_RP0_VM0 - - DC0_C0_RP0_VM1 - state: present - - - name: Add Hosts in an existing DRS Host group - delegate_to: localhost - community.vmware.vmware_drs_group_manager: - hostname: "{{ vcenter_hostname }}" - password: "{{ vcenter_password }}" - username: "{{ vcenter_username }}" - cluster: DC0_C0 - datacenter: DC0 - group_name: TEST_HOST_01 - hosts: - - DC0_C0_H0 - - DC0_C0_H1 - - DC0_C0_H2 - state: present - - - name: Remove VM from an existing DRS VM group - delegate_to: localhost - community.vmware.vmware_drs_group_manager: - hostname: "{{ vcenter_hostname }}" - password: "{{ vcenter_password }}" - username: "{{ vcenter_username }}" - cluster: DC0_C0 - datacenter: DC0 - group_name: TEST_VM_01 - vms: - - DC0_C0_RP0_VM0 - state: absent - - - name: Remove host from an existing DRS Host group - delegate_to: localhost - community.vmware.vmware_drs_group_manager: - hostname: "{{ vcenter_hostname }}" - password: "{{ vcenter_password }}" - username: "{{ vcenter_username }}" - cluster: DC0_C0 - datacenter: DC0 - group_name: TEST_HOST_01 - hosts: - - DC0_C0_H0 - state: absent - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- drs_group_member_info - -
- dictionary -
-
always -
Metadata about DRS group
-
-
Sample:
-
{'Asia-Cluster1': [{'group_name': 'vm_group_002', 'type': 'vm', 'vms': ['dev-1']}]}
-
-
- msg - -
- string -
-
always -
Info message
-
-
Sample:
-
Updated host group TEST_HOST_01 successfully
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Abhijeet Kasurde (@Akasurde) diff --git a/docs/community.vmware.vmware_drs_group_module.rst b/docs/community.vmware.vmware_drs_group_module.rst deleted file mode 100644 index 9e347fa94..000000000 --- a/docs/community.vmware.vmware_drs_group_module.rst +++ /dev/null @@ -1,364 +0,0 @@ -.. _community.vmware.vmware_drs_group_module: - - -********************************* -community.vmware.vmware_drs_group -********************************* - -**Creates vm/host group in a given cluster.** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- This module can be used to create VM/Host groups in a given cluster. Creates a vm group if ``vms`` is set. Creates a host group if ``hosts`` is set. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- cluster_name - -
- string - / required -
-
- -
Cluster to create vm/host group.
-
-
- datacenter - -
- string -
-
- -
Datacenter to search for given cluster. If not set, we use first cluster we encounter with cluster_name.
-

aliases: datacenter_name
-
-
- group_name - -
- string - / required -
-
- -
The name of the group to create or remove.
-
-
- hostname - -
- string -
-
- -
The hostname or IP address of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_HOST will be used instead.
-
Environment variable support added in Ansible 2.6.
-
-
- hosts - -
- list - / elements=string -
-
- -
List of hosts to create in group.
-
Required only if vms is not set.
-
-
- password - -
- string -
-
- -
The password of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_PASSWORD will be used instead.
-
Environment variable support added in Ansible 2.6.
-

aliases: pass, pwd
-
-
- port - -
- integer -
-
- Default:
443
-
-
The port number of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_PORT will be used instead.
-
Environment variable support added in Ansible 2.6.
-
-
- proxy_host - -
- string -
-
- -
Address of a proxy that will receive all HTTPS requests and relay them.
-
The format is a hostname or a IP.
-
If the value is not specified in the task, the value of environment variable VMWARE_PROXY_HOST will be used instead.
-
This feature depends on a version of pyvmomi greater than v6.7.1.2018.12
-
-
- proxy_port - -
- integer -
-
- -
Port of the HTTP proxy that will receive all HTTPS requests and relay them.
-
If the value is not specified in the task, the value of environment variable VMWARE_PROXY_PORT will be used instead.
-
-
- state - -
- string -
-
-
    Choices: -
  • present ←
  • -
  • absent
  • -
-
-
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.
-
-
- username - -
- string -
-
- -
The username of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_USER will be used instead.
-
Environment variable support added in Ansible 2.6.
-

aliases: admin, user
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Allows connection when SSL certificates are not valid. Set to false when certificates are not trusted.
-
If the value is not specified in the task, the value of environment variable VMWARE_VALIDATE_CERTS will be used instead.
-
Environment variable support added in Ansible 2.6.
-
If set to true, please make sure Python >= 2.7.9 is installed on the given machine.
-
-
- vms - -
- list - / elements=string -
-
- -
List of vms to create in group.
-
Required only if hosts is not set.
-
-
- - -Notes ------ - -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - - - -Examples --------- - -.. code-block:: yaml - - --- - - name: "Create DRS VM group" - delegate_to: localhost - community.vmware.vmware_drs_group: - hostname: "{{ vcenter_hostname }}" - password: "{{ vcenter_password }}" - username: "{{ vcenter_username }}" - cluster_name: DC0_C0 - datacenter_name: DC0 - group_name: TEST_VM_01 - vms: - - DC0_C0_RP0_VM0 - - DC0_C0_RP0_VM1 - state: present - - - name: "Create DRS Host group" - delegate_to: localhost - community.vmware.vmware_drs_group: - hostname: "{{ vcenter_hostname }}" - password: "{{ vcenter_password }}" - username: "{{ vcenter_username }}" - cluster_name: DC0_C0 - datacenter_name: DC0 - group_name: TEST_HOST_01 - hosts: - - DC0_C0_H0 - - DC0_C0_H1 - - DC0_C0_H2 - state: present - - - name: "Delete DRS Host group" - delegate_to: localhost - community.vmware.vmware_drs_group: - hostname: "{{ vcenter_hostname }}" - password: "{{ vcenter_password }}" - username: "{{ vcenter_username }}" - cluster_name: DC0_C0 - datacenter_name: DC0 - group_name: TEST_HOST_01 - state: absent - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - -
KeyReturnedDescription
-
- drs_group_facts - -
- dictionary -
-
always -
Metadata about DRS group created
-
-
Sample:
-
{'drs_group_facts': {'changed': True, 'failed': False, 'msg': 'Created host group TEST_HOST_01 successfully', 'result': {'DC0_C0': [{'group_name': 'TEST_HOST_01', 'hosts': ['DC0_C0_H0', 'DC0_C0_H1', 'DC0_C0_H2'], 'type': 'host'}]}}}
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Karsten Kaj Jakobsen (@karstenjakobsen) diff --git a/docs/community.vmware.vmware_drs_rule_info_module.rst b/docs/community.vmware.vmware_drs_rule_info_module.rst deleted file mode 100644 index 6faacf84b..000000000 --- a/docs/community.vmware.vmware_drs_rule_info_module.rst +++ /dev/null @@ -1,273 +0,0 @@ -.. _community.vmware.vmware_drs_rule_info_module: - - -************************************* -community.vmware.vmware_drs_rule_info -************************************* - -**Gathers info about DRS rule on the given cluster** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- This module can be used to gather information about DRS VM-VM and VM-HOST rules from the given cluster. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- cluster_name - -
- string -
-
- -
Name of the cluster.
-
DRS information for the given cluster will be returned.
-
This is required parameter if datacenter parameter is not provided.
-
-
- datacenter - -
- string -
-
- -
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.
-
-
- hostname - -
- string -
-
- -
The hostname or IP address of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_HOST will be used instead.
-
Environment variable support added in Ansible 2.6.
-
-
- password - -
- string -
-
- -
The password of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_PASSWORD will be used instead.
-
Environment variable support added in Ansible 2.6.
-

aliases: pass, pwd
-
-
- port - -
- integer -
-
- Default:
443
-
-
The port number of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_PORT will be used instead.
-
Environment variable support added in Ansible 2.6.
-
-
- proxy_host - -
- string -
-
- -
Address of a proxy that will receive all HTTPS requests and relay them.
-
The format is a hostname or a IP.
-
If the value is not specified in the task, the value of environment variable VMWARE_PROXY_HOST will be used instead.
-
This feature depends on a version of pyvmomi greater than v6.7.1.2018.12
-
-
- proxy_port - -
- integer -
-
- -
Port of the HTTP proxy that will receive all HTTPS requests and relay them.
-
If the value is not specified in the task, the value of environment variable VMWARE_PROXY_PORT will be used instead.
-
-
- username - -
- string -
-
- -
The username of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_USER will be used instead.
-
Environment variable support added in Ansible 2.6.
-

aliases: admin, user
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Allows connection when SSL certificates are not valid. Set to false when certificates are not trusted.
-
If the value is not specified in the task, the value of environment variable VMWARE_VALIDATE_CERTS will be used instead.
-
Environment variable support added in Ansible 2.6.
-
If set to true, please make sure Python >= 2.7.9 is installed on the given machine.
-
-
- - -Notes ------ - -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - - - -Examples --------- - -.. code-block:: yaml - - - name: Gather DRS info about given Cluster - community.vmware.vmware_drs_rule_info: - hostname: '{{ vcenter_hostname }}' - username: '{{ vcenter_username }}' - password: '{{ vcenter_password }}' - cluster_name: '{{ cluster_name }}' - delegate_to: localhost - register: cluster_drs_info - - - name: Gather DRS info about all Clusters in given datacenter - community.vmware.vmware_drs_rule_info: - hostname: '{{ vcenter_hostname }}' - username: '{{ vcenter_username }}' - password: '{{ vcenter_password }}' - datacenter: '{{ datacenter_name }}' - delegate_to: localhost - register: datacenter_drs_info - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - -
KeyReturnedDescription
-
- drs_rule_info - -
- dictionary -
-
always -
metadata about DRS rule from given cluster / datacenter
-
-
Sample:
-
{'DC0_C0': [{'rule_affinity': False, 'rule_enabled': True, 'rule_key': 1, 'rule_mandatory': True, 'rule_name': 'drs_rule_0001', 'rule_type': 'vm_vm_rule', 'rule_uuid': '52be5061-665a-68dc-3d25-85cd2d37e114', 'rule_vms': ['VM_65', 'VM_146']}], 'DC1_C1': [{'rule_affine_host_group_name': 'host_group_1', 'rule_affine_hosts': ['10.76.33.204'], 'rule_anti_affine_host_group_name': None, 'rule_anti_affine_hosts': [], 'rule_enabled': True, 'rule_key': 1, 'rule_mandatory': False, 'rule_name': 'vm_host_rule_0001', 'rule_type': 'vm_host_rule', 'rule_uuid': '52687108-4d3a-76f2-d29c-b708c40dbe40', 'rule_vm_group_name': 'test_vm_group_1', 'rule_vms': ['VM_8916', 'VM_4010']}]}
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Abhijeet Kasurde (@Akasurde) diff --git a/docs/community.vmware.vmware_dvs_portgroup_find_module.rst b/docs/community.vmware.vmware_dvs_portgroup_find_module.rst deleted file mode 100644 index 00d20063c..000000000 --- a/docs/community.vmware.vmware_dvs_portgroup_find_module.rst +++ /dev/null @@ -1,304 +0,0 @@ -.. _community.vmware.vmware_dvs_portgroup_find_module: - - -****************************************** -community.vmware.vmware_dvs_portgroup_find -****************************************** - -**Find portgroup(s) in a VMware environment** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Find portgroup(s) based on different criteria such as distributed vSwitch, VLAN id or a string in the name. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- dvswitch - -
- string -
-
- -
Name of a distributed vSwitch to look for.
-
-
- hostname - -
- string -
-
- -
The hostname or IP address of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_HOST will be used instead.
-
Environment variable support added in Ansible 2.6.
-
-
- name - -
- string -
-
- -
string to check inside the name of the portgroup.
-
Basic containment check using python in operation.
-
-
- password - -
- string -
-
- -
The password of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_PASSWORD will be used instead.
-
Environment variable support added in Ansible 2.6.
-

aliases: pass, pwd
-
-
- port - -
- integer -
-
- Default:
443
-
-
The port number of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_PORT will be used instead.
-
Environment variable support added in Ansible 2.6.
-
-
- proxy_host - -
- string -
-
- -
Address of a proxy that will receive all HTTPS requests and relay them.
-
The format is a hostname or a IP.
-
If the value is not specified in the task, the value of environment variable VMWARE_PROXY_HOST will be used instead.
-
This feature depends on a version of pyvmomi greater than v6.7.1.2018.12
-
-
- proxy_port - -
- integer -
-
- -
Port of the HTTP proxy that will receive all HTTPS requests and relay them.
-
If the value is not specified in the task, the value of environment variable VMWARE_PROXY_PORT will be used instead.
-
-
- show_uplink - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Show or hide uplink portgroups.
-
Only relevant when vlanid is supplied.
-
-
- username - -
- string -
-
- -
The username of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_USER will be used instead.
-
Environment variable support added in Ansible 2.6.
-

aliases: admin, user
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Allows connection when SSL certificates are not valid. Set to false when certificates are not trusted.
-
If the value is not specified in the task, the value of environment variable VMWARE_VALIDATE_CERTS will be used instead.
-
Environment variable support added in Ansible 2.6.
-
If set to true, please make sure Python >= 2.7.9 is installed on the given machine.
-
-
- vlanid - -
- integer -
-
- -
VLAN id can be any number between 1 and 4094.
-
This search criteria will looks into VLAN ranges to find possible matches.
-
-
- - -Notes ------ - -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - - - -Examples --------- - -.. code-block:: yaml - - - name: Get all portgroups in dvswitch vDS - community.vmware.vmware_dvs_portgroup_find: - hostname: "{{ vcenter_hostname }}" - username: "{{ vcenter_username }}" - password: "{{ vcenter_password }}" - dvswitch: 'vDS' - delegate_to: localhost - - - name: Confirm if vlan 15 is present - community.vmware.vmware_dvs_portgroup_find: - hostname: "{{ vcenter_hostname }}" - username: "{{ vcenter_username }}" - password: "{{ vcenter_password }}" - vlanid: '15' - delegate_to: localhost - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - -
KeyReturnedDescription
-
- dvs_portgroups - -
- list -
-
on success -
basic details of portgroups found
-
-
Sample:
-
[{'dvswitch': 'vDS', 'name': 'N-51', 'pvlan': True, 'trunk': True, 'vlan_id': '0'}]
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- David Martinez (@dx0xm) diff --git a/docs/community.vmware.vmware_dvs_portgroup_module.rst b/docs/community.vmware.vmware_dvs_portgroup_module.rst deleted file mode 100644 index bf3f8649c..000000000 --- a/docs/community.vmware.vmware_dvs_portgroup_module.rst +++ /dev/null @@ -1,1250 +0,0 @@ -.. _community.vmware.vmware_dvs_portgroup_module: - - -************************************* -community.vmware.vmware_dvs_portgroup -************************************* - -**Create or remove a Distributed vSwitch portgroup.** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Create or remove a Distributed vSwitch portgroup. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- hostname - -
- string -
-
- -
The hostname or IP address of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_HOST will be used instead.
-
Environment variable support added in Ansible 2.6.
-
-
- in_traffic_shaping - -
- dictionary -
-
added in 2.3.0
-
- -
Dictionary which configures the ingress traffic shaping settings for the portgroup.
-
-
- average_bandwidth - -
- integer -
-
- -
Establishes the number of bits per second to allow across a port, averaged over time, that is, the allowed average load.
-
Ignored if inherited is true.
-
-
- burst_size - -
- integer -
-
- -
The maximum number of bits per second to allow across a port when it is sending/sending or receiving a burst of traffic.
-
Ignored if inherited is true.
-
-
- enabled - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Indicates whether ingress traffic shaping is activated or not.
-
Ignored if inherited is true.
-
-
- inherited - -
- boolean - / required -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Inherit the settings from the switch or not.
-
-
- peak_bandwidth - -
- integer -
-
- -
The maximum number of bytes to allow in a burst.
-
Ignored if inherited is true.
-
-
- mac_learning - -
- dictionary -
-
- -
Dictionary which configures MAC learning for portgroup.
-
-
- allow_unicast_flooding - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
The flag to allow flooding of unlearned MAC for ingress traffic.
-
-
- enabled - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
The flag to indicate if source MAC address learning is allowed.
-
-
- limit - -
- integer -
-
- -
The maximum number of MAC addresses that can be learned.
-
-
- limit_policy - -
- string -
-
-
    Choices: -
  • allow
  • -
  • drop
  • -
-
-
The default switching policy after MAC limit is exceeded.
-
-
- net_flow - -
- string -
-
added in 2.3.0
-
-
    Choices: -
  • true
  • -
  • on
  • -
  • yes
  • -
  • false
  • -
  • off
  • -
  • no
  • -
  • inherited
  • -
-
-
Indicate whether or not the virtual machine IP traffic that flows through a vds gets analyzed by sending reports to a NetFlow collector.
-
-
- network_policy - -
- dictionary -
-
- -
Dictionary which configures the different security values for portgroup.
-
-
- forged_transmits - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Indicates whether forged transmits are allowed. Ignored if inherited is true.
-
-
- inherited - -
- boolean - / required -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Inherit the settings from the switch or not.
-
-
- mac_changes - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Indicates whether mac changes are allowed. Ignored if inherited is true.
-
-
- promiscuous - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Indicates whether promiscuous mode is allowed. Ignored if inherited is true.
-
-
- num_ports - -
- integer -
-
- -
The number of ports the portgroup should contain.
-
-
- out_traffic_shaping - -
- dictionary -
-
added in 2.3.0
-
- -
Dictionary which configures the egress traffic shaping settings for the portgroup.
-
-
- average_bandwidth - -
- integer -
-
- -
Establishes the number of bits per second to allow across a port, averaged over time, that is, the allowed average load.
-
Ignored if inherited is true.
-
-
- burst_size - -
- integer -
-
- -
The maximum number of bits per second to allow across a port when it is sending/sending or receiving a burst of traffic.
-
Ignored if inherited is true.
-
-
- enabled - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Indicates whether egress traffic shaping is activated or not.
-
Ignored if inherited is true.
-
-
- inherited - -
- boolean - / required -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Inherit the settings from the switch or not.
-
-
- peak_bandwidth - -
- integer -
-
- -
The maximum number of bytes to allow in a burst.
-
Ignored if inherited is true.
-
-
- password - -
- string -
-
- -
The password of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_PASSWORD will be used instead.
-
Environment variable support added in Ansible 2.6.
-

aliases: pass, pwd
-
-
- port - -
- integer -
-
- Default:
443
-
-
The port number of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_PORT will be used instead.
-
Environment variable support added in Ansible 2.6.
-
-
- port_allocation - -
- string -
-
-
    Choices: -
  • elastic
  • -
  • fixed
  • -
-
-
Elastic port groups automatically increase or decrease the number of ports as needed.
-
Only valid if port_binding is set to static.
-
Will be elastic if not specified and port_binding is set to static.
-
Will be fixed if not specified and port_binding is set to ephemeral.
-
-
- port_binding - -
- string - / required -
-
-
    Choices: -
  • static
  • -
  • ephemeral
  • -
-
-
The type of port binding determines when ports in a port group are assigned to virtual machines.
-
See VMware KB 1022312 https://kb.vmware.com/s/article/1022312 for more details.
-
-
- port_policy - -
- dictionary -
-
- Default:
{"block_override": true, "ipfix_override": false, "live_port_move": false, "mac_management_override": false, "network_rp_override": false, "port_config_reset_at_disconnect": true, "shaping_override": false, "traffic_filter_override": false, "uplink_teaming_override": false, "vendor_config_override": false, "vlan_override": false}
-
-
Dictionary which configures the advanced policy settings for the portgroup.
-
-
- block_override - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Indicates if the block policy can be changed per port.
-
-
- ipfix_override - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Indicates if the ipfix policy can be changed per port.
-
-
- live_port_move - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Indicates if a live port can be moved in or out of the portgroup.
-
-
- mac_management_override - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Indicates if the security policy can be changed per port.
-

aliases: security_override
-
-
- network_rp_override - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Indicates if the network resource pool can be changed per port.
-
-
- port_config_reset_at_disconnect - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Indicates if the configuration of a port is reset automatically after disconnect.
-
-
- shaping_override - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Indicates if the shaping policy can be changed per port.
-
-
- traffic_filter_override - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Indicates if the traffic filter can be changed per port.
-
-
- uplink_teaming_override - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Indicates if the uplink teaming policy can be changed per port.
-
-
- vendor_config_override - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Indicates if the vendor config can be changed per port.
-
-
- vlan_override - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Indicates if the vlan can be changed per port.
-
-
- portgroup_name - -
- string - / required -
-
- -
The name of the portgroup that is to be created or deleted.
-
-
- proxy_host - -
- string -
-
- -
Address of a proxy that will receive all HTTPS requests and relay them.
-
The format is a hostname or a IP.
-
If the value is not specified in the task, the value of environment variable VMWARE_PROXY_HOST will be used instead.
-
This feature depends on a version of pyvmomi greater than v6.7.1.2018.12
-
-
- proxy_port - -
- integer -
-
- -
Port of the HTTP proxy that will receive all HTTPS requests and relay them.
-
If the value is not specified in the task, the value of environment variable VMWARE_PROXY_PORT will be used instead.
-
-
- state - -
- string - / required -
-
-
    Choices: -
  • present
  • -
  • absent
  • -
-
-
Determines if the portgroup should be present or not.
-
-
- switch_name - -
- string - / required -
-
- -
The name of the distributed vSwitch the port group should be created on.
-
-
- teaming_policy - -
- dictionary -
-
- Default:
{"load_balance_policy": "loadbalance_srcid", "notify_switches": true, "rolling_order": false}
-
-
Dictionary which configures the different teaming values for portgroup.
-
-
- active_uplinks - -
- list - / elements=string -
-
- -
List of active uplinks used for load balancing.
-
-
- inbound_policy - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Indicate whether or not the teaming policy is applied to inbound frames as well.
-
-
- load_balance_policy - -
- string -
-
-
    Choices: -
  • loadbalance_ip
  • -
  • loadbalance_srcmac
  • -
  • loadbalance_srcid ←
  • -
  • loadbalance_loadbased
  • -
  • failover_explicit
  • -
-
-
Network adapter teaming policy.
-
loadbalance_loadbased is available from version 2.6 and onwards.
-
-
- notify_switches - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Indicate whether or not to notify the physical switch if a link fails.
-
-
- rolling_order - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Indicate whether or not to use a rolling policy when restoring links.
-
-
- standby_uplinks - -
- list - / elements=string -
-
- -
List of standby uplinks used for failover.
-
-
- username - -
- string -
-
- -
The username of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_USER will be used instead.
-
Environment variable support added in Ansible 2.6.
-

aliases: admin, user
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Allows connection when SSL certificates are not valid. Set to false when certificates are not trusted.
-
If the value is not specified in the task, the value of environment variable VMWARE_VALIDATE_CERTS will be used instead.
-
Environment variable support added in Ansible 2.6.
-
If set to true, please make sure Python >= 2.7.9 is installed on the given machine.
-
-
- vlan_id - -
- string - / required -
-
- -
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.
-
If vlan_private is configured to be true, the corresponding private VLAN should already be configured in the distributed vSwitch.
-
-
- vlan_private - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Indicates whether this is for a private VLAN or not.
-
Mutually exclusive with vlan_trunk parameter.
-
-
- vlan_trunk - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Indicates whether this is a VLAN trunk or not.
-
Mutually exclusive with vlan_private parameter.
-
-
- - -Notes ------ - -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - - - -Examples --------- - -.. code-block:: yaml - - - name: Create vlan portgroup - community.vmware.vmware_dvs_portgroup: - hostname: '{{ vcenter_hostname }}' - username: '{{ vcenter_username }}' - password: '{{ vcenter_password }}' - portgroup_name: vlan-123-portrgoup - switch_name: dvSwitch - vlan_id: 123 - num_ports: 120 - port_binding: static - state: present - delegate_to: localhost - - - name: Create vlan trunk portgroup - community.vmware.vmware_dvs_portgroup: - hostname: '{{ vcenter_hostname }}' - username: '{{ vcenter_username }}' - password: '{{ vcenter_password }}' - portgroup_name: vlan-trunk-portrgoup - switch_name: dvSwitch - vlan_id: 1-1000, 1005, 1100-1200 - vlan_trunk: true - num_ports: 120 - port_binding: static - state: present - delegate_to: localhost - - - name: Create private vlan portgroup - vmware_dvs_portgroup: - hostname: '{{ vcenter_hostname }}' - username: '{{ vcenter_username }}' - password: '{{ vcenter_password }}' - portgroup_name: private-vlan-portrgoup - switch_name: dvSwitch - vlan_id: 1001 - vlan_private: true - num_ports: 120 - port_binding: static - state: present - delegate_to: localhost - - - name: Create no-vlan portgroup - community.vmware.vmware_dvs_portgroup: - hostname: '{{ vcenter_hostname }}' - username: '{{ vcenter_username }}' - password: '{{ vcenter_password }}' - portgroup_name: no-vlan-portrgoup - switch_name: dvSwitch - vlan_id: 0 - num_ports: 120 - port_binding: static - state: present - delegate_to: localhost - - - name: Create vlan portgroup with all security and port policies - community.vmware.vmware_dvs_portgroup: - hostname: '{{ vcenter_hostname }}' - username: '{{ vcenter_username }}' - password: '{{ vcenter_password }}' - portgroup_name: vlan-123-portrgoup - switch_name: dvSwitch - vlan_id: 123 - num_ports: 120 - port_binding: static - state: present - network_policy: - inherited: false - promiscuous: true - forged_transmits: true - mac_changes: true - port_policy: - block_override: true - ipfix_override: true - live_port_move: true - network_rp_override: true - port_config_reset_at_disconnect: true - mac_management_override: true - shaping_override: true - traffic_filter_override: true - uplink_teaming_override: true - vendor_config_override: true - vlan_override: true - delegate_to: localhost - - - - -Status ------- - - -Authors -~~~~~~~ - -- Joseph Callen (@jcpowermac) -- Philippe Dellaert (@pdellaert) diff --git a/docs/community.vmware.vmware_dvswitch_info_module.rst b/docs/community.vmware.vmware_dvswitch_info_module.rst deleted file mode 100644 index 5508d115c..000000000 --- a/docs/community.vmware.vmware_dvswitch_info_module.rst +++ /dev/null @@ -1,349 +0,0 @@ -.. _community.vmware.vmware_dvswitch_info_module: - - -************************************* -community.vmware.vmware_dvswitch_info -************************************* - -**Gathers info dvswitch configurations** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- This module can be used to gather information about dvswitch configurations. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- folder - -
- string -
-
- -
Specify a folder location of dvswitch to gather information from.
-
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
-
-
- hostname - -
- string -
-
- -
The hostname or IP address of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_HOST will be used instead.
-
Environment variable support added in Ansible 2.6.
-
-
- password - -
- string -
-
- -
The password of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_PASSWORD will be used instead.
-
Environment variable support added in Ansible 2.6.
-

aliases: pass, pwd
-
-
- port - -
- integer -
-
- Default:
443
-
-
The port number of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_PORT will be used instead.
-
Environment variable support added in Ansible 2.6.
-
-
- properties - -
- list - / elements=string -
-
- -
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: [
-
"summary.name",
-
"summary.numPorts",
-
"config.maxMtu",
-
"overallStatus"
-
]
-
Only valid when schema is vsphere.
-
-
- proxy_host - -
- string -
-
- -
Address of a proxy that will receive all HTTPS requests and relay them.
-
The format is a hostname or a IP.
-
If the value is not specified in the task, the value of environment variable VMWARE_PROXY_HOST will be used instead.
-
This feature depends on a version of pyvmomi greater than v6.7.1.2018.12
-
-
- proxy_port - -
- integer -
-
- -
Port of the HTTP proxy that will receive all HTTPS requests and relay them.
-
If the value is not specified in the task, the value of environment variable VMWARE_PROXY_PORT will be used instead.
-
-
- schema - -
- string -
-
-
    Choices: -
  • summary ←
  • -
  • vsphere
  • -
-
-
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
-
-
- switch_name - -
- string -
-
- -
Name of a dvswitch to look for.
-
If switch_name not specified gather all dvswitch information.
-

aliases: switch, dvswitch
-
-
- username - -
- string -
-
- -
The username of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_USER will be used instead.
-
Environment variable support added in Ansible 2.6.
-

aliases: admin, user
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Allows connection when SSL certificates are not valid. Set to false when certificates are not trusted.
-
If the value is not specified in the task, the value of environment variable VMWARE_VALIDATE_CERTS will be used instead.
-
Environment variable support added in Ansible 2.6.
-
If set to true, please make sure Python >= 2.7.9 is installed on the given machine.
-
-
- - -Notes ------ - -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - - - -Examples --------- - -.. code-block:: yaml - - - name: Gather all registered dvswitch - community.vmware.vmware_dvswitch_info: - hostname: "{{ vcenter_hostname }}" - username: "{{ vcenter_username }}" - password: "{{ vcenter_password }}" - delegate_to: localhost - register: dvswitch_info - - - name: Gather info about specific dvswitch - community.vmware.vmware_dvswitch_info: - hostname: "{{ vcenter_hostname }}" - username: "{{ vcenter_username }}" - password: "{{ vcenter_password }}" - switch_name: DVSwitch01 - delegate_to: localhost - register: dvswitch_info - - - name: Gather info from folder about specific dvswitch - community.vmware.vmware_dvswitch_info: - hostname: "{{ vcenter_hostname }}" - username: "{{ vcenter_username }}" - password: "{{ vcenter_password }}" - folder: /datacenter1/network/F01 - switch_name: DVSwitch02 - delegate_to: localhost - register: dvswitch_info - - - name: Gather some info from a dvswitch using the vSphere API output schema - community.vmware.vmware_dvswitch_info: - hostname: "{{ vcenter_hostname }}" - username: "{{ vcenter_username }}" - password: "{{ vcenter_password }}" - schema: vsphere - properties: - - summary.name - - summary.numPorts - - config.maxMtu - - overallStatus - switch_name: DVSwitch01 - register: dvswitch_info - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - -
KeyReturnedDescription
-
- distributed_virtual_switches - -
- list -
-
always -
list of dictionary of dvswitch and their information
-
-
Sample:
-
[{'configure': {'folder': 'network', 'hosts': ['esxi-test-02.local', 'esxi-test-01.local'], 'settings': {'healthCheck': {'TeamingHealthCheckConfig': False, 'VlanMtuHealthCheckConfig': False}, 'netflow': {'activeFlowTimeout': 60, 'collectorIpAddress': '', 'collectorPort': 0, 'idleFlowTimeout': 15, 'internalFlowsOnly': False, 'observationDomainId': 0, 'samplingRate': 0, 'switchIpAddress': None}, 'properties': {'administratorContact': {'contact': None, 'name': None}, 'advanced': {'maxMtu': 1500, 'multicastFilteringMode': 'legacyFiltering'}, 'discoveryProtocol': {'operation': 'listen', 'protocol': 'cdp'}, 'general': {'ioControl': True, 'name': 'DVSwitch01', 'numPorts': 10, 'numUplinks': 1, 'vendor': 'VMware, Inc.', 'version': '6.6.0'}}, 'privateVlan': []}}, 'uuid': '50 30 99 9c a7 60 8a 4f-05 9f e7 b5 da df 8f 17'}]
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- sky-joker (@sky-joker) diff --git a/docs/community.vmware.vmware_dvswitch_lacp_module.rst b/docs/community.vmware.vmware_dvswitch_lacp_module.rst deleted file mode 100644 index 16b0353c2..000000000 --- a/docs/community.vmware.vmware_dvswitch_lacp_module.rst +++ /dev/null @@ -1,405 +0,0 @@ -.. _community.vmware.vmware_dvswitch_lacp_module: - - -************************************* -community.vmware.vmware_dvswitch_lacp -************************************* - -**Manage LACP configuration on a Distributed Switch** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- This module can be used to configure Link Aggregation Control Protocol (LACP) support mode and Link Aggregation Groups (LAGs). - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- hostname - -
- string -
-
- -
The hostname or IP address of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_HOST will be used instead.
-
Environment variable support added in Ansible 2.6.
-
-
- link_aggregation_groups - -
- list - / elements=dictionary -
-
- Default:
[]
-
-
Can only be used if lacp_support is set to enhanced.
-
-
- load_balancing_mode - -
- string -
-
- Default:
"srcDestIpTcpUdpPortVlan"
-
-
Load balancing algorithm.
-
Valid values are as follows
-
- 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.
-
Please see examples for more information.
-
-
- mode - -
- string -
-
-
    Choices: -
  • active
  • -
  • passive
  • -
-
-
The negotiating state of the uplinks/ports.
-
-
- name - -
- string -
-
- -
Name of the LAG.
-
-
- uplink_number - -
- integer -
-
- -
Number of uplinks.
-
Can 1 to 30.
-
-
- password - -
- string -
-
- -
The password of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_PASSWORD will be used instead.
-
Environment variable support added in Ansible 2.6.
-

aliases: pass, pwd
-
-
- port - -
- integer -
-
- Default:
443
-
-
The port number of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_PORT will be used instead.
-
Environment variable support added in Ansible 2.6.
-
-
- proxy_host - -
- string -
-
- -
Address of a proxy that will receive all HTTPS requests and relay them.
-
The format is a hostname or a IP.
-
If the value is not specified in the task, the value of environment variable VMWARE_PROXY_HOST will be used instead.
-
This feature depends on a version of pyvmomi greater than v6.7.1.2018.12
-
-
- proxy_port - -
- integer -
-
- -
Port of the HTTP proxy that will receive all HTTPS requests and relay them.
-
If the value is not specified in the task, the value of environment variable VMWARE_PROXY_PORT will be used instead.
-
-
- support_mode - -
- string -
-
-
    Choices: -
  • basic ←
  • -
  • enhanced
  • -
-
-
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).
-
-
- switch - -
- string - / required -
-
- -
The name of the Distributed Switch to manage.
-

aliases: dvswitch
-
-
- username - -
- string -
-
- -
The username of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_USER will be used instead.
-
Environment variable support added in Ansible 2.6.
-

aliases: admin, user
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Allows connection when SSL certificates are not valid. Set to false when certificates are not trusted.
-
If the value is not specified in the task, the value of environment variable VMWARE_VALIDATE_CERTS will be used instead.
-
Environment variable support added in Ansible 2.6.
-
If set to true, please make sure Python >= 2.7.9 is installed on the given machine.
-
-
- - -Notes ------ - -.. note:: - - You need to run the task two times if you want to remove all LAGs and change the support mode to 'basic' - - All modules requires API write access and hence is not supported on a free ESXi license. - - - -Examples --------- - -.. code-block:: yaml - - - name: Enable enhanced mode on a Distributed Switch - community.vmware.vmware_dvswitch_lacp: - hostname: '{{ inventory_hostname }}' - username: '{{ vcenter_username }}' - password: '{{ vcenter_password }}' - switch: dvSwitch - support_mode: enhanced - validate_certs: "{{ validate_vcenter_certs }}" - delegate_to: localhost - loop_control: - label: "{{ item.name }}" - with_items: "{{ vcenter_distributed_switches }}" - - - name: Enable enhanced mode and create two LAGs on a Distributed Switch - community.vmware.vmware_dvswitch_lacp: - hostname: '{{ inventory_hostname }}' - username: '{{ vcenter_username }}' - password: '{{ vcenter_password }}' - switch: dvSwitch - support_mode: enhanced - link_aggregation_groups: - - name: lag1 - uplink_number: 2 - mode: active - load_balancing_mode: srcDestIpTcpUdpPortVlan - - name: lag2 - uplink_number: 2 - mode: passive - load_balancing_mode: srcDestIp - validate_certs: "{{ validate_vcenter_certs }}" - delegate_to: localhost - loop_control: - label: "{{ item.name }}" - with_items: "{{ vcenter_distributed_switches }}" - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - -
KeyReturnedDescription
-
- result - -
- string -
-
always -
information about performed operation
-
-
Sample:
-
{'changed': True, 'dvswitch': 'dvSwitch', 'link_aggregation_groups': [{'load_balancing_mode': 'srcDestIpTcpUdpPortVlan', 'mode': 'active', 'name': 'lag1', 'uplink_number': 2}, {'load_balancing_mode': 'srcDestIp', 'mode': 'active', 'name': 'lag2', 'uplink_number': 2}], 'link_aggregation_groups_previous': [], 'support_mode': 'enhanced', 'result': 'lacp lags changed'}
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Christian Kotte (@ckotte) diff --git a/docs/community.vmware.vmware_dvswitch_module.rst b/docs/community.vmware.vmware_dvswitch_module.rst deleted file mode 100644 index 9c00d39c7..000000000 --- a/docs/community.vmware.vmware_dvswitch_module.rst +++ /dev/null @@ -1,877 +0,0 @@ -.. _community.vmware.vmware_dvswitch_module: - - -******************************** -community.vmware.vmware_dvswitch -******************************** - -**Create or remove a Distributed Switch** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- This module can be used to create, remove a Distributed Switch. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- contact - -
- dictionary -
-
- -
Dictionary which configures administrator contact name and description for the Distributed Switch.
-
-
- description - -
- string -
-
- -
Description or other details.
-
-
- name - -
- string -
-
- -
Administrator name.
-
-
- datacenter_name - -
- string -
-
- -
The name of the datacenter that will contain the Distributed Switch.
-
This parameter is optional, if folder is provided.
-
Mutually exclusive with folder parameter.
-

aliases: datacenter
-
-
- description - -
- string -
-
- -
Description of the Distributed Switch.
-
-
- discovery_operation - -
- string -
-
-
    Choices: -
  • both
  • -
  • advertise
  • -
  • listen ←
  • -
-
-
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.
-
-
- discovery_proto - -
- string -
-
-
    Choices: -
  • cdp ←
  • -
  • lldp
  • -
  • disabled
  • -
-
-
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.
-

aliases: discovery_protocol
-
-
- folder - -
- string -
-
- -
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
-
-
- health_check - -
- dictionary -
-
- Default:
{"teaming_failover": false, "teaming_failover_interval": 0, "vlan_mtu": false, "vlan_mtu_interval": 0}
-
-
Dictionary which configures Health Check for the Distributed Switch.
-
-
- teaming_failover - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Teaming and failover health check.
-
-
- teaming_failover_interval - -
- integer -
-
- Default:
0
-
-
Teaming and failover health check interval (minutes).
-
The default value is 1 in the vSphere Client if the Teaming and failover health check is enabled.
-
-
- vlan_mtu - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
VLAN and MTU health check.
-
-
- vlan_mtu_interval - -
- integer -
-
- Default:
0
-
-
VLAN and MTU health check interval (minutes).
-
The default value is 1 in the vSphere Client if the VLAN and MTU health check is enabled.
-
-
- hostname - -
- string -
-
- -
The hostname or IP address of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_HOST will be used instead.
-
Environment variable support added in Ansible 2.6.
-
-
- mtu - -
- integer -
-
- Default:
1500
-
-
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).
-
-
- multicast_filtering_mode - -
- string -
-
-
    Choices: -
  • basic ←
  • -
  • snooping
  • -
-
-
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.
-
-
- net_flow - -
- dictionary -
-
added in 2.7.0
-
- Default:
{"active_flow_timeout": 60, "collector_port": 0, "idle_flow_timeout": 15, "internal_flows_only": false, "observation_domain_id": 0, "sampling_rate": 4096}
-
-
Dictionary which configures the Net Flow for the Distributed Switch.
-
-
- active_flow_timeout - -
- integer -
-
- Default:
60
-
-
The time, in seconds, to wait before sending information after the flow is initiated.
-
-
- collector_ip - -
- string -
-
- -
The IP Address (IPv4 or IPv6) of the NetFlow collector.
-
-
- collector_port - -
- integer -
-
- Default:
0
-
-
The Port of the NetFlow collector.
-
-
- idle_flow_timeout - -
- integer -
-
- Default:
15
-
-
The time, in seconds, to wait before sending information after the flow is initiated.
-
-
- internal_flows_only - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
If True, data on network activity between vms on the same host will be collected only.
-
-
- observation_domain_id - -
- integer -
-
- Default:
0
-
-
Identifies the information related to the switch.
-
-
- sampling_rate - -
- integer -
-
- Default:
4096
-
-
The portion of data that the switch collects.
-
The sampling rate represents the number of packets that NetFlow drops after every collected packet.
-
If the rate is 0, NetFlow samples every packet, that is, collect one packet and drop none.
-
If the rate is 1, NetFlow samples a packet and drops the next one, and so on.
-
-
- network_policy - -
- dictionary -
-
- -
Dictionary which configures the different default security values for portgroups.
-
If set, these options are inherited by the portgroups of the DVS.
-
-
- forged_transmits - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Indicates whether forged transmits are allowed.
-
-
- mac_changes - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Indicates whether mac changes are allowed.
-
-
- promiscuous - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Indicates whether promiscuous mode is allowed.
-
-
- password - -
- string -
-
- -
The password of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_PASSWORD will be used instead.
-
Environment variable support added in Ansible 2.6.
-

aliases: pass, pwd
-
-
- port - -
- integer -
-
- Default:
443
-
-
The port number of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_PORT will be used instead.
-
Environment variable support added in Ansible 2.6.
-
-
- proxy_host - -
- string -
-
- -
Address of a proxy that will receive all HTTPS requests and relay them.
-
The format is a hostname or a IP.
-
If the value is not specified in the task, the value of environment variable VMWARE_PROXY_HOST will be used instead.
-
This feature depends on a version of pyvmomi greater than v6.7.1.2018.12
-
-
- proxy_port - -
- integer -
-
- -
Port of the HTTP proxy that will receive all HTTPS requests and relay them.
-
If the value is not specified in the task, the value of environment variable VMWARE_PROXY_PORT will be used instead.
-
-
- state - -
- string -
-
-
    Choices: -
  • present ←
  • -
  • absent
  • -
-
-
If set to present and the Distributed Switch does not exist, the Distributed Switch will be created.
-
If set to absent and the Distributed Switch exists, the Distributed Switch will be deleted.
-
-
- switch_name - -
- string - / required -
-
- -
The name of the distribute vSwitch to create or remove.
-

aliases: switch, dvswitch
-
-
- switch_version - -
- string -
-
- -
The version of the Distributed Switch to create.
-
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.
-

aliases: version
-
-
- uplink_prefix - -
- string -
-
- Default:
"Uplink "
-
-
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.
-
-
- uplink_quantity - -
- integer -
-
- -
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.
-
-
- username - -
- string -
-
- -
The username of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_USER will be used instead.
-
Environment variable support added in Ansible 2.6.
-

aliases: admin, user
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Allows connection when SSL certificates are not valid. Set to false when certificates are not trusted.
-
If the value is not specified in the task, the value of environment variable VMWARE_VALIDATE_CERTS will be used instead.
-
Environment variable support added in Ansible 2.6.
-
If set to true, please make sure Python >= 2.7.9 is installed on the given machine.
-
-
- - -Notes ------ - -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - - - -Examples --------- - -.. code-block:: yaml - - - name: Create dvSwitch - community.vmware.vmware_dvswitch: - hostname: '{{ vcenter_hostname }}' - username: '{{ vcenter_username }}' - password: '{{ vcenter_password }}' - datacenter: '{{ datacenter }}' - switch: dvSwitch - version: 6.0.0 - mtu: 9000 - uplink_quantity: 2 - discovery_protocol: lldp - discovery_operation: both - state: present - delegate_to: localhost - - - name: Create dvSwitch with all options - community.vmware.vmware_dvswitch: - hostname: '{{ vcenter_hostname }}' - username: '{{ vcenter_username }}' - password: '{{ vcenter_password }}' - datacenter: '{{ datacenter }}' - switch: dvSwitch - version: 6.5.0 - mtu: 9000 - uplink_quantity: 2 - uplink_prefix: 'Uplink_' - discovery_protocol: cdp - discovery_operation: both - multicast_filtering_mode: snooping - health_check: - vlan_mtu: true - vlan_mtu_interval: 1 - teaming_failover: true - teaming_failover_interval: 1 - net_flow: - collector_ip: 192.168.10.50 - collector_port: 50034 - observation_domain_id: 0 - active_flow_timeout: 60 - idle_flow_timeout: 15 - sampling_rate: 4096 - internal_flows_only: false - state: present - delegate_to: localhost - - - name: Delete dvSwitch - community.vmware.vmware_dvswitch: - hostname: '{{ vcenter_hostname }}' - username: '{{ vcenter_username }}' - password: '{{ vcenter_password }}' - datacenter: '{{ datacenter }}' - switch: dvSwitch - state: absent - delegate_to: localhost - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - -
KeyReturnedDescription
-
- result - -
- string -
-
always -
information about performed operation
-
-
Sample:
-
{'changed': False, 'contact': None, 'contact_details': None, 'description': None, 'discovery_operation': 'both', 'discovery_protocol': 'cdp', 'dvswitch': 'test', 'health_check_teaming': False, 'health_check_teaming_interval': 0, 'health_check_vlan': False, 'health_check_vlan_interval': 0, 'net_flow_collector_ip': '192.168.10.50', 'net_flow_collector_port': 50034, 'net_flow_observation_domain_id': 0, 'net_flow_active_flow_timeout': 60, 'net_flow_idle_flow_timeout': 15, 'net_flow_sampling_rate': 4096, 'net_flow_internal_flows_only': False, 'mtu': 9000, 'multicast_filtering_mode': 'basic', 'result': 'DVS already configured properly', 'uplink_quantity': 2, 'uplinks': ['Uplink_1', 'Uplink_2'], 'version': '6.6.0'}
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Joseph Callen (@jcpowermac) -- Abhijeet Kasurde (@Akasurde) -- Christian Kotte (@ckotte) diff --git a/docs/community.vmware.vmware_dvswitch_nioc_module.rst b/docs/community.vmware.vmware_dvswitch_nioc_module.rst deleted file mode 100644 index afef793a6..000000000 --- a/docs/community.vmware.vmware_dvswitch_nioc_module.rst +++ /dev/null @@ -1,449 +0,0 @@ -.. _community.vmware.vmware_dvswitch_nioc_module: - - -************************************* -community.vmware.vmware_dvswitch_nioc -************************************* - -**Manage distributed switch Network IO Control** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- This module can be used to manage distributed switch Network IO Control configurations. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- hostname - -
- string -
-
- -
The hostname or IP address of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_HOST will be used instead.
-
Environment variable support added in Ansible 2.6.
-
-
- password - -
- string -
-
- -
The password of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_PASSWORD will be used instead.
-
Environment variable support added in Ansible 2.6.
-

aliases: pass, pwd
-
-
- port - -
- integer -
-
- Default:
443
-
-
The port number of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_PORT will be used instead.
-
Environment variable support added in Ansible 2.6.
-
-
- proxy_host - -
- string -
-
- -
Address of a proxy that will receive all HTTPS requests and relay them.
-
The format is a hostname or a IP.
-
If the value is not specified in the task, the value of environment variable VMWARE_PROXY_HOST will be used instead.
-
This feature depends on a version of pyvmomi greater than v6.7.1.2018.12
-
-
- proxy_port - -
- integer -
-
- -
Port of the HTTP proxy that will receive all HTTPS requests and relay them.
-
If the value is not specified in the task, the value of environment variable VMWARE_PROXY_PORT will be used instead.
-
-
- resources - -
- list - / elements=dictionary -
-
- Default:
[]
-
-
List of dicts containing.
-
-
- limit - -
- integer -
-
- Default:
-1
-
-
The maximum allowed usage for a traffic class belonging to this resource pool per host physical NIC.
-
-
- name - -
- string - / required -
-
-
    Choices: -
  • faultTolerance
  • -
  • hbr
  • -
  • iSCSI
  • -
  • management
  • -
  • nfs
  • -
  • vdp
  • -
  • virtualMachine
  • -
  • vmotion
  • -
  • vsan
  • -
  • backupNfc
  • -
  • nvmetcp
  • -
-
-
Resource name.
-
-
- reservation - -
- integer -
-
- Default:
0
-
-
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.
-
Ignored unless version is "version3".
-
Amount of bandwidth resource that is guaranteed available to the host infrastructure traffic class.
-
-
- shares - -
- integer -
-
- -
The number of shares allocated.
-
Ignored unless shares_level is "custom".
-
-
- shares_level - -
- string -
-
-
    Choices: -
  • low
  • -
  • normal
  • -
  • high
  • -
  • custom
  • -
-
-
The allocation level
-
The level is a simplified view of shares.
-
Levels map to a pre-determined set of numeric values for shares.
-
-
- state - -
- string -
-
-
    Choices: -
  • present ←
  • -
  • absent
  • -
-
-
Enable or disable NIOC on the distributed switch.
-
-
- switch - -
- string - / required -
-
- -
The name of the distributed switch.
-

aliases: dvswitch
-
-
- username - -
- string -
-
- -
The username of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_USER will be used instead.
-
Environment variable support added in Ansible 2.6.
-

aliases: admin, user
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Allows connection when SSL certificates are not valid. Set to false when certificates are not trusted.
-
If the value is not specified in the task, the value of environment variable VMWARE_VALIDATE_CERTS will be used instead.
-
Environment variable support added in Ansible 2.6.
-
If set to true, please make sure Python >= 2.7.9 is installed on the given machine.
-
-
- version - -
- string -
-
-
    Choices: -
  • version2
  • -
  • version3
  • -
-
-
Network IO control version.
-
-
- - -Notes ------ - -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - - - -Examples --------- - -.. code-block:: yaml - - - name: Enable NIOC - community.vmware.vmware_dvswitch_nioc: - hostname: '{{ vcenter_hostname }}' - username: '{{ vcenter_username }}' - password: '{{ vcenter_password }}' - 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 - delegate_to: localhost - - - name: Disable NIOC - community.vmware.vmware_dvswitch_nioc: - hostname: '{{ vcenter_hostname }}' - username: '{{ vcenter_username }}' - password: '{{ vcenter_password }}' - switch: dvSwitch - state: absent - delegate_to: localhost - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- dvswitch_nioc_status - -
- string -
-
success -
result of the changes
-
-
-
- resources_changed - -
- list -
-
success -
list of resources which were changed
-
-
Sample:
-
['vmotion', 'vsan']
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Joseph Andreatta (@vmwjoseph) diff --git a/docs/community.vmware.vmware_dvswitch_pvlans_module.rst b/docs/community.vmware.vmware_dvswitch_pvlans_module.rst deleted file mode 100644 index b85e818ae..000000000 --- a/docs/community.vmware.vmware_dvswitch_pvlans_module.rst +++ /dev/null @@ -1,323 +0,0 @@ -.. _community.vmware.vmware_dvswitch_pvlans_module: - - -*************************************** -community.vmware.vmware_dvswitch_pvlans -*************************************** - -**Manage Private VLAN configuration of a Distributed Switch** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- This module can be used to configure Private VLANs (PVLANs) on a Distributed Switch. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- hostname - -
- string -
-
- -
The hostname or IP address of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_HOST will be used instead.
-
Environment variable support added in Ansible 2.6.
-
-
- password - -
- string -
-
- -
The password of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_PASSWORD will be used instead.
-
Environment variable support added in Ansible 2.6.
-

aliases: pass, pwd
-
-
- port - -
- integer -
-
- Default:
443
-
-
The port number of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_PORT will be used instead.
-
Environment variable support added in Ansible 2.6.
-
-
- primary_pvlans - -
- list - / elements=dictionary -
-
- Default:
[]
-
-
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.
-
-
- proxy_host - -
- string -
-
- -
Address of a proxy that will receive all HTTPS requests and relay them.
-
The format is a hostname or a IP.
-
If the value is not specified in the task, the value of environment variable VMWARE_PROXY_HOST will be used instead.
-
This feature depends on a version of pyvmomi greater than v6.7.1.2018.12
-
-
- proxy_port - -
- integer -
-
- -
Port of the HTTP proxy that will receive all HTTPS requests and relay them.
-
If the value is not specified in the task, the value of environment variable VMWARE_PROXY_PORT will be used instead.
-
-
- secondary_pvlans - -
- list - / elements=dictionary -
-
- Default:
[]
-
-
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.
-
-
- switch - -
- string - / required -
-
- -
The name of the Distributed Switch.
-

aliases: dvswitch
-
-
- username - -
- string -
-
- -
The username of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_USER will be used instead.
-
Environment variable support added in Ansible 2.6.
-

aliases: admin, user
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Allows connection when SSL certificates are not valid. Set to false when certificates are not trusted.
-
If the value is not specified in the task, the value of environment variable VMWARE_VALIDATE_CERTS will be used instead.
-
Environment variable support added in Ansible 2.6.
-
If set to true, please make sure Python >= 2.7.9 is installed on the given machine.
-
-
- - -Notes ------ - -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - - - -Examples --------- - -.. code-block:: yaml - - - name: Create PVLANs on a Distributed Switch - community.vmware.vmware_dvswitch_pvlans: - hostname: '{{ inventory_hostname }}' - username: '{{ vcenter_username }}' - password: '{{ vcenter_password }}' - switch: dvSwitch - primary_pvlans: - - primary_pvlan_id: 1 - - primary_pvlan_id: 4 - secondary_pvlans: - - primary_pvlan_id: 1 - secondary_pvlan_id: 2 - pvlan_type: isolated - - primary_pvlan_id: 1 - secondary_pvlan_id: 3 - pvlan_type: community - - primary_pvlan_id: 4 - secondary_pvlan_id: 5 - pvlan_type: community - delegate_to: localhost - - - name: Create primary PVLAN and secondary promiscuous PVLAN on a Distributed Switch - community.vmware.vmware_dvswitch_pvlans: - hostname: '{{ inventory_hostname }}' - username: '{{ vcenter_username }}' - password: '{{ vcenter_password }}' - switch: dvSwitch - primary_pvlans: - - primary_pvlan_id: 1 - delegate_to: localhost - - - name: Remove all PVLANs from a Distributed Switch - community.vmware.vmware_dvswitch_pvlans: - hostname: '{{ inventory_hostname }}' - username: '{{ vcenter_username }}' - password: '{{ vcenter_password }}' - switch: dvSwitch - primary_pvlans: [] - secondary_pvlans: [] - delegate_to: localhost - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - -
KeyReturnedDescription
-
- result - -
- string -
-
always -
information about performed operation
-
-
Sample:
-
{'changed': True, 'dvswitch': 'dvSwitch', 'private_vlans': [{'primary_pvlan_id': 1, 'pvlan_type': 'promiscuous', 'secondary_pvlan_id': 1}, {'primary_pvlan_id': 1, 'pvlan_type': 'isolated', 'secondary_pvlan_id': 2}, {'primary_pvlan_id': 1, 'pvlan_type': 'community', 'secondary_pvlan_id': 3}], 'private_vlans_previous': [], 'result': 'All private VLANs added'}
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Christian Kotte (@ckotte) diff --git a/docs/community.vmware.vmware_evc_mode_module.rst b/docs/community.vmware.vmware_evc_mode_module.rst deleted file mode 100644 index c36ac105c..000000000 --- a/docs/community.vmware.vmware_evc_mode_module.rst +++ /dev/null @@ -1,313 +0,0 @@ -.. _community.vmware.vmware_evc_mode_module: - - -******************************** -community.vmware.vmware_evc_mode -******************************** - -**Enable/Disable EVC mode on vCenter** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- This module can be used to enable/disable EVC mode on vCenter. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- cluster_name - -
- string - / required -
-
- -
The name of the cluster to enable or disable EVC mode on.
-

aliases: cluster
-
-
- datacenter_name - -
- string - / required -
-
- -
The name of the datacenter the cluster belongs to that you want to enable or disable EVC mode on.
-

aliases: datacenter
-
-
- evc_mode - -
- string -
-
- -
Required for state=present.
-
The EVC mode to enable or disable on the cluster. (intel-broadwell, intel-nehalem, intel-merom, etc.).
-
-
- hostname - -
- string -
-
- -
The hostname or IP address of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_HOST will be used instead.
-
Environment variable support added in Ansible 2.6.
-
-
- password - -
- string -
-
- -
The password of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_PASSWORD will be used instead.
-
Environment variable support added in Ansible 2.6.
-

aliases: pass, pwd
-
-
- port - -
- integer -
-
- Default:
443
-
-
The port number of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_PORT will be used instead.
-
Environment variable support added in Ansible 2.6.
-
-
- proxy_host - -
- string -
-
- -
Address of a proxy that will receive all HTTPS requests and relay them.
-
The format is a hostname or a IP.
-
If the value is not specified in the task, the value of environment variable VMWARE_PROXY_HOST will be used instead.
-
This feature depends on a version of pyvmomi greater than v6.7.1.2018.12
-
-
- proxy_port - -
- integer -
-
- -
Port of the HTTP proxy that will receive all HTTPS requests and relay them.
-
If the value is not specified in the task, the value of environment variable VMWARE_PROXY_PORT will be used instead.
-
-
- state - -
- string -
-
-
    Choices: -
  • absent
  • -
  • present ←
  • -
-
-
Add or remove EVC mode.
-
-
- username - -
- string -
-
- -
The username of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_USER will be used instead.
-
Environment variable support added in Ansible 2.6.
-

aliases: admin, user
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Allows connection when SSL certificates are not valid. Set to false when certificates are not trusted.
-
If the value is not specified in the task, the value of environment variable VMWARE_VALIDATE_CERTS will be used instead.
-
Environment variable support added in Ansible 2.6.
-
If set to true, please make sure Python >= 2.7.9 is installed on the given machine.
-
-
- - -Notes ------ - -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - - - -Examples --------- - -.. code-block:: yaml - - - name: Enable EVC Mode - community.vmware.vmware_evc_mode: - hostname: "{{ groups['vcsa'][0] }}" - username: "{{ vcenter_username }}" - password: "{{ site_password }}" - datacenter_name: "{{ datacenter_name }}" - cluster_name: "{{ cluster_name }}" - evc_mode: "intel-broadwell" - state: present - delegate_to: localhost - register: enable_evc - - - name: Disable EVC Mode - community.vmware.vmware_evc_mode: - hostname: "{{ groups['vcsa'][0] }}" - username: "{{ vcenter_username }}" - password: "{{ site_password }}" - datacenter_name: "{{ datacenter_name }}" - cluster_name: "{{ cluster_name }}" - state: absent - delegate_to: localhost - register: disable_evc - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - -
KeyReturnedDescription
-
- result - -
- string -
-
always -
information about performed operation
-
-
Sample:
-
EVC Mode for 'intel-broadwell' has been enabled.
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Michael Tipton (@castawayegr) diff --git a/docs/community.vmware.vmware_export_ovf_module.rst b/docs/community.vmware.vmware_export_ovf_module.rst deleted file mode 100644 index 988b545f2..000000000 --- a/docs/community.vmware.vmware_export_ovf_module.rst +++ /dev/null @@ -1,397 +0,0 @@ -.. _community.vmware.vmware_export_ovf_module: - - -********************************** -community.vmware.vmware_export_ovf -********************************** - -**Exports a VMware virtual machine to an OVF file, device files and a manifest file** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- This module can be used to export a VMware virtual machine to OVF template from vCenter server or ESXi host. - - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- datacenter - -
- string -
-
- Default:
"ha-datacenter"
-
-
Datacenter name of the virtual machine to export.
-
This parameter is case sensitive.
-
-
- download_timeout - -
- integer -
-
- Default:
30
-
-
The user defined timeout in second of exporting file.
-
If the vmdk file is too large, you can increase the value.
-
-
- export_dir - -
- path - / required -
-
- -
Absolute path to place the exported files on the server running this task, must have write permission.
-
If folder not exist will create it, also create a folder under this path named with VM name.
-
-
- export_with_extraconfig - -
- boolean -
-
added in 2.0.0
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
All extra configuration options are exported for a virtual machine.
-
-
- export_with_images - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Export an ISO image of the media mounted on the CD/DVD Drive within the virtual machine.
-
-
- folder - -
- string -
-
- -
Destination folder, absolute path to find the specified guest.
-
The folder should include the datacenter. ESX datacenter is ha-datacenter.
-
This parameter is case sensitive.
-
If multiple machines are found with same name, this parameter is used to identify
-
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
-
-
- hostname - -
- string -
-
- -
The hostname or IP address of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_HOST will be used instead.
-
Environment variable support added in Ansible 2.6.
-
-
- moid - -
- string -
-
- -
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.
-
-
- name - -
- string -
-
- -
Name of the virtual machine to export.
-
This is a required parameter, if parameter uuid or moid is not supplied.
-
-
- password - -
- string -
-
- -
The password of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_PASSWORD will be used instead.
-
Environment variable support added in Ansible 2.6.
-

aliases: pass, pwd
-
-
- port - -
- integer -
-
- Default:
443
-
-
The port number of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_PORT will be used instead.
-
Environment variable support added in Ansible 2.6.
-
-
- proxy_host - -
- string -
-
- -
Address of a proxy that will receive all HTTPS requests and relay them.
-
The format is a hostname or a IP.
-
If the value is not specified in the task, the value of environment variable VMWARE_PROXY_HOST will be used instead.
-
This feature depends on a version of pyvmomi greater than v6.7.1.2018.12
-
-
- proxy_port - -
- integer -
-
- -
Port of the HTTP proxy that will receive all HTTPS requests and relay them.
-
If the value is not specified in the task, the value of environment variable VMWARE_PROXY_PORT will be used instead.
-
-
- username - -
- string -
-
- -
The username of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_USER will be used instead.
-
Environment variable support added in Ansible 2.6.
-

aliases: admin, user
-
-
- uuid - -
- string -
-
- -
Uuid of the virtual machine to export.
-
This is a required parameter, if parameter name or moid is not supplied.
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Allows connection when SSL certificates are not valid. Set to false when certificates are not trusted.
-
If the value is not specified in the task, the value of environment variable VMWARE_VALIDATE_CERTS will be used instead.
-
Environment variable support added in Ansible 2.6.
-
If set to true, please make sure Python >= 2.7.9 is installed on the given machine.
-
-
- - -Notes ------ - -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - - - -Examples --------- - -.. code-block:: yaml - - - community.vmware.vmware_export_ovf: - hostname: '{{ vcenter_hostname }}' - username: '{{ vcenter_username }}' - password: '{{ vcenter_password }}' - name: '{{ vm_name }}' - export_with_images: true - export_dir: /path/to/ovf_template/ - delegate_to: localhost - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - -
KeyReturnedDescription
-
- instance - -
- dictionary -
-
always -
list of the exported files, if exported from vCenter server, device file is not named with vm name
-
-
Sample:
-
None
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Diane Wang (@Tomorrow9) diff --git a/docs/community.vmware.vmware_folder_info_module.rst b/docs/community.vmware.vmware_folder_info_module.rst deleted file mode 100644 index a647ddc5e..000000000 --- a/docs/community.vmware.vmware_folder_info_module.rst +++ /dev/null @@ -1,277 +0,0 @@ -.. _community.vmware.vmware_folder_info_module: - - -*********************************** -community.vmware.vmware_folder_info -*********************************** - -**Provides information about folders in a datacenter** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- The module can be used to gather a hierarchical view of the folders that exist within a datacenter - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- datacenter - -
- string - / required -
-
- -
Name of the datacenter.
-

aliases: datacenter_name
-
-
- hostname - -
- string -
-
- -
The hostname or IP address of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_HOST will be used instead.
-
Environment variable support added in Ansible 2.6.
-
-
- password - -
- string -
-
- -
The password of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_PASSWORD will be used instead.
-
Environment variable support added in Ansible 2.6.
-

aliases: pass, pwd
-
-
- port - -
- integer -
-
- Default:
443
-
-
The port number of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_PORT will be used instead.
-
Environment variable support added in Ansible 2.6.
-
-
- proxy_host - -
- string -
-
- -
Address of a proxy that will receive all HTTPS requests and relay them.
-
The format is a hostname or a IP.
-
If the value is not specified in the task, the value of environment variable VMWARE_PROXY_HOST will be used instead.
-
This feature depends on a version of pyvmomi greater than v6.7.1.2018.12
-
-
- proxy_port - -
- integer -
-
- -
Port of the HTTP proxy that will receive all HTTPS requests and relay them.
-
If the value is not specified in the task, the value of environment variable VMWARE_PROXY_PORT will be used instead.
-
-
- username - -
- string -
-
- -
The username of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_USER will be used instead.
-
Environment variable support added in Ansible 2.6.
-

aliases: admin, user
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Allows connection when SSL certificates are not valid. Set to false when certificates are not trusted.
-
If the value is not specified in the task, the value of environment variable VMWARE_VALIDATE_CERTS will be used instead.
-
Environment variable support added in Ansible 2.6.
-
If set to true, please make sure Python >= 2.7.9 is installed on the given machine.
-
-
- - -Notes ------ - -.. note:: - - ``flat_folder_info`` added in VMware collection 1.4.0. - - All modules requires API write access and hence is not supported on a free ESXi license. - - - -Examples --------- - -.. code-block:: yaml - - - name: Provide information about vCenter folders - community.vmware.vmware_folder_info: - hostname: '{{ vcenter_hostname }}' - username: '{{ vcenter_username }}' - password: '{{ vcenter_password }}' - datacenter: datacenter_name - delegate_to: localhost - register: vcenter_folder_info - - - name: Get information about folders - community.vmware.vmware_folder_info: - hostname: '{{ vcenter_hostname }}' - username: '{{ vcenter_username }}' - password: '{{ vcenter_password }}' - datacenter: 'Asia-Datacenter1' - register: r - - - name: Set Managed object ID for the given folder - ansible.builtin.set_fact: - folder_mo_id: "{{ (r.flat_folder_info | selectattr('path', 'equalto', '/Asia-Datacenter1/vm/tier1/tier2') | map(attribute='moid'))[0] }}" - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- flat_folder_info - -
- list -
-
success -
list of dict about folders in flat structure
-
-
Sample:
-
[{'moid': 'group-v3', 'path': '/Asia-Datacenter1/vm'}, {'moid': 'group-v44', 'path': '/Asia-Datacenter1/vm/tier1'}, {'moid': 'group-v45', 'path': '/Asia-Datacenter1/vm/tier1/tier2'}]
-
-
- folder_info - -
- dictionary -
-
success -
dict about folders
-
-
Sample:
-
{'datastoreFolders': {'moid': 'group-v10', 'path': '/DC01/datastore', 'subfolders': {'Local Datastores': {'path': '/DC01/datastore/Local Datastores', 'subfolders': {}}}}, 'hostFolders': {'moid': 'group-v21', 'path': '/DC01/host', 'subfolders': {}}, 'networkFolders': {'moid': 'group-v31', 'path': '/DC01/network', 'subfolders': {}}, 'vmFolders': {'moid': 'group-v41', 'path': '/DC01/vm', 'subfolders': {'Core Infrastructure Servers': {'moid': 'group-v42', 'path': '/DC01/vm/Core Infrastructure Servers', 'subfolders': {'Staging Network Services': {'moid': 'group-v43', 'path': '/DC01/vm/Core Infrastructure Servers/Staging Network Services', 'subfolders': {}}, 'VMware': {'moid': 'group-v44', 'path': '/DC01/vm/Core Infrastructure Servers/VMware', 'subfolders': {}}}}}}}
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- David Hewitt (@davidmhewitt) diff --git a/docs/community.vmware.vmware_guest_boot_info_module.rst b/docs/community.vmware.vmware_guest_boot_info_module.rst deleted file mode 100644 index 989517008..000000000 --- a/docs/community.vmware.vmware_guest_boot_info_module.rst +++ /dev/null @@ -1,323 +0,0 @@ -.. _community.vmware.vmware_guest_boot_info_module: - - -*************************************** -community.vmware.vmware_guest_boot_info -*************************************** - -**Gather info about boot options for the given virtual machine** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Gather information about boot options for the given virtual machine. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- hostname - -
- string -
-
- -
The hostname or IP address of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_HOST will be used instead.
-
Environment variable support added in Ansible 2.6.
-
-
- moid - -
- string -
-
- -
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.
-
-
- name - -
- string -
-
- -
Name of the VM to work with.
-
This is required if uuid or moid parameter is not supplied.
-
-
- name_match - -
- string -
-
-
    Choices: -
  • first ←
  • -
  • last
  • -
-
-
If multiple virtual machines matching the name, use the first or last found.
-
-
- password - -
- string -
-
- -
The password of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_PASSWORD will be used instead.
-
Environment variable support added in Ansible 2.6.
-

aliases: pass, pwd
-
-
- port - -
- integer -
-
- Default:
443
-
-
The port number of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_PORT will be used instead.
-
Environment variable support added in Ansible 2.6.
-
-
- proxy_host - -
- string -
-
- -
Address of a proxy that will receive all HTTPS requests and relay them.
-
The format is a hostname or a IP.
-
If the value is not specified in the task, the value of environment variable VMWARE_PROXY_HOST will be used instead.
-
This feature depends on a version of pyvmomi greater than v6.7.1.2018.12
-
-
- proxy_port - -
- integer -
-
- -
Port of the HTTP proxy that will receive all HTTPS requests and relay them.
-
If the value is not specified in the task, the value of environment variable VMWARE_PROXY_PORT will be used instead.
-
-
- use_instance_uuid - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Whether to use the VMware instance UUID rather than the BIOS UUID.
-
-
- username - -
- string -
-
- -
The username of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_USER will be used instead.
-
Environment variable support added in Ansible 2.6.
-

aliases: admin, user
-
-
- uuid - -
- string -
-
- -
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.
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Allows connection when SSL certificates are not valid. Set to false when certificates are not trusted.
-
If the value is not specified in the task, the value of environment variable VMWARE_VALIDATE_CERTS will be used instead.
-
Environment variable support added in Ansible 2.6.
-
If set to true, please make sure Python >= 2.7.9 is installed on the given machine.
-
-
- - -Notes ------ - -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - - - -Examples --------- - -.. code-block:: yaml - - - name: Gather info about virtual machine's boot order and related parameters - community.vmware.vmware_guest_boot_info: - hostname: "{{ vcenter_hostname }}" - username: "{{ vcenter_username }}" - password: "{{ vcenter_password }}" - name: "{{ vm_name }}" - register: vm_boot_order_info - - - name: Gather information about virtual machine's boot order using MoID - community.vmware.vmware_guest_boot_info: - hostname: "{{ vcenter_hostname }}" - username: "{{ vcenter_username }}" - password: "{{ vcenter_password }}" - moid: "vm-42" - register: vm_moid_boot_order_info - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - -
KeyReturnedDescription
-
- vm_boot_info - -
- dictionary -
-
always -
metadata about boot order of virtual machine
-
-
Sample:
-
{'current_boot_order': ['floppy', 'disk', 'ethernet', 'cdrom'], 'current_boot_delay': 2000, 'current_boot_retry_delay': 22300, 'current_boot_retry_enabled': True, 'current_enter_bios_setup': True, 'current_boot_firmware': 'bios', 'current_secure_boot_enabled': False}
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Abhijeet Kasurde (@Akasurde) diff --git a/docs/community.vmware.vmware_guest_boot_manager_module.rst b/docs/community.vmware.vmware_guest_boot_manager_module.rst deleted file mode 100644 index bd2f644a9..000000000 --- a/docs/community.vmware.vmware_guest_boot_manager_module.rst +++ /dev/null @@ -1,490 +0,0 @@ -.. _community.vmware.vmware_guest_boot_manager_module: - - -****************************************** -community.vmware.vmware_guest_boot_manager -****************************************** - -**Manage boot options for the given virtual machine** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- This module can be used to manage boot options for the given virtual machine. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- boot_delay - -
- integer -
-
- -
Delay in milliseconds before starting the boot sequence.
-
-
- boot_firmware - -
- string -
-
-
    Choices: -
  • bios
  • -
  • efi
  • -
-
-
Choose which firmware should be used to boot the virtual machine.
-
-
- boot_hdd_name - -
- string -
-
added in 3.2.0
-
- -
Name of disk to be set as boot disk, which is case sensitive, e.g., 'Hard disk 1'.
-
This parameter is optional, if not set, will use the first virtual disk found in VM device list.
-
-
- boot_order - -
- list - / elements=string -
-
- Default:
[]
-
-
List of the boot devices.
-
-
- boot_retry_delay - -
- integer -
-
- -
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.
-
-
- boot_retry_enabled - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
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.
-
-
- enter_bios_setup - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
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.
-
-
- hostname - -
- string -
-
- -
The hostname or IP address of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_HOST will be used instead.
-
Environment variable support added in Ansible 2.6.
-
-
- moid - -
- string -
-
- -
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.
-
-
- name - -
- string -
-
- -
Name of the VM to work with.
-
This is required if uuid or moid parameter is not supplied.
-
-
- name_match - -
- string -
-
-
    Choices: -
  • first ←
  • -
  • last
  • -
-
-
If multiple virtual machines matching the name, use the first or last found.
-
-
- password - -
- string -
-
- -
The password of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_PASSWORD will be used instead.
-
Environment variable support added in Ansible 2.6.
-

aliases: pass, pwd
-
-
- port - -
- integer -
-
- Default:
443
-
-
The port number of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_PORT will be used instead.
-
Environment variable support added in Ansible 2.6.
-
-
- proxy_host - -
- string -
-
- -
Address of a proxy that will receive all HTTPS requests and relay them.
-
The format is a hostname or a IP.
-
If the value is not specified in the task, the value of environment variable VMWARE_PROXY_HOST will be used instead.
-
This feature depends on a version of pyvmomi greater than v6.7.1.2018.12
-
-
- proxy_port - -
- integer -
-
- -
Port of the HTTP proxy that will receive all HTTPS requests and relay them.
-
If the value is not specified in the task, the value of environment variable VMWARE_PROXY_PORT will be used instead.
-
-
- secure_boot_enabled - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Choose if EFI secure boot should be enabled. EFI secure boot can only be enabled with boot_firmware = efi
-
-
- use_instance_uuid - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Whether to use the VMware instance UUID rather than the BIOS UUID.
-
-
- username - -
- string -
-
- -
The username of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_USER will be used instead.
-
Environment variable support added in Ansible 2.6.
-

aliases: admin, user
-
-
- uuid - -
- string -
-
- -
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.
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Allows connection when SSL certificates are not valid. Set to false when certificates are not trusted.
-
If the value is not specified in the task, the value of environment variable VMWARE_VALIDATE_CERTS will be used instead.
-
Environment variable support added in Ansible 2.6.
-
If set to true, please make sure Python >= 2.7.9 is installed on the given machine.
-
-
- - -Notes ------ - -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - - - -Examples --------- - -.. code-block:: yaml - - - name: Change virtual machine's boot order and related parameters - community.vmware.vmware_guest_boot_manager: - hostname: "{{ vcenter_hostname }}" - username: "{{ vcenter_username }}" - password: "{{ vcenter_password }}" - name: testvm - boot_delay: 2000 - enter_bios_setup: true - boot_retry_enabled: true - boot_retry_delay: 22300 - boot_firmware: bios - secure_boot_enabled: false - boot_order: - - floppy - - cdrom - - ethernet - - disk - delegate_to: localhost - register: vm_boot_order - - - name: Change virtual machine's boot order using Virtual Machine MoID - community.vmware.vmware_guest_boot_manager: - hostname: "{{ vcenter_hostname }}" - username: "{{ vcenter_username }}" - password: "{{ vcenter_password }}" - moid: vm-42 - boot_delay: 2000 - enter_bios_setup: true - boot_retry_enabled: true - boot_retry_delay: 22300 - boot_firmware: bios - secure_boot_enabled: false - boot_order: - - floppy - - cdrom - - ethernet - - disk - delegate_to: localhost - register: vm_boot_order - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - -
KeyReturnedDescription
-
- vm_boot_status - -
- dictionary -
-
always -
metadata about boot order of virtual machine
-
-
Sample:
-
{'current_boot_order': ['floppy', 'disk', 'ethernet', 'cdrom'], 'current_boot_delay': 2000, 'current_boot_retry_delay': 22300, 'current_boot_retry_enabled': True, 'current_enter_bios_setup': True, 'current_boot_firmware': 'bios', 'current_secure_boot_enabled': False, 'previous_boot_delay': 10, 'previous_boot_retry_delay': 10000, 'previous_boot_retry_enabled': True, 'previous_enter_bios_setup': False, 'previous_boot_firmware': 'efi', 'previous_secure_boot_enabled': True, 'previous_boot_order': ['ethernet', 'cdrom', 'floppy', 'disk']}
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Abhijeet Kasurde (@Akasurde) diff --git a/docs/community.vmware.vmware_guest_controller_module.rst b/docs/community.vmware.vmware_guest_controller_module.rst deleted file mode 100644 index f5162b7f9..000000000 --- a/docs/community.vmware.vmware_guest_controller_module.rst +++ /dev/null @@ -1,522 +0,0 @@ -.. _community.vmware.vmware_guest_controller_module: - - -**************************************** -community.vmware.vmware_guest_controller -**************************************** - -**Manage disk or USB controllers related to virtual machine in given vCenter infrastructure** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- This module can be used to add, remove disk controllers or USB controllers belonging to given virtual machine. -- All parameters and VMware object names are case sensitive. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- controllers - -
- list - / elements=dictionary -
-
- -
A list of disk or USB controllers to add or remove.
-
Total 4 disk controllers with the same type are allowed per VM.
-
Total 2 USB controllers are allowed per VM, 1 USB 2.0 and 1 USB 3.0 or 3.1.
-
For specific guest OS, supported controller types please refer to VMware Compatibility Guide.
-
-
- bus_sharing - -
- string -
-
-
    Choices: -
  • noSharing ←
  • -
  • physicalSharing
  • -
  • virtualSharing
  • -
-
-
Bus sharing type for SCSI controller.
-
-
- controller_number - -
- integer -
-
-
    Choices: -
  • 0
  • -
  • 1
  • -
  • 2
  • -
  • 3
  • -
-
-
Disk controller bus number. When state is set to absent, this parameter is required.
-
When type set to usb2 or usb3, this parameter is not required.
-
-
- state - -
- string - / required -
-
-
    Choices: -
  • present
  • -
  • absent
  • -
-
-
Add new controller or remove specified existing controller.
-
If state is set to absent, the specified controller will be removed from virtual machine when there is no disk or device attaching to it.
-
If specified controller is removed or not exist, no action will be taken only warning message.
-
If state is set to present, new controller with specified type will be added.
-
If the number of controller with specified controller type reaches it's maximum, no action will be taken only warning message.
-
-
- type - -
- string - / required -
-
-
    Choices: -
  • buslogic
  • -
  • lsilogic
  • -
  • lsilogicsas
  • -
  • paravirtual
  • -
  • sata
  • -
  • nvme
  • -
  • usb2
  • -
  • usb3
  • -
-
-
Type of disk or USB controller.
-
From vSphere 6.5 and virtual machine with hardware version 13, nvme controller starts to be supported.
-
-
- datacenter - -
- string -
-
- Default:
"ha-datacenter"
-
-
The datacenter name to which virtual machine belongs to.
-
-
- folder - -
- string -
-
- -
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
-
-
- gather_disk_controller_facts - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Whether to collect existing disk and USB controllers facts only.
-
When this parameter is set to true, controllers parameter will be ignored.
-
-
- hostname - -
- string -
-
- -
The hostname or IP address of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_HOST will be used instead.
-
Environment variable support added in Ansible 2.6.
-
-
- moid - -
- string -
-
- -
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.
-
-
- name - -
- string -
-
- -
Name of the virtual machine.
-
This is a required parameter, if parameter uuid or moid is not supplied.
-
-
- password - -
- string -
-
- -
The password of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_PASSWORD will be used instead.
-
Environment variable support added in Ansible 2.6.
-

aliases: pass, pwd
-
-
- port - -
- integer -
-
- Default:
443
-
-
The port number of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_PORT will be used instead.
-
Environment variable support added in Ansible 2.6.
-
-
- proxy_host - -
- string -
-
- -
Address of a proxy that will receive all HTTPS requests and relay them.
-
The format is a hostname or a IP.
-
If the value is not specified in the task, the value of environment variable VMWARE_PROXY_HOST will be used instead.
-
This feature depends on a version of pyvmomi greater than v6.7.1.2018.12
-
-
- proxy_port - -
- integer -
-
- -
Port of the HTTP proxy that will receive all HTTPS requests and relay them.
-
If the value is not specified in the task, the value of environment variable VMWARE_PROXY_PORT will be used instead.
-
-
- sleep_time - -
- integer -
-
- Default:
10
-
-
The sleep time in seconds after VM reconfigure task completes, used when not get the updated VM controller facts after VM reconfiguration.
-
This parameter is not required. Maximum value is 600.
-
-
- use_instance_uuid - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Whether to use the VMware instance UUID rather than the BIOS UUID.
-
-
- username - -
- string -
-
- -
The username of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_USER will be used instead.
-
Environment variable support added in Ansible 2.6.
-

aliases: admin, user
-
-
- uuid - -
- string -
-
- -
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.
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Allows connection when SSL certificates are not valid. Set to false when certificates are not trusted.
-
If the value is not specified in the task, the value of environment variable VMWARE_VALIDATE_CERTS will be used instead.
-
Environment variable support added in Ansible 2.6.
-
If set to true, please make sure Python >= 2.7.9 is installed on the given machine.
-
-
- - -Notes ------ - -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - - - -Examples --------- - -.. code-block:: yaml - - - name: Add disk and USB 3.0 controllers for virtual machine located by name - community.vmware.vmware_guest_controller: - hostname: "{{ vcenter_hostname }}" - username: "{{ vcenter_username }}" - password: "{{ vcenter_password }}" - datacenter: "{{ datacenter_name }}" - name: test_VM - controllers: - - state: present - type: sata - - state: present - type: nvme - - state: present - type: usb3 - delegate_to: localhost - register: disk_controller_facts - - - name: Remove disk controllers and USB 2.0 from virtual machine located by moid - community.vmware.vmware_guest_controller: - hostname: "{{ vcenter_hostname }}" - username: "{{ vcenter_username }}" - password: "{{ vcenter_password }}" - datacenter: "{{ datacenter_name }}" - moid: vm-33 - controllers: - - state: absent - controller_number: 1 - type: sata - - state: absent - controller_number: 0 - type: nvme - - state: absent - type: usb2 - delegate_to: localhost - register: disk_controller_facts - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - -
KeyReturnedDescription
-
- disk_controller_status - -
- dictionary -
-
always -
metadata about the virtual machine's existing disk controllers or after adding or removing operation
-
-
Sample:
-
{'nvme': {'0': {'controller_busnumber': 0, 'controller_controllerkey': 100, 'controller_devicekey': 31000, 'controller_disks_devicekey': [], 'controller_label': 'NVME controller 0', 'controller_summary': 'NVME controller 0', 'controller_unitnumber': 30}}, 'sata': {'0': {'controller_busnumber': 0, 'controller_controllerkey': 100, 'controller_devicekey': 15000, 'controller_disks_devicekey': [16000, 16001], 'controller_label': 'SATA controller 0', 'controller_summary': 'AHCI', 'controller_unitnumber': 24}}, 'scsi': {'0': {'controller_busnumber': 0, 'controller_controllerkey': 100, 'controller_devicekey': 1000, 'controller_disks_devicekey': [2000], 'controller_label': 'SCSI controller 0', 'controller_summary': 'LSI Logic SAS', 'controller_unitnumber': 3, 'controller_bus_sharing': 'noSharing'}, '1': {'controller_busnumber': 1, 'controller_controllerkey': 100, 'controller_devicekey': 1001, 'controller_disks_devicekey': [], 'controller_label': 'SCSI controller 1', 'controller_summary': 'VMware paravirtual SCSI', 'controller_unitnumber': 4, 'controller_bus_sharing': 'physicalSharing'}}, 'usb2': {'0': {'controller_busnumber': 0, 'controller_controllerkey': 100, 'controller_devicekey': 7000, 'controller_disks_devicekey': [], 'controller_label': 'USB Controller', 'controller_summary': 'Auto connect Disabled', 'controller_unitnumber': 22}}}
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Diane Wang (@Tomorrow9) diff --git a/docs/community.vmware.vmware_guest_cross_vc_clone_module.rst b/docs/community.vmware.vmware_guest_cross_vc_clone_module.rst deleted file mode 100644 index f501d06ec..000000000 --- a/docs/community.vmware.vmware_guest_cross_vc_clone_module.rst +++ /dev/null @@ -1,566 +0,0 @@ -.. _community.vmware.vmware_guest_cross_vc_clone_module: - - -******************************************** -community.vmware.vmware_guest_cross_vc_clone -******************************************** - -**Cross-vCenter VM/template clone** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- This module can be used for Cross-vCenter vm/template clone - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- destination_datastore - -
- string - / required -
-
- -
The name of the destination datastore or the datastore cluster.
-
If datastore cluster name is specified, we will find the Storage DRS recommended datastore in that cluster.
-
-
- destination_host - -
- string - / required -
-
- -
The name of the destination host.
-
-
- destination_resource_pool - -
- string -
-
- -
Destination resource pool.
-
If not provided, the destination host's parent's resource pool will be used.
-
-
- destination_vcenter - -
- string - / required -
-
- -
The hostname or IP address of the destination VCenter.
-
-
- destination_vcenter_password - -
- string - / required -
-
- -
The password of the destination VCenter.
-
-
- destination_vcenter_port - -
- integer -
-
- Default:
443
-
-
The port to establish connection in the destination VCenter.
-
-
- destination_vcenter_username - -
- string - / required -
-
- -
The username of the destination VCenter.
-
-
- destination_vcenter_validate_certs - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Parameter to indicate if certification validation needs to be done on destination VCenter.
-
-
- destination_vm_folder - -
- string - / required -
-
- -
Destination folder, absolute path to deploy the cloned vm.
-
This parameter is case sensitive.
-
Examples:
-
folder: vm
-
folder: ha-datacenter/vm
-
folder: /datacenter1/vm
-
-
- destination_vm_name - -
- string - / required -
-
- -
The name of the cloned VM.
-
-
- hostname - -
- string -
-
- -
The hostname or IP address of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_HOST will be used instead.
-
Environment variable support added in Ansible 2.6.
-
-
- is_template - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Specifies whether or not the new virtual machine should be marked as a template.
-
-
- moid - -
- string -
-
- -
Managed Object ID of the vm/template 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.
-
-
- name - -
- string -
-
- -
Name of the virtual machine or template.
-
This is a required parameter, if parameter uuid or moid is not supplied.
-
-
- password - -
- string -
-
- -
The password of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_PASSWORD will be used instead.
-
Environment variable support added in Ansible 2.6.
-

aliases: pass, pwd
-
-
- port - -
- integer -
-
- Default:
443
-
-
The port number of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_PORT will be used instead.
-
Environment variable support added in Ansible 2.6.
-
-
- proxy_host - -
- string -
-
- -
Address of a proxy that will receive all HTTPS requests and relay them.
-
The format is a hostname or a IP.
-
If the value is not specified in the task, the value of environment variable VMWARE_PROXY_HOST will be used instead.
-
This feature depends on a version of pyvmomi greater than v6.7.1.2018.12
-
-
- proxy_port - -
- integer -
-
- -
Port of the HTTP proxy that will receive all HTTPS requests and relay them.
-
If the value is not specified in the task, the value of environment variable VMWARE_PROXY_PORT will be used instead.
-
-
- state - -
- string -
-
-
    Choices: -
  • present ←
  • -
  • poweredon
  • -
-
-
The state of Virtual Machine deployed.
-
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.
-
-
- timeout - -
- integer -
-
added in 3.5.0
-
- Default:
3600
-
-
The timeout in seconds. When the timeout is reached, the module will fail.
-
-
- use_instance_uuid - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Whether to use the VMware instance UUID rather than the BIOS UUID.
-
-
- username - -
- string -
-
- -
The username of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_USER will be used instead.
-
Environment variable support added in Ansible 2.6.
-

aliases: admin, user
-
-
- uuid - -
- string -
-
- -
UUID of the vm/template instance to clone from, this is VMware's unique identifier.
-
This is a required parameter, if parameter name or moid is not supplied.
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Allows connection when SSL certificates are not valid. Set to false when certificates are not trusted.
-
If the value is not specified in the task, the value of environment variable VMWARE_VALIDATE_CERTS will be used instead.
-
Environment variable support added in Ansible 2.6.
-
If set to true, please make sure Python >= 2.7.9 is installed on the given machine.
-
-
- - -Notes ------ - -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - - - -Examples --------- - -.. code-block:: yaml - - # Clone template - - name: clone a template across VC - community.vmware.vmware_guest_cross_vc_clone: - hostname: '{{ vcenter_hostname }}' - username: '{{ vcenter_username }}' - password: '{{ vcenter_password }}' - name: "test_vm1" - destination_vm_name: "cloned_vm_from_template" - destination_vcenter: '{{ destination_vcenter_hostname }}' - destination_vcenter_username: '{{ destination_vcenter_username }}' - destination_vcenter_password: '{{ destination_vcenter_password }}' - destination_vcenter_port: '{{ destination_vcenter_port }}' - destination_vcenter_validate_certs: '{{ destination_vcenter_validate_certs }}' - destination_host: '{{ destination_esxi }}' - destination_datastore: '{{ destination_datastore }}' - destination_vm_folder: '{{ destination_vm_folder }}' - state: present - register: cross_vc_clone_from_template - - - name: clone a VM across VC - community.vmware.vmware_guest_cross_vc_clone: - hostname: '{{ vcenter_hostname }}' - username: '{{ vcenter_username }}' - password: "{{ vcenter_password }}" - name: "test_vm1" - destination_vm_name: "cloned_vm_from_vm" - destination_vcenter: '{{ destination_vcenter_hostname }}' - destination_vcenter_username: '{{ destination_vcenter_username }}' - destination_vcenter_password: '{{ destination_vcenter_password }}' - destination_host: '{{ destination_esxi }}' - destination_datastore: '{{ destination_datastore }}' - destination_vm_folder: '{{ destination_vm_folder }}' - state: poweredon - register: cross_vc_clone_from_vm - - - name: check_mode support - community.vmware.vmware_guest_cross_vc_clone: - hostname: '{{ vcenter_hostname }}' - username: '{{ vcenter_username }}' - password: "{{ vcenter_password }}" - name: "test_vm1" - destination_vm_name: "cloned_vm_from_vm" - destination_vcenter: '{{ destination_vcenter_hostname }}' - destination_vcenter_username: '{{ destination_vcenter_username }}' - destination_vcenter_password: '{{ destination_vcenter_password }}' - destination_host: '{{ destination_esxi }}' - destination_datastore: '{{ destination_datastore }}' - destination_vm_folder: '{{ destination_vm_folder }}' - check_mode: true - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - -
KeyReturnedDescription
-
- vm_info - -
- dictionary -
-
always -
metadata about the virtual machine
-
-
Sample:
-
{'vm_name': '', 'vcenter': '', 'host': '', 'datastore': '', 'vm_folder': '', 'power_on': ''}
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Anusha Hegde (@anusha94) diff --git a/docs/community.vmware.vmware_guest_custom_attribute_defs_module.rst b/docs/community.vmware.vmware_guest_custom_attribute_defs_module.rst deleted file mode 100644 index 3fa560e1c..000000000 --- a/docs/community.vmware.vmware_guest_custom_attribute_defs_module.rst +++ /dev/null @@ -1,281 +0,0 @@ -.. _community.vmware.vmware_guest_custom_attribute_defs_module: - - -*************************************************** -community.vmware.vmware_guest_custom_attribute_defs -*************************************************** - -**Manage custom attributes definitions for virtual machine from VMware** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- This module can be used to add and remove custom attributes definitions for the given virtual machine from VMware. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- attribute_key - -
- string -
-
- -
Name of the custom attribute definition.
-
This is required parameter, if state is set to present or absent.
-
-
- hostname - -
- string -
-
- -
The hostname or IP address of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_HOST will be used instead.
-
Environment variable support added in Ansible 2.6.
-
-
- password - -
- string -
-
- -
The password of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_PASSWORD will be used instead.
-
Environment variable support added in Ansible 2.6.
-

aliases: pass, pwd
-
-
- port - -
- integer -
-
- Default:
443
-
-
The port number of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_PORT will be used instead.
-
Environment variable support added in Ansible 2.6.
-
-
- proxy_host - -
- string -
-
- -
Address of a proxy that will receive all HTTPS requests and relay them.
-
The format is a hostname or a IP.
-
If the value is not specified in the task, the value of environment variable VMWARE_PROXY_HOST will be used instead.
-
This feature depends on a version of pyvmomi greater than v6.7.1.2018.12
-
-
- proxy_port - -
- integer -
-
- -
Port of the HTTP proxy that will receive all HTTPS requests and relay them.
-
If the value is not specified in the task, the value of environment variable VMWARE_PROXY_PORT will be used instead.
-
-
- state - -
- string -
-
-
    Choices: -
  • present ←
  • -
  • absent
  • -
-
-
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.
-
-
- username - -
- string -
-
- -
The username of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_USER will be used instead.
-
Environment variable support added in Ansible 2.6.
-

aliases: admin, user
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Allows connection when SSL certificates are not valid. Set to false when certificates are not trusted.
-
If the value is not specified in the task, the value of environment variable VMWARE_VALIDATE_CERTS will be used instead.
-
Environment variable support added in Ansible 2.6.
-
If set to true, please make sure Python >= 2.7.9 is installed on the given machine.
-
-
- - -Notes ------ - -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - - - -Examples --------- - -.. code-block:: yaml - - - name: Add VMware Attribute Definition - community.vmware.vmware_guest_custom_attribute_defs: - hostname: "{{ vcenter_hostname }}" - username: "{{ vcenter_username }}" - password: "{{ vcenter_password }}" - state: present - attribute_key: custom_attr_def_1 - delegate_to: localhost - register: defs - - - name: Remove VMware Attribute Definition - community.vmware.vmware_guest_custom_attribute_defs: - hostname: "{{ vcenter_hostname }}" - username: "{{ vcenter_username }}" - password: "{{ vcenter_password }}" - state: absent - attribute_key: custom_attr_def_1 - delegate_to: localhost - register: defs - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - -
KeyReturnedDescription
-
- custom_attribute_defs - -
- list -
-
always -
list of all current attribute definitions
-
-
Sample:
-
['sample_5', 'sample_4']
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Jimmy Conner (@cigamit) -- Abhijeet Kasurde (@Akasurde) diff --git a/docs/community.vmware.vmware_guest_module.rst b/docs/community.vmware.vmware_guest_module.rst deleted file mode 100644 index b3780487b..000000000 --- a/docs/community.vmware.vmware_guest_module.rst +++ /dev/null @@ -1,2824 +0,0 @@ -.. _community.vmware.vmware_guest_module: - - -***************************** -community.vmware.vmware_guest -***************************** - -**Manages virtual machines in vCenter** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- This module can be used to create new virtual machines from templates or other virtual machines, manage power state of virtual machine such as power on, power off, suspend, shutdown, reboot, restart etc., modify various virtual machine components like network, disk, customization etc., rename a virtual machine and remove a virtual machine with associated components. - - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- advanced_settings - -
- list - / elements=dictionary -
-
- Default:
[]
-
-
Define a list of advanced settings to be added to the VMX config.
-
An advanced settings object takes two fields key and value.
-
Incorrect key and values will be ignored.
-
-
- annotation - -
- string -
-
- -
A note or annotation to include in the virtual machine.
-

aliases: notes
-
-
- cdrom - -
- raw -
-
- Default:
[]
-
-
A list of CD-ROM configurations for the virtual machine. Added in version 2.9.
-
Providing CD-ROM configuration as dict is deprecated and will be removed VMware collection 4.0.0. Please use a list instead.
-
Parameters controller_type, controller_number, unit_number, state are added for a list of CD-ROMs configuration support.
-
For ide controller, hot-add or hot-remove CD-ROM is not supported.
-
-
- controller_number - -
- integer -
-
- -
For ide controller, valid value is 0 or 1.
-
For sata controller, valid value is 0 to 3.
-
-
- controller_type - -
- string -
-
- -
Valid options are ide and sata.
-
Default value is ide.
-
When set to sata, please make sure unit_number is correct and not used by SATA disks.
-
-
- 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.
-
-
- state - -
- string -
-
- -
Valid value is present or absent.
-
Default is present.
-
If set to absent, then the specified CD-ROM will be removed.
-
-
- type - -
- string -
-
- -
The type of CD-ROM, valid options are none, client or iso.
-
With none the CD-ROM will be disconnected but present.
-
The default value is client.
-
-
- unit_number - -
- integer -
-
- -
For CD-ROM device attach to ide controller, valid value is 0 or 1.
-
For CD-ROM device attach to sata controller, valid value is 0 to 29.
-
controller_number and unit_number are mandatory attributes.
-
-
- cluster - -
- string -
-
- -
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.
-
-
- convert - -
- string -
-
-
    Choices: -
  • thin
  • -
  • thick
  • -
  • eagerzeroedthick
  • -
-
-
Specify convert disk type while cloning template or virtual machine.
-
-
- customization - -
- dictionary -
-
- Default:
{}
-
-
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.
-
-
- autologon - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Auto logon after virtual machine customization.
-
Specific to Windows customization.
-
-
- autologoncount - -
- integer -
-
- -
Number of autologon after reboot.
-
Specific to Windows customization.
-
Ignored if autologon is unset or set to false.
-
If unset, 1 will be used.
-
-
- dns_servers - -
- list - / elements=string -
-
- -
List of DNS servers to configure.
-
Common for Linux and Windows customization.
-
-
- dns_suffix - -
- list - / elements=string -
-
- -
List of domain suffixes, also known as DNS search path.
-
Default domain parameter.
-
Common for Linux and Windows customization.
-
-
- domain - -
- string -
-
- -
DNS domain name to use.
-
Common for Linux and Windows customization.
-
-
- domainadmin - -
- string -
-
- -
User used to join in AD domain.
-
Required if joindomain specified.
-
Specific to Windows customization.
-
-
- domainadminpassword - -
- string -
-
- -
Password used to join in AD domain.
-
Required if joindomain specified.
-
Specific to Windows customization.
-
-
- existing_vm - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
If set to true, do OS customization on the specified virtual machine directly.
-
Common for Linux and Windows customization.
-
-
- fullname - -
- string -
-
- -
Server owner name.
-
Specific to Windows customization.
-
If unset, "Administrator" will be used as a fall-back.
-
-
- hostname - -
- string -
-
- -
Computer hostname.
-
Default is shortened name parameter.
-
Allowed characters are alphanumeric (uppercase and lowercase) and minus, rest of the characters are dropped as per RFC 952.
-
Common for Linux and Windows customization.
-
-
- hwclockUTC - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Specifies whether the hardware clock is in UTC or local time.
-
Specific to Linux customization.
-
-
- joindomain - -
- string -
-
- -
AD domain to join.
-
Not compatible with joinworkgroup.
-
Specific to Windows customization.
-
-
- joinworkgroup - -
- string -
-
- -
Workgroup to join.
-
Not compatible with joindomain.
-
Specific to Windows customization.
-
If unset, "WORKGROUP" will be used as a fall-back.
-
-
- orgname - -
- string -
-
- -
Organisation name.
-
Specific to Windows customization.
-
If unset, "ACME" will be used as a fall-back.
-
-
- password - -
- string -
-
- -
Local administrator password.
-
If not defined, the password will be set to blank (that is, no password).
-
Specific to Windows customization.
-
-
- productid - -
- string -
-
- -
Product ID.
-
Specific to Windows customization.
-
-
- runonce - -
- list - / elements=string -
-
- -
List of commands to run at first user logon.
-
Specific to Windows customization.
-
-
- script_text - -
- string -
-
added in 3.1.0
-
- -
Script to run with shebang.
-
Needs to be enabled in vmware tools with vmware-toolbox-cmd config set deployPkg enable-custom-scripts true
-
https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.vm_admin.doc/GUID-9A5093A5-C54F-4502-941B-3F9C0F573A39.html
-
Specific to Linux customization.
-
-
- timezone - -
- string -
-
- -
Timezone.
-
See List of supported time zones for different vSphere versions in Linux/Unix.
-
Common for Linux and Windows customization.
- -
-
- customization_spec - -
- string -
-
- -
Unique name identifying the requested customization specification.
-
This parameter is case sensitive.
-
If set, then overrides customization parameter values.
-
-
- customvalues - -
- list - / elements=dictionary -
-
- Default:
[]
-
-
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.
-
-
- datacenter - -
- string -
-
- Default:
"ha-datacenter"
-
-
Destination datacenter for the deploy operation.
-
This parameter is case sensitive.
-
-
- datastore - -
- string -
-
- -
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.
-
-
- delete_from_inventory - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Whether to delete Virtual machine from inventory or delete from disk.
-
-
- disk - -
- list - / elements=dictionary -
-
- Default:
[]
-
-
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.
-
Attributes controller_type, controller_number, unit_number are used to configure multiple types of disk controllers and disks for creating or reconfiguring virtual machine. Added in Ansible 2.10.
-
-
- autoselect_datastore - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Select the less used datastore.
-
disk.datastore and disk.autoselect_datastore will not be used if datastore is specified outside this disk configuration.
-
-
- controller_number - -
- integer -
-
-
    Choices: -
  • 0
  • -
  • 1
  • -
  • 2
  • -
  • 3
  • -
-
-
Disk controller bus number.
-
The maximum number of same type controller is 4 per VM.
-
-
- controller_type - -
- string -
-
-
    Choices: -
  • buslogic
  • -
  • lsilogic
  • -
  • lsilogicsas
  • -
  • paravirtual
  • -
  • sata
  • -
  • nvme
  • -
-
-
Type of disk controller.
-
nvme controller type support starts on ESXi 6.5 with VM hardware version version 13. Set this type on not supported ESXi or VM hardware version will lead to failure in deployment.
-
When set to sata, please make sure unit_number is correct and not used by SATA CDROMs.
-
If set to sata type, please make sure controller_number and unit_number are set correctly when cdrom also set to sata type.
-
-
- datastore - -
- string -
-
- -
The name of datastore which will be used for the disk.
-
If autoselect_datastore is set to True, will select the less used datastore whose name contains this "disk.datastore" string.
-
-
- disk_mode - -
- string -
-
-
    Choices: -
  • persistent
  • -
  • independent_persistent
  • -
  • independent_nonpersistent
  • -
-
-
Type of disk mode.
-
Added in Ansible 2.6.
-
If persistent specified, changes are immediately and permanently written to the virtual disk. This is default.
-
If independent_persistent specified, same as persistent, but not affected by snapshots.
-
If independent_nonpersistent specified, changes to virtual disk are made to a redo log and discarded at power off, but not affected by snapshots.
-
-
- 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 Ansible 2.8.
-
-
- size - -
- string -
-
- -
Disk storage size.
-
Please specify storage unit like [kb, mb, gb, tb].
-
-
- size_gb - -
- integer -
-
- -
Disk storage size in gb.
-
-
- size_kb - -
- integer -
-
- -
Disk storage size in kb.
-
-
- size_mb - -
- integer -
-
- -
Disk storage size in mb.
-
-
- size_tb - -
- integer -
-
- -
Disk storage size in tb.
-
-
- type - -
- string -
-
-
    Choices: -
  • thin
  • -
  • thick
  • -
  • eagerzeroedthick
  • -
-
-
Type of disk.
-
If thin specified, disk type is set to thin disk.
-
If eagerzeroedthick specified, disk type is set to eagerzeroedthick disk. Added Ansible 2.5.
-
If not specified, disk type is inherited from the source VM or template when cloned and thick disk, no eagerzero otherwise.
-
-
- unit_number - -
- integer -
-
- -
Disk Unit Number.
-
Valid value range from 0 to 15 for SCSI controller, except 7.
-
Valid value range from 0 to 14 for NVME controller.
-
Valid value range from 0 to 29 for SATA controller.
-
controller_type, controller_number and unit_number are required when creating or reconfiguring VMs with multiple types of disk controllers and disks.
-
When creating new VM, the first configured disk in the disk list will be "Hard Disk 1".
-
-
- encryption - -
- dictionary -
-
added in 3.9.0
-
- Default:
{}
-
-
Manage virtual machine encryption settings
-
All parameters case sensitive.
-
-
- encrypted_ft - -
- string -
-
-
    Choices: -
  • disabled
  • -
  • opportunistic
  • -
  • required
  • -
-
-
Controls encryption for fault tolerance replication
-
-
- encrypted_vmotion - -
- string -
-
-
    Choices: -
  • disabled
  • -
  • opportunistic
  • -
  • required
  • -
-
-
Controls encryption for live migrations with vmotion
-
-
- esxi_hostname - -
- string -
-
- -
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.
-
-
- folder - -
- string -
-
- -
Destination folder, absolute path to find an existing guest or create the new guest.
-
The folder should include the datacenter. ESXi's datacenter is ha-datacenter.
-
This parameter is case sensitive.
-
If multiple machines are found with same name, this parameter is used to identify
-
uniqueness of the virtual machine. Added in Ansible 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
-
-
- force - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
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.
-
-
- guest_id - -
- string -
-
- -
Set the guest ID.
-
This parameter is case sensitive.
-
rhel7_64Guest for virtual machine with RHEL7 64 bit.
-
centos64Guest for virtual machine with CentOS 64 bit.
-
ubuntu64Guest for virtual machine with Ubuntu 64 bit.
-
This field is required when creating a virtual machine, not required when creating from the template.
- -
-
- hardware - -
- dictionary -
-
- Default:
{}
-
-
Manage virtual machine's hardware attributes.
-
All parameters case sensitive.
-
-
- boot_firmware - -
- string -
-
-
    Choices: -
  • bios
  • -
  • efi
  • -
-
-
Choose which firmware should be used to boot the virtual machine.
-
-
- cpu_limit - -
- integer -
-
- -
The CPU utilization of a virtual machine will not exceed this limit.
-
Unit is MHz.
-
-
- cpu_reservation - -
- integer -
-
- -
The amount of CPU resource that is guaranteed available to the virtual machine.
-
-
- cpu_shares - -
- integer -
-
added in 3.2.0
-
- -
The number of shares of CPU allocated to this virtual machine
-
cpu_shares_level will automatically be set to 'custom'
-
-
- cpu_shares_level - -
- string -
-
added in 3.2.0
-
-
    Choices: -
  • low
  • -
  • normal
  • -
  • high
  • -
  • custom
  • -
-
-
The allocation level of CPU resources for the virtual machine.
-
Valid Values are low, normal, high and custom.
-
-
- hotadd_cpu - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Allow virtual CPUs to be added while the virtual machine is running.
-
-
- hotadd_memory - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Allow memory to be added while the virtual machine is running.
-
-
- hotremove_cpu - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Allow virtual CPUs to be removed while the virtual machine is running.
-
-
- iommu - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Flag to specify if I/O MMU is enabled for this virtual machine.
-
-
- max_connections - -
- integer -
-
- -
Maximum number of active remote display connections for the virtual machines.
-
-
- mem_limit - -
- integer -
-
- -
The memory utilization of a virtual machine will not exceed this limit.
-
Unit is MB.
-
-
- mem_reservation - -
- integer -
-
- -
The amount of memory resource that is guaranteed available to the virtual machine.
-

aliases: memory_reservation
-
-
- mem_shares - -
- integer -
-
added in 3.2.0
-
- -
The number of shares of memory allocated to this virtual machine
-
mem_shares_level will automatically be set to 'custom'
-
-
- mem_shares_level - -
- string -
-
added in 3.2.0
-
-
    Choices: -
  • low
  • -
  • normal
  • -
  • high
  • -
  • custom
  • -
-
-
The allocation level of memory resources for the virtual machine.
-
Valid Values are low, normal, high and custom.
-
-
- memory_mb - -
- integer -
-
- -
Amount of memory in MB.
-
-
- memory_reservation_lock - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
If set true, memory resource reservation for the virtual machine.
-
-
- nested_virt - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Enable nested virtualization.
-
-
- num_cpu_cores_per_socket - -
- integer -
-
- -
Number of Cores Per Socket.
-
-
- num_cpus - -
- integer -
-
- -
Number of CPUs.
-
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 as 8 and num_cpu_cores_per_socket as 4.
-
-
- scsi - -
- string -
-
-
    Choices: -
  • buslogic
  • -
  • lsilogic
  • -
  • lsilogicsas
  • -
  • paravirtual
  • -
-
-
Valid values are buslogic, lsilogic, lsilogicsas and paravirtual.
-
paravirtual is default.
-
-
- secure_boot - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Whether to enable or disable (U)EFI secure boot.
-
-
- version - -
- string -
-
- -
The Virtual machine hardware versions.
-
Default is 10 (ESXi 5.5 and onwards).
-
If set to latest, the specified virtual machine will be upgraded to the most current hardware version supported on the host.
-
latest is added in Ansible 2.10.
-
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.
-
-
- virt_based_security - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Enable Virtualization Based Security feature for Windows on ESXi 6.7 and later, from hardware version 14.
-
Supported Guest OS are Windows 10 64 bit, Windows Server 2016, Windows Server 2019 and later.
-
The firmware of virtual machine must be EFI and secure boot must be enabled.
-
Virtualization Based Security depends on nested virtualization and Intel Virtualization Technology for Directed I/O.
-
Deploy on unsupported ESXi, hardware version or firmware may lead to failure or deployed VM with unexpected configurations.
-
-
- vpmc_enabled - -
- boolean -
-
added in 3.2.0
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Enable virtual CPU Performance Counters.
-
-
- hostname - -
- string -
-
- -
The hostname or IP address of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_HOST will be used instead.
-
Environment variable support added in Ansible 2.6.
-
-
- is_template - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Flag the instance as a template.
-
This will mark the given virtual machine as template.
-
Note, this may need to be done in a dedicated task invocation that is not making any other changes. For example, user cannot change the state from powered-on to powered-off AND save as template in the same task.
-
See community.vmware.vmware_guest source for more details.
-
-
- linked_clone - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Whether to create a linked clone from the snapshot specified.
-
If specified, then snapshot_src is required parameter.
-
-
- name - -
- string -
-
- -
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, powered-on, poweredoff, powered-off, present, restarted, suspended and virtual machine does not exists.
-
This parameter is case sensitive.
-
-
- name_match - -
- string -
-
-
    Choices: -
  • first ←
  • -
  • last
  • -
-
-
If multiple virtual machines matching the name, use the first or last found.
-
-
- networks - -
- list - / elements=dictionary -
-
- Default:
[]
-
-
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.
-
The type, ip, netmask, gateway, domain, dns_servers options don't set to a guest when creating a blank new virtual machine. They are set by the customization via vmware-tools. If you want to set the value of the options to a guest, you need to clone from a template with installed OS and vmware-tools(also Perl when Linux).
-
-
- connected - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Indicates whether the NIC is currently connected.
-
-
- device_type - -
- string -
-
- -
Virtual network device.
-
Valid value can be one of e1000, e1000e, pcnet32, vmxnet2, vmxnet3, sriov.
-
vmxnet3 is default.
-
Optional per entry.
-
Used for virtual hardware.
-
-
- dns_servers - -
- string -
-
- -
DNS servers for this network interface (Windows).
-
Optional per entry.
-
Used for OS customization.
-
-
- domain - -
- string -
-
- -
Domain name for this network interface (Windows).
-
Optional per entry.
-
Used for OS customization.
-
-
- dvswitch_name - -
- string -
-
- -
Name of the distributed vSwitch.
-
Optional per entry.
-
Used for virtual hardware.
-
-
- gateway - -
- string -
-
- -
Static gateway.
-
Optional per entry.
-
Used for OS customization.
-
-
- ip - -
- string -
-
- -
Static IP address. Implies type=static.
-
Optional per entry.
-
Used for OS customization.
-
-
- mac - -
- string -
-
- -
Customize MAC address.
-
Optional per entry.
-
Used for virtual hardware.
-
-
- name - -
- string -
-
- -
Name of the portgroup or distributed virtual portgroup for this interface.
-
Required per entry.
-
When specifying distributed virtual portgroup make sure given esxi_hostname or cluster is associated with it.
-
-
- netmask - -
- string -
-
- -
Static netmask required for ip.
-
Optional per entry.
-
Used for OS customization.
-
-
- start_connected - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Specifies whether or not to connect the device when the virtual machine starts.
-
-
- type - -
- string -
-
- -
Type of IP assignment.
-
Valid values are one of dhcp, static.
-
dhcp is default.
-
Optional per entry.
-
Used for OS customization.
-
-
- vlan - -
- integer -
-
- -
VLAN number for this interface.
-
Required per entry.
-
-
- nvdimm - -
- dictionary -
-
- Default:
{}
-
-
Add or remove a virtual NVDIMM device to the virtual machine.
-
VM virtual hardware version must be 14 or higher on vSphere 6.7 or later.
-
Verify that guest OS of the virtual machine supports PMem before adding virtual NVDIMM device.
-
Verify that you have the Datastore.Allocate space privilege on the virtual machine.
-
Make sure that the host or the cluster on which the virtual machine resides has available PMem resources.
-
To add or remove virtual NVDIMM device to the existing virtual machine, it must be in power off state.
-
-
- label - -
- string -
-
- -
The label of the virtual NVDIMM device to be removed or configured, e.g., "NVDIMM 1".
-
This parameter is required when state is set to absent, or present to reconfigure NVDIMM device size. When add a new device, please do not set label.
-
-
- size_mb - -
- integer -
-
- Default:
1024
-
-
Virtual NVDIMM device size in MB.
-
-
- state - -
- string -
-
-
    Choices: -
  • present
  • -
  • absent
  • -
-
-
Valid value is present or absent.
-
If set to absent, then the NVDIMM device with specified label will be removed.
-
-
- password - -
- string -
-
- -
The password of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_PASSWORD will be used instead.
-
Environment variable support added in Ansible 2.6.
-

aliases: pass, pwd
-
-
- port - -
- integer -
-
- Default:
443
-
-
The port number of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_PORT will be used instead.
-
Environment variable support added in Ansible 2.6.
-
-
- proxy_host - -
- string -
-
- -
Address of a proxy that will receive all HTTPS requests and relay them.
-
The format is a hostname or a IP.
-
If the value is not specified in the task, the value of environment variable VMWARE_PROXY_HOST will be used instead.
-
This feature depends on a version of pyvmomi greater than v6.7.1.2018.12
-
-
- proxy_port - -
- integer -
-
- -
Port of the HTTP proxy that will receive all HTTPS requests and relay them.
-
If the value is not specified in the task, the value of environment variable VMWARE_PROXY_PORT will be used instead.
-
-
- resource_pool - -
- string -
-
- -
Use the given resource pool for virtual machine operation.
-
This parameter is case sensitive.
-
Resource pool should be child of the selected host parent.
-
When not specified Resources is taken as default value.
-
-
- snapshot_src - -
- string -
-
- -
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.
-
-
- state - -
- string -
-
-
    Choices: -
  • absent
  • -
  • poweredon
  • -
  • powered-on
  • -
  • poweredoff
  • -
  • powered-off
  • -
  • present ←
  • -
  • rebootguest
  • -
  • reboot-guest
  • -
  • restarted
  • -
  • suspended
  • -
  • shutdownguest
  • -
  • shutdown-guest
  • -
-
-
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 it's associated components.
-
If state is set to one of the following poweredon, powered-on, poweredoff, powered-off, present, restarted, suspended and virtual machine does not exists, virtual machine is deployed with the given parameters.
-
If state is set to poweredon or powered-on and virtual machine exists with powerstate other than powered on, then the specified virtual machine is powered on.
-
If state is set to poweredoff or powered-off 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 or shutdown-guest and virtual machine exists, then the virtual machine is shutdown.
-
If state is set to rebootguest or reboot-guest and virtual machine exists, then the virtual machine is rebooted.
-
Powerstate powered-on and powered-off is added in version 2.10.
-
-
- state_change_timeout - -
- integer -
-
- Default:
0
-
-
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.
-
-
- template - -
- string -
-
- -
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.
-
From version 2.8 onwards, absolute path to virtual machine or template can be used.
-

aliases: template_src
-
-
- use_instance_uuid - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Whether to use the VMware instance UUID rather than the BIOS UUID.
-
-
- username - -
- string -
-
- -
The username of the vSphere vCenter or ESXi server.
-
If the value is not specified in the task, the value of environment variable VMWARE_USER will be used instead.
-
Environment variable support added in Ansible 2.6.
-

aliases: admin, user
-
-
- uuid - -
- string -
-
- -
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.
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Allows connection when SSL certificates are not valid. Set to false when certificates are not trusted.
-
If the value is not specified in the task, the value of environment variable VMWARE_VALIDATE_CERTS will be used instead.
-
Environment variable support added in Ansible 2.6.
-
If set to true, please make sure Python >= 2.7.9 is installed on the given machine.
-
-
- vapp_properties - -
- list - / elements=dictionary -
-
- Default:
[]
-
-
A list of vApp properties.
-
For full list of attributes and types refer to: https://code.vmware.com/apis/704/vsphere/vim.vApp.PropertyInfo.html
-
-
- id - -
- string -
-
- -
Property ID.
-
Required per entry.
-
-
- operation - -
- string -
-
- -
The remove attribute is required only when removing properties.
-
-
- type - -
- string -
-
- -
Value type, string type by default.
-
-
- value - -
- string -
-
- -
Property value.
-
-
- wait_for_customization - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Wait until vCenter detects all guest customizations as successfully completed.
-
When enabled, the VM will automatically be powered on.
-
If vCenter does not detect guest customization start or succeed, failed events after time wait_for_customization_timeout parameter specified, warning message will be printed and task result is fail.
-
-
- wait_for_customization_timeout - -
- integer -
-
- Default:
"3600"
-
-
Define a timeout (in seconds) for the wait_for_customization parameter.
-
Be careful when setting this value since the time guest customization took may differ among guest OSes.
-
-
- wait_for_ip_address - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
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.
-
-
- wait_for_ip_address_timeout - -
- integer -
-
- Default:
"300"
-
-
Define a timeout (in seconds) for the wait_for_ip_address parameter.
-
-
- - -Notes ------ - -.. note:: - - Please make sure that the user used for :ref:`community.vmware.vmware_guest ` has the correct level of privileges. - - For example, following is the list of minimum privileges required by users to create virtual machines. - - DataStore > Allocate Space - - Virtual Machine > Configuration > Add New Disk - - Virtual Machine > Configuration > Add or Remove Device - - Virtual Machine > Inventory > Create New - - Network > Assign Network - - Resource > Assign Virtual Machine to Resource Pool - - Module may require additional privileges as well, which may be required for gathering facts - e.g. ESXi configurations. - - Use SCSI disks instead of IDE when you want to expand online disks by specifying a SCSI controller. - - Uses SysPrep for Windows VM (depends on 'guest_id' parameter match 'win') with PyVmomi. - - In order to change the VM's parameters (e.g. number of CPUs), the VM must be powered off unless the hot-add support is enabled and the ``state=present`` must be used to apply the changes. - - For additional information please visit Ansible VMware community wiki - https://github.com/ansible/community/wiki/VMware. - - All modules requires API write access and hence is not supported on a free ESXi license. - - - -Examples --------- - -.. code-block:: yaml - - - name: Create a virtual machine on given ESXi hostname - community.vmware.vmware_guest: - hostname: "{{ vcenter_hostname }}" - username: "{{ vcenter_username }}" - password: "{{ vcenter_password }}" - folder: /DC1/vm/ - name: test_vm_0001 - state: poweredon - guest_id: centos64Guest - # This is hostname of particular ESXi server on which user wants VM to be deployed - esxi_hostname: "{{ esxi_hostname }}" - disk: - - size_gb: 10 - type: thin - datastore: datastore1 - hardware: - memory_mb: 512 - num_cpus: 4 - scsi: paravirtual - networks: - - name: VM Network - mac: aa:bb:dd:aa:00:14 - ip: 10.10.10.100 - netmask: 255.255.255.0 - device_type: vmxnet3 - wait_for_ip_address: true - wait_for_ip_address_timeout: 600 - delegate_to: localhost - register: deploy_vm - - - name: Create a virtual machine from a template - community.vmware.vmware_guest: - hostname: "{{ vcenter_hostname }}" - username: "{{ vcenter_username }}" - password: "{{ vcenter_password }}" - folder: /testvms - name: testvm_2 - state: poweredon - template: template_el7 - disk: - - size_gb: 10 - type: thin - datastore: g73_datastore - # Add another disk from an existing VMDK - - filename: "[datastore1] testvms/testvm_2_1/testvm_2_1.vmdk" - hardware: - memory_mb: 512 - num_cpus: 6 - num_cpu_cores_per_socket: 3 - scsi: paravirtual - memory_reservation_lock: true - mem_limit: 8096 - mem_reservation: 4096 - cpu_shares_level: "high" - mem_shares_level: "high" - cpu_limit: 8096 - cpu_reservation: 4096 - max_connections: 5 - hotadd_cpu: true - hotremove_cpu: true - hotadd_memory: false - version: 12 # Hardware version of virtual machine - boot_firmware: "efi" - cdrom: - - controller_number: 0 - unit_number: 0 - state: present - type: iso - iso_path: "[datastore1] livecd.iso" - networks: - - name: VM Network - mac: aa:bb:dd:aa:00:14 - wait_for_ip_address: true - delegate_to: localhost - register: deploy - - - name: Clone a virtual machine from Windows template and customize - community.vmware.vmware_guest: - hostname: "{{ vcenter_hostname }}" - username: "{{ vcenter_username }}" - password: "{{ vcenter_password }}" - datacenter: datacenter1 - cluster: cluster - name: testvm-2 - template: template_windows - networks: - - name: VM Network - ip: 192.168.1.100 - netmask: 255.255.255.0 - gateway: 192.168.1.1 - mac: aa:bb:dd:aa:00:14 - domain: my_domain - dns_servers: - - 192.168.1.1 - - 192.168.1.2 - - vlan: 1234 - type: dhcp - customization: - autologon: true - dns_servers: - - 192.168.1.1 - - 192.168.1.2 - domain: my_domain - password: new_vm_password - runonce: - - powershell.exe -ExecutionPolicy Unrestricted -File C:\Windows\Temp\ConfigureRemotingForAnsible.ps1 -ForceNewSSLCert -EnableCredSSP - delegate_to: localhost - - - name: Clone a virtual machine from Linux template and customize - community.vmware.vmware_guest: - hostname: "{{ vcenter_hostname }}" - username: "{{ vcenter_username }}" - password: "{{ vcenter_password }}" - datacenter: "{{ datacenter }}" - state: present - folder: /DC1/vm - template: "{{ template }}" - name: "{{ vm_name }}" - cluster: DC1_C1 - networks: - - name: VM Network - ip: 192.168.10.11 - netmask: 255.255.255.0 - wait_for_ip_address: true - customization: - domain: "{{ guest_domain }}" - dns_servers: - - 8.9.9.9 - - 7.8.8.9 - dns_suffix: - - example.com - - example2.com - script_text: | - #!/bin/bash - touch /tmp/touch-from-playbook - delegate_to: localhost - - - name: Rename a virtual machine (requires the virtual machine's uuid) - community.vmware.vmware_guest: - hostname: "{{ vcenter_hostname }}" - username: "{{ vcenter_username }}" - password: "{{ vcenter_password }}" - uuid: "{{ vm_uuid }}" - name: new_name - state: present - delegate_to: localhost - - - name: Remove a virtual machine by uuid - community.vmware.vmware_guest: - hostname: "{{ vcenter_hostname }}" - username: "{{ vcenter_username }}" - password: "{{ vcenter_password }}" - uuid: "{{ vm_uuid }}" - state: absent - delegate_to: localhost - - - name: Remove a virtual machine from inventory - community.vmware.vmware_guest: - hostname: "{{ vcenter_hostname }}" - username: "{{ vcenter_username }}" - password: "{{ vcenter_password }}" - name: vm_name - delete_from_inventory: true - state: absent - delegate_to: localhost - - - name: Manipulate vApp properties - community.vmware.vmware_guest: - hostname: "{{ vcenter_hostname }}" - username: "{{ vcenter_username }}" - password: "{{ vcenter_password }}" - name: vm_name - state: present - vapp_properties: - - id: remoteIP - category: Backup - label: Backup server IP - type: string - value: 10.10.10.1 - - id: old_property - operation: remove - delegate_to: localhost - - - name: Set powerstate of a virtual machine to poweroff by using UUID - community.vmware.vmware_guest: - hostname: "{{ vcenter_hostname }}" - username: "{{ vcenter_username }}" - password: "{{ vcenter_password }}" - uuid: "{{ vm_uuid }}" - state: poweredoff - delegate_to: localhost - - - name: Deploy a virtual machine in a datastore different from the datastore of the template - community.vmware.vmware_guest: - hostname: "{{ vcenter_hostname }}" - username: "{{ vcenter_username }}" - password: "{{ vcenter_password }}" - name: "{{ vm_name }}" - state: present - template: "{{ template_name }}" - # Here datastore can be different which holds template - datastore: "{{ virtual_machine_datastore }}" - hardware: - memory_mb: 512 - num_cpus: 2 - scsi: paravirtual - delegate_to: localhost - - - name: Create a diskless VM - community.vmware.vmware_guest: - hostname: "{{ vcenter_hostname }}" - username: "{{ vcenter_username }}" - password: "{{ vcenter_password }}" - datacenter: "{{ dc1 }}" - state: poweredoff - cluster: "{{ ccr1 }}" - name: diskless_vm - folder: /Asia-Datacenter1/vm - guest_id: centos64Guest - datastore: "{{ ds1 }}" - hardware: - memory_mb: 1024 - num_cpus: 2 - num_cpu_cores_per_socket: 1 - - - name: Create a VM with multiple disks of different disk controller types - community.vmware.vmware_guest: - hostname: "{{ vcenter_hostname }}" - username: "{{ vcenter_username }}" - password: "{{ vcenter_password }}" - folder: /DC1/vm/ - name: test_vm_multi_disks - state: poweredoff - guest_id: centos64Guest - datastore: datastore1 - disk: - - size_gb: 10 - controller_type: 'nvme' - controller_number: 0 - unit_number: 0 - - size_gb: 10 - controller_type: 'paravirtual' - controller_number: 0 - unit_number: 1 - - size_gb: 10 - controller_type: 'sata' - controller_number: 0 - unit_number: 2 - hardware: - memory_mb: 512 - num_cpus: 4 - version: 14 - networks: - - name: VM Network - device_type: vmxnet3 - delegate_to: localhost - register: deploy_vm - - - name: Create a VM with NVDIMM device - community.vmware.vmware_guest: - hostname: "{{ vcenter_hostname }}" - username: "{{ vcenter_username }}" - password: "{{ vcenter_password }}" - folder: /DC1/vm/ - name: test_vm_nvdimm - state: poweredoff - guest_id: centos7_64Guest - datastore: datastore1 - hardware: - memory_mb: 512 - num_cpus: 4 - version: 14 - networks: - - name: VM Network - device_type: vmxnet3 - nvdimm: - state: present - size_mb: 2048 - delegate_to: localhost - register: deploy_vm - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - -
KeyReturnedDescription
-
- instance - -
- dictionary -
-
always -
metadata about the new virtual machine
-
-
Sample:
-
None
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Loic Blot (@nerzhul) -- Philippe Dellaert (@pdellaert) -- Abhijeet Kasurde (@Akasurde) diff --git a/plugins/modules/vmware_drs_group.py b/plugins/modules/vmware_drs_group.py index a4400d789..ef607072a 100644 --- a/plugins/modules/vmware_drs_group.py +++ b/plugins/modules/vmware_drs_group.py @@ -15,7 +15,7 @@ author: - "Karsten Kaj Jakobsen (@karstenjakobsen)" description: - - "This module can be used to create VM/Host groups in a given cluster. Creates a vm group if C(vms) is set. Creates a host group if C(hosts) is set." + - "This module can be used to create VM/Host groups in a given cluster. Creates a vm group if O(vms) is set. Creates a host group if O(hosts) is set." extends_documentation_fragment: - community.vmware.vmware.documentation @@ -30,7 +30,7 @@ aliases: - datacenter_name description: - - "Datacenter to search for given cluster. If not set, we use first cluster we encounter with C(cluster_name)." + - "Datacenter to search for given cluster. If not set, we use first cluster we encounter with O(cluster_name)." required: false type: str group_name: @@ -41,7 +41,8 @@ hosts: description: - "List of hosts to create in group." - - "Required only if C(vms) is not set." + - "Required if O(vms) is not set." + - "O(hosts) and O(vms) are mutually exclusive parameters." required: false type: list elements: str @@ -51,13 +52,14 @@ - absent default: present description: - - "If set to C(present) and the group doesn't exists then the group will be created." - - "If set to C(absent) and the group exists then the group will be deleted." + - "If set to V(present) and the group doesn't exists then the group will be created." + - "If set to V(absent) and the group exists then the group will be deleted." type: str vms: description: - "List of vms to create in group." - - "Required only if C(hosts) is not set." + - "Required if O(hosts) is not set." + - "O(hosts) and O(vms) are mutually exclusive parameters." required: false type: list elements: str diff --git a/plugins/modules/vmware_drs_group_info.py b/plugins/modules/vmware_drs_group_info.py index d964b5527..ff1e0773a 100644 --- a/plugins/modules/vmware_drs_group_info.py +++ b/plugins/modules/vmware_drs_group_info.py @@ -25,7 +25,8 @@ description: - "Cluster to search for VM/Host groups." - "If set, information of DRS groups belonging this cluster will be returned." - - "Not needed if C(datacenter) is set." + - "Needed if O(datacenter) is not set." + - "O(cluster_name) and O(datacenter) are mutually exclusive parameters." required: false type: str datacenter: @@ -33,6 +34,8 @@ - datacenter_name description: - "Datacenter to search for DRS VM/Host groups." + - "Needed if O(cluster_name) is not set." + - "O(cluster_name) and O(datacenter) are mutually exclusive parameters." required: false type: str short_description: "Gathers info about DRS VM/Host groups on the given cluster" diff --git a/plugins/modules/vmware_drs_group_manager.py b/plugins/modules/vmware_drs_group_manager.py index 2fc842718..36d41819a 100644 --- a/plugins/modules/vmware_drs_group_manager.py +++ b/plugins/modules/vmware_drs_group_manager.py @@ -44,14 +44,16 @@ hosts: description: - A List of hosts to add / remove in the group. - - Required only if I(vms) is not set. + - Required if O(vms) is not set. + - O(hosts) and O(vms) are mutually exclusive parameters. required: false type: list elements: str vms: description: - A List of vms to add / remove in the group. - - Required only if I(hosts) is not set. + - Required if O(hosts) is not set. + - O(hosts) and O(vms) are mutually exclusive parameters. required: false type: list elements: str @@ -59,8 +61,8 @@ choices: [ present, absent ] default: present description: - - If set to C(present), VMs/hosts will be added to the given DRS group. - - If set to C(absent), VMs/hosts will be removed from the given DRS group. + - If set to V(present), VMs/hosts will be added to the given DRS group. + - If set to V(absent), VMs/hosts will be removed from the given DRS group. type: str ''' diff --git a/plugins/modules/vmware_drs_rule_info.py b/plugins/modules/vmware_drs_rule_info.py index b401c2b26..df7d9a5a9 100644 --- a/plugins/modules/vmware_drs_rule_info.py +++ b/plugins/modules/vmware_drs_rule_info.py @@ -23,13 +23,13 @@ description: - Name of the cluster. - DRS information for the given cluster will be returned. - - This is required parameter if C(datacenter) parameter is not provided. + - This is required parameter if O(datacenter) parameter is not provided. type: str datacenter: description: - Name of the datacenter. - DRS information for all the clusters from the given datacenter will be returned. - - This is required parameter if C(cluster_name) parameter is not provided. + - This is required parameter if O(cluster_name) parameter is not provided. type: str extends_documentation_fragment: - community.vmware.vmware.documentation diff --git a/plugins/modules/vmware_dvs_portgroup.py b/plugins/modules/vmware_dvs_portgroup.py index 83cd59f25..46d4ea1ea 100644 --- a/plugins/modules/vmware_dvs_portgroup.py +++ b/plugins/modules/vmware_dvs_portgroup.py @@ -33,9 +33,9 @@ vlan_id: description: - The VLAN ID that should be configured with the portgroup, use 0 for no VLAN. - - 'If C(vlan_trunk) is configured to be I(true), this can be a combination of multiple ranges and numbers, example: 1-200, 205, 400-4094.' - - The valid C(vlan_id) range is from 0 to 4094. Overlapping ranges are allowed. - - 'If C(vlan_private) is configured to be I(true), the corresponding private VLAN should already be configured in the distributed vSwitch.' + - 'If O(vlan_trunk=true), this can be a combination of multiple ranges and numbers, example: 1-200, 205, 400-4094.' + - The valid range is from 0 to 4094. Overlapping ranges are allowed. + - 'If O(vlan_private=true), the corresponding private VLAN should already be configured in the distributed vSwitch.' required: true type: str num_ports: @@ -54,9 +54,9 @@ port_allocation: description: - Elastic port groups automatically increase or decrease the number of ports as needed. - - Only valid if I(port_binding) is set to C(static). - - Will be C(elastic) if not specified and I(port_binding) is set to C(static). - - Will be C(fixed) if not specified and I(port_binding) is set to C(ephemeral). + - Only valid if O(port_binding=static). + - Will be V(elastic) if not specified and O(port_binding=static). + - Will be V(fixed) if not specified and O(port_binding=ephemeral). type: str choices: - 'elastic' @@ -72,14 +72,14 @@ vlan_trunk: description: - Indicates whether this is a VLAN trunk or not. - - Mutually exclusive with C(vlan_private) parameter. + - Mutually exclusive with O(vlan_private) parameter. required: false default: false type: bool vlan_private: description: - Indicates whether this is for a private VLAN or not. - - Mutually exclusive with C(vlan_trunk) parameter. + - Mutually exclusive with O(vlan_trunk) parameter. required: false default: false type: bool @@ -117,13 +117,13 @@ required: true promiscuous: type: bool - description: Indicates whether promiscuous mode is allowed. Ignored if C(inherited) is true. + description: Indicates whether promiscuous mode is allowed. Ignored if O(network_policy.inherited=true). forged_transmits: type: bool - description: Indicates whether forged transmits are allowed. Ignored if C(inherited) is true. + description: Indicates whether forged transmits are allowed. Ignored if O(network_policy.inherited=true). mac_changes: type: bool - description: Indicates whether mac changes are allowed. Ignored if C(inherited) is true. + description: Indicates whether mac changes are allowed. Ignored if O(network_policy.inherited=true). required: false type: dict teaming_policy: @@ -133,7 +133,6 @@ load_balance_policy: description: - Network adapter teaming policy. - - C(loadbalance_loadbased) is available from version 2.6 and onwards. default: 'loadbalance_srcid' type: str choices: @@ -273,22 +272,22 @@ type: bool description: - Indicates whether ingress traffic shaping is activated or not. - - Ignored if C(inherited) is true. + - Ignored if O(in_traffic_shaping.inherited=true). average_bandwidth: type: int description: - Establishes the number of bits per second to allow across a port, averaged over time, that is, the allowed average load. - - Ignored if C(inherited) is true. + - Ignored if O(in_traffic_shaping.inherited=true). burst_size: type: int description: - The maximum number of bits per second to allow across a port when it is sending/sending or receiving a burst of traffic. - - Ignored if C(inherited) is true. + - Ignored if O(in_traffic_shaping.inherited=true). peak_bandwidth: type: int description: - The maximum number of bytes to allow in a burst. - - Ignored if C(inherited) is true. + - Ignored if O(in_traffic_shaping.inherited=true). required: false type: dict version_added: '2.3.0' @@ -305,22 +304,22 @@ type: bool description: - Indicates whether egress traffic shaping is activated or not. - - Ignored if C(inherited) is true. + - Ignored if O(out_traffic_shaping.inherited=true). average_bandwidth: type: int description: - Establishes the number of bits per second to allow across a port, averaged over time, that is, the allowed average load. - - Ignored if C(inherited) is true. + - Ignored if O(out_traffic_shaping.inherited=true). burst_size: type: int description: - The maximum number of bits per second to allow across a port when it is sending/sending or receiving a burst of traffic. - - Ignored if C(inherited) is true. + - Ignored if O(out_traffic_shaping.inherited=true). peak_bandwidth: type: int description: - The maximum number of bytes to allow in a burst. - - Ignored if C(inherited) is true. + - Ignored if O(out_traffic_shaping.inherited=true). required: false type: dict version_added: '2.3.0' diff --git a/plugins/modules/vmware_dvs_portgroup_find.py b/plugins/modules/vmware_dvs_portgroup_find.py index f47edb0de..1af2eb0d0 100644 --- a/plugins/modules/vmware_dvs_portgroup_find.py +++ b/plugins/modules/vmware_dvs_portgroup_find.py @@ -36,7 +36,7 @@ show_uplink: description: - Show or hide uplink portgroups. - - Only relevant when C(vlanid) is supplied. + - Only relevant when O(vlanid) is supplied. type: bool default: false extends_documentation_fragment: diff --git a/plugins/modules/vmware_dvswitch.py b/plugins/modules/vmware_dvswitch.py index 1d184b2dc..2315597fc 100644 --- a/plugins/modules/vmware_dvswitch.py +++ b/plugins/modules/vmware_dvswitch.py @@ -26,8 +26,8 @@ datacenter_name: description: - The name of the datacenter that will contain the Distributed Switch. - - This parameter is optional, if C(folder) is provided. - - Mutually exclusive with C(folder) parameter. + - Required if O(folder) is not provided. + - Mutually exclusive with O(folder) parameter. required: false aliases: ['datacenter'] type: str @@ -42,22 +42,21 @@ - The version of the Distributed Switch to create. - 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 C(state) is set to C(present). + - Required if O(state=present). aliases: ['version'] type: str mtu: description: - The switch maximum transmission unit. - - Required parameter for C(state) both C(present) and C(absent), before Ansible 2.6 version. - - Required only if C(state) is set to C(present), for Ansible 2.6 and onwards. + - Required if O(state=present). - Accepts value between 1280 to 9000 (both inclusive). type: int default: 1500 multicast_filtering_mode: description: - The multicast filtering mode. - - 'C(basic) mode: multicast traffic for virtual machines is forwarded according to the destination MAC address of the multicast group.' - - 'C(snooping) mode: the Distributed Switch provides IGMP and MLD snooping according to RFC 4541.' + - 'V(basic) mode: multicast traffic for virtual machines is forwarded according to the destination MAC address of the multicast group.' + - 'V(snooping) mode: the Distributed Switch provides IGMP and MLD snooping according to RFC 4541.' type: str choices: ['basic', 'snooping'] default: 'basic' @@ -65,8 +64,7 @@ description: - 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 C(state) both C(present) and C(absent), before Ansible 2.6 version. - - Required only if C(state) is set to C(present), for Ansible 2.6 and onwards. + - Required if O(state=present). type: int uplink_prefix: description: @@ -78,11 +76,10 @@ discovery_proto: description: - Link discovery protocol between Cisco and Link Layer discovery. - - Required parameter for C(state) both C(present) and C(absent), before Ansible 2.6 version. - - Required only if C(state) is set to C(present), for Ansible 2.6 and onwards. - - 'C(cdp): Use Cisco Discovery Protocol (CDP).' - - 'C(lldp): Use Link Layer Discovery Protocol (LLDP).' - - 'C(disabled): Do not use a discovery protocol.' + - Required if O(state=present). + - 'V(cdp): Use Cisco Discovery Protocol (CDP).' + - 'V(lldp): Use Link Layer Discovery Protocol (LLDP).' + - 'V(disabled): Do not use a discovery protocol.' choices: ['cdp', 'lldp', 'disabled'] default: 'cdp' aliases: [ 'discovery_protocol' ] @@ -90,8 +87,7 @@ discovery_operation: description: - Select the discovery operation. - - Required parameter for C(state) both C(present) and C(absent), before Ansible 2.6 version. - - Required only if C(state) is set to C(present), for Ansible 2.6 and onwards. + - Required if O(state=present). choices: ['both', 'advertise', 'listen'] default: 'listen' type: str @@ -162,8 +158,8 @@ type: dict state: description: - - If set to C(present) and the Distributed Switch does not exist, the Distributed Switch will be created. - - If set to C(absent) and the Distributed Switch exists, the Distributed Switch will be deleted. + - If set to V(present) and the Distributed Switch does not exist, the Distributed Switch will be created. + - If set to V(absent) and the Distributed Switch exists, the Distributed Switch will be deleted. default: 'present' choices: ['present', 'absent'] type: str @@ -172,7 +168,8 @@ - Destination folder, absolute path to place dvswitch in. - The folder should include the datacenter. - This parameter is case sensitive. - - This parameter is optional, if C(datacenter) is provided. + - Required if O(datacenter) is not provided. + - Mutually exclusive with O(datacenter) parameter. - 'Examples:' - ' folder: /datacenter1/network' - ' folder: datacenter1/network' diff --git a/plugins/modules/vmware_dvswitch_info.py b/plugins/modules/vmware_dvswitch_info.py index 5cba227c8..b4fa9c7c3 100644 --- a/plugins/modules/vmware_dvswitch_info.py +++ b/plugins/modules/vmware_dvswitch_info.py @@ -34,7 +34,7 @@ switch_name: description: - Name of a dvswitch to look for. - - If C(switch_name) not specified gather all dvswitch information. + - If O(switch_name) not specified gather all dvswitch information. aliases: ['switch', 'dvswitch'] required: false type: str @@ -59,7 +59,7 @@ - ' "config.maxMtu",' - ' "overallStatus"' - ' ]' - - Only valid when C(schema) is C(vsphere). + - Only valid when O(schema=vsphere). type: list elements: str required: false diff --git a/plugins/modules/vmware_dvswitch_lacp.py b/plugins/modules/vmware_dvswitch_lacp.py index 7e86b96a6..8ac7b491d 100644 --- a/plugins/modules/vmware_dvswitch_lacp.py +++ b/plugins/modules/vmware_dvswitch_lacp.py @@ -29,14 +29,14 @@ support_mode: description: - The LACP support mode. - - 'C(basic): One Link Aggregation Control Protocol group in the switch (singleLag).' - - 'C(enhanced): Multiple Link Aggregation Control Protocol groups in the switch (multipleLag).' + - 'V(basic): One Link Aggregation Control Protocol group in the switch (singleLag).' + - 'V(enhanced): Multiple Link Aggregation Control Protocol groups in the switch (multipleLag).' type: str default: 'basic' choices: ['basic', 'enhanced'] link_aggregation_groups: description: - - Can only be used if C(lacp_support) is set to C(enhanced). + - Can only be used if O(support_mode=enhanced). suboptions: name: type: str diff --git a/plugins/modules/vmware_dvswitch_nioc.py b/plugins/modules/vmware_dvswitch_nioc.py index b0ee71abc..6f3d182f7 100644 --- a/plugins/modules/vmware_dvswitch_nioc.py +++ b/plugins/modules/vmware_dvswitch_nioc.py @@ -77,7 +77,7 @@ shares: description: - The number of shares allocated. - - Ignored unless C(shares_level) is "custom". + - Ignored unless O(resources.shares_level=custom). type: int required: false type: list diff --git a/plugins/modules/vmware_dvswitch_pvlans.py b/plugins/modules/vmware_dvswitch_pvlans.py index ed84a2116..a767af52b 100644 --- a/plugins/modules/vmware_dvswitch_pvlans.py +++ b/plugins/modules/vmware_dvswitch_pvlans.py @@ -27,10 +27,10 @@ primary_pvlans: description: - A list of VLAN IDs that should be configured as Primary PVLANs. - - If C(primary_pvlans) isn't specified, all PVLANs will be deleted if present. + - If not 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 C(secondary_pvlans) isn't specified, the primary PVLANs and each secondary promiscuous PVLAN will be created. + - If O(secondary_pvlans) isn't specified, the primary PVLANs and each secondary promiscuous PVLAN will be created. - Please see examples for more information. type: list default: [] @@ -38,8 +38,8 @@ secondary_pvlans: description: - A list of VLAN IDs that should be configured as Secondary PVLANs. - - 'C(primary_pvlans) need to be specified to create any Secondary PVLAN.' - - If C(primary_pvlans) isn't specified, all PVLANs will be deleted if present. + - 'O(primary_pvlans) need to be specified to create any Secondary PVLAN.' + - If O(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. diff --git a/plugins/modules/vmware_evc_mode.py b/plugins/modules/vmware_evc_mode.py index 11f9b73ba..054a27def 100644 --- a/plugins/modules/vmware_evc_mode.py +++ b/plugins/modules/vmware_evc_mode.py @@ -34,7 +34,7 @@ - cluster evc_mode: description: - - Required for C(state=present). + - Required for O(state=present). - The EVC mode to enable or disable on the cluster. (intel-broadwell, intel-nehalem, intel-merom, etc.). type: str state: diff --git a/plugins/modules/vmware_export_ovf.py b/plugins/modules/vmware_export_ovf.py index d447ea983..dc3b00bca 100644 --- a/plugins/modules/vmware_export_ovf.py +++ b/plugins/modules/vmware_export_ovf.py @@ -23,17 +23,17 @@ name: description: - Name of the virtual machine to export. - - This is a required parameter, if parameter C(uuid) or C(moid) is not supplied. + - This is a required parameter, if parameter O(uuid) or O(moid) is not supplied. type: str uuid: description: - Uuid of the virtual machine to export. - - This is a required parameter, if parameter C(name) or C(moid) is not supplied. + - This is a required parameter, if parameter O(name) or O(moid) is not supplied. type: str moid: description: - 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 C(name) or C(uuid) is not supplied. + - This is required if O(name) or O(uuid) is not supplied. type: str datacenter: default: ha-datacenter diff --git a/plugins/modules/vmware_folder_info.py b/plugins/modules/vmware_folder_info.py index fd99d782b..569832fd0 100644 --- a/plugins/modules/vmware_folder_info.py +++ b/plugins/modules/vmware_folder_info.py @@ -17,8 +17,6 @@ - The module can be used to gather a hierarchical view of the folders that exist within a datacenter author: - David Hewitt (@davidmhewitt) -notes: -- C(flat_folder_info) added in VMware collection 1.4.0. options: datacenter: description: diff --git a/plugins/modules/vmware_guest.py b/plugins/modules/vmware_guest.py index 0db8fe099..eafa2a65b 100644 --- a/plugins/modules/vmware_guest.py +++ b/plugins/modules/vmware_guest.py @@ -35,36 +35,35 @@ - Use SCSI disks instead of IDE when you want to expand online disks by specifying a SCSI controller. - Uses SysPrep for Windows VM (depends on 'guest_id' parameter match 'win') with PyVmomi. - In order to change the VM's parameters (e.g. number of CPUs), the VM must be powered off unless the hot-add - support is enabled and the C(state=present) must be used to apply the changes. + support is enabled and the O(state=present) must be used to apply the changes. - "For additional information please visit Ansible VMware community wiki - U(https://github.com/ansible/community/wiki/VMware)." options: state: description: - Specify the state the virtual machine should be in. - - If C(state) is set to C(present) and virtual machine exists, ensure the virtual machine configurations conforms to task arguments. - - If C(state) is set to C(absent) and virtual machine exists, then the specified virtual machine is removed with it's associated components. - - If C(state) is set to one of the following C(poweredon), C(powered-on), C(poweredoff), C(powered-off), - C(present), C(restarted), C(suspended) and virtual machine does not exists, virtual machine is deployed with the given parameters. - - If C(state) is set to C(poweredon) or C(powered-on) and virtual machine exists with powerstate other than powered on, + - If V(present) and virtual machine exists, ensure the virtual machine configurations conforms to task arguments. + - If V(absent) and virtual machine exists, then the specified virtual machine is removed with it's associated components. + - If set to one of V(poweredon), V(powered-on), V(poweredoff), V(powered-off), + V(present), V(restarted), V(suspended) and virtual machine does not exists, virtual machine is deployed with the given parameters. + - If set to V(poweredon) or V(powered-on) and virtual machine exists with powerstate other than powered on, then the specified virtual machine is powered on. - - If C(state) is set to C(poweredoff) or C(powered-off) and virtual machine exists with powerstate other than powered off, + - If set to V(poweredoff) or V(powered-off) and virtual machine exists with powerstate other than powered off, then the specified virtual machine is powered off. - - If C(state) is set to C(restarted) and virtual machine exists, then the virtual machine is restarted. - - If C(state) is set to C(suspended) and virtual machine exists, then the virtual machine is set to suspended mode. - - If C(state) is set to C(shutdownguest) or C(shutdown-guest) and virtual machine exists, then the virtual machine is shutdown. - - If C(state) is set to C(rebootguest) or C(reboot-guest) and virtual machine exists, then the virtual machine is rebooted. - - Powerstate C(powered-on) and C(powered-off) is added in version 2.10. + - If set to V(restarted) and virtual machine exists, then the virtual machine is restarted. + - If set to V(suspended) and virtual machine exists, then the virtual machine is set to suspended mode. + - If set to V(shutdownguest) or V(shutdown-guest) and virtual machine exists, then the virtual machine is shutdown. + - If set to V(rebootguest) or V(reboot-guest) and virtual machine exists, then the virtual machine is rebooted. default: present type: str choices: [ absent, poweredon, powered-on, poweredoff, powered-off, present, rebootguest, reboot-guest, restarted, suspended, shutdownguest, shutdown-guest] name: description: - Name of the virtual machine to work with. - - Virtual machine names in vCenter are not necessarily unique, which may be problematic, see C(name_match). - - If multiple virtual machines with same name exists, then C(folder) is required parameter to + - Virtual machine names in vCenter are not necessarily unique, which may be problematic, see O(name_match). + - If multiple virtual machines with same name exists, then O(folder) is required parameter to identify uniqueness of the virtual machine. - - This parameter is required, if C(state) is set to C(poweredon), C(powered-on), C(poweredoff), C(powered-off), - C(present), C(restarted), C(suspended) and virtual machine does not exists. + - This parameter is required, if O(state=poweredon), O(state=powered-on), O(state=poweredoff), O(state=powered-off), + O(state=present), O(state=restarted), O(state=suspended) and virtual machine does not exists. - This parameter is case sensitive. type: str name_match: @@ -76,7 +75,7 @@ uuid: description: - UUID of the virtual machine to manage if known, this is VMware's unique identifier. - - This is required if C(name) is not supplied. + - This is required if O(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. type: str @@ -110,7 +109,7 @@ - "The folder should include the datacenter. ESXi's datacenter is ha-datacenter." - This parameter is case sensitive. - 'If multiple machines are found with same name, this parameter is used to identify' - - 'uniqueness of the virtual machine. Added in Ansible 2.5.' + - 'uniqueness of the virtual machine.' - 'Examples:' - ' folder: /ha-datacenter/vm' - ' folder: ha-datacenter/vm' @@ -145,8 +144,8 @@ type: int description: - Number of CPUs. - - C(num_cpus) must be a multiple of C(num_cpu_cores_per_socket). - - For example, to create a VM with 2 sockets of 4 cores, specify C(num_cpus) as 8 and C(num_cpu_cores_per_socket) as 4. + - Must be a multiple of O(hardware.num_cpu_cores_per_socket). + - For example, to create a VM with 2 sockets of 4 cores, specify O(hardware.num_cpus) as 8 and O(hardware.num_cpu_cores_per_socket) as 4. num_cpu_cores_per_socket: type: int description: Number of Cores Per Socket. @@ -155,7 +154,6 @@ choices: [ 'low', 'normal', 'high', 'custom' ] description: - The allocation level of CPU resources for the virtual machine. - - Valid Values are C(low), C(normal), C(high) and C(custom). version_added: '3.2.0' cpu_shares: type: int @@ -170,8 +168,8 @@ scsi: type: str description: - - Valid values are C(buslogic), C(lsilogic), C(lsilogicsas) and C(paravirtual). - - C(paravirtual) is default. + - Valid values are V(buslogic), V(lsilogic), V(lsilogicsas) and V(paravirtual). + - V(paravirtual) is default. choices: [ 'buslogic', 'lsilogic', 'lsilogicsas', 'paravirtual' ] secure_boot: type: bool @@ -179,7 +177,7 @@ memory_reservation_lock: type: bool description: - - If set C(true), memory resource reservation for the virtual machine. + - If set V(true), memory resource reservation for the virtual machine. max_connections: type: int description: @@ -197,7 +195,6 @@ type: str description: - The allocation level of memory resources for the virtual machine. - - Valid Values are C(low), C(normal), C(high) and C(custom). choices: [ 'low', 'normal', 'high', 'custom' ] version_added: '3.2.0' mem_shares: @@ -219,8 +216,7 @@ description: - The Virtual machine hardware versions. - Default is 10 (ESXi 5.5 and onwards). - - If set to C(latest), the specified virtual machine will be upgraded to the most current hardware version supported on the host. - - C(latest) is added in Ansible 2.10. + - If set to V(latest), the specified virtual machine will be upgraded to the most current hardware version supported on the host. - 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. boot_firmware: @@ -263,9 +259,6 @@ description: - Set the guest ID. - This parameter is case sensitive. - - C(rhel7_64Guest) for virtual machine with RHEL7 64 bit. - - C(centos64Guest) for virtual machine with CentOS 64 bit. - - C(ubuntu64Guest) for virtual machine with Ubuntu 64 bit. - This field is required when creating a virtual machine, not required when creating from the template. - > Valid values are referenced here: @@ -276,8 +269,8 @@ - This parameter is case sensitive. - Shrinking disks is not supported. - Removing existing disks of the virtual machine is not supported. - - 'Attributes C(controller_type), C(controller_number), C(unit_number) are used to configure multiple types of disk - controllers and disks for creating or reconfiguring virtual machine. Added in Ansible 2.10.' + - 'Attributes O(disk.controller_type), O(disk.controller_number), O(disk.unit_number) are used to configure multiple types of disk + controllers and disks for creating or reconfiguring virtual machine.' type: list default: [] elements: dict @@ -302,8 +295,6 @@ type: description: - Type of disk. - - If C(thin) specified, disk type is set to thin disk. - - If C(eagerzeroedthick) specified, disk type is set to eagerzeroedthick disk. Added Ansible 2.5. - If not specified, disk type is inherited from the source VM or template when cloned and thick disk, no eagerzero otherwise. type: str choices: [ 'thin', 'thick', 'eagerzeroedthick' ] @@ -311,37 +302,35 @@ type: str description: - The name of datastore which will be used for the disk. - - If C(autoselect_datastore) is set to True, will select the less used datastore whose name contains this "disk.datastore" string. + - If O(disk.autoselect_datastore) is set to True, will select the less used datastore whose name contains this "disk.datastore" string. filename: type: str description: - Existing disk image to be used. - Filename must already exist on the datastore. - - Specify filename string in C([datastore_name] path/to/file.vmdk) format. Added in Ansible 2.8. + - Specify filename string in C([datastore_name] path/to/file.vmdk) format. autoselect_datastore: type: bool description: - Select the less used datastore. - - C(disk.datastore) and C(disk.autoselect_datastore) will not be used if C(datastore) is specified outside this C(disk) configuration. + - O(disk.datastore) and O(disk.autoselect_datastore) will not be used if O(datastore) is specified outside this O(disk) configuration. disk_mode: type: str choices: ['persistent', 'independent_persistent', 'independent_nonpersistent'] description: - Type of disk mode. - - Added in Ansible 2.6. - - If C(persistent) specified, changes are immediately and permanently written to the virtual disk. This is default. - - If C(independent_persistent) specified, same as persistent, but not affected by snapshots. - - If C(independent_nonpersistent) specified, changes to virtual disk are made to a redo log and discarded at power off, + - If V(persistent) specified, changes are immediately and permanently written to the virtual disk. This is default. + - If V(independent_persistent) specified, same as persistent, but not affected by snapshots. + - If V(independent_nonpersistent) specified, changes to virtual disk are made to a redo log and discarded at power off, but not affected by snapshots. controller_type: type: str choices: ['buslogic', 'lsilogic', 'lsilogicsas', 'paravirtual', 'sata', 'nvme'] description: - Type of disk controller. - - C(nvme) controller type support starts on ESXi 6.5 with VM hardware version C(version) 13. Set this type on not supported ESXi or VM hardware version will lead to failure in deployment. - - When set to C(sata), please make sure C(unit_number) is correct and not used by SATA CDROMs. - - If set to C(sata) type, please make sure C(controller_number) and C(unit_number) are set correctly when C(cdrom) also set to C(sata) type. + - When set to V(sata), please make sure O(disk.unit_number) is correct and not used by SATA CDROMs. + - If set to V(sata) type, please make sure O(disk.controller_number) and O(disk.unit_number) are set correctly when O(cdrom=sata). controller_number: type: int choices: [0, 1, 2, 3] @@ -355,9 +344,9 @@ - Valid value range from 0 to 15 for SCSI controller, except 7. - Valid value range from 0 to 14 for NVME controller. - Valid value range from 0 to 29 for SATA controller. - - C(controller_type), C(controller_number) and C(unit_number) are required when creating or reconfiguring VMs + - O(disk.controller_type), O(disk.controller_number) and O(disk.unit_number) are required when creating or reconfiguring VMs with multiple types of disk controllers and disks. - - When creating new VM, the first configured disk in the C(disk) list will be "Hard Disk 1". + - When creating new VM, the first configured disk in the O(disk) list will be "Hard Disk 1". nvdimm: description: - Add or remove a virtual NVDIMM device to the virtual machine. @@ -372,8 +361,7 @@ state: type: str description: - - Valid value is C(present) or C(absent). - - If set to C(absent), then the NVDIMM device with specified C(label) will be removed. + - If set to V(absent), then the NVDIMM device with specified O(nvdimm.label) will be removed. choices: ['present', 'absent'] size_mb: type: int @@ -383,12 +371,12 @@ type: str description: - The label of the virtual NVDIMM device to be removed or configured, e.g., "NVDIMM 1". - - 'This parameter is required when C(state) is set to C(absent), or C(present) to reconfigure NVDIMM device - size. When add a new device, please do not set C(label).' + - 'This parameter is required when O(nvdimm.state=absent), or O(nvdimm.state=present) to reconfigure NVDIMM device + size. When add a new device, please do not set.' cdrom: description: - A list of CD-ROM configurations for the virtual machine. - - For C(ide) controller, hot-add or hot-remove CD-ROM is not supported. + - For V(ide) controller, hot-add or hot-remove CD-ROM is not supported. type: list default: [] elements: dict @@ -397,35 +385,35 @@ type: str description: - The type of CD-ROM. - - With C(none) the CD-ROM will be disconnected but present. + - With V(none) the CD-ROM will be disconnected but present. choices: [ 'none', 'client', 'iso' ] default: client iso_path: type: str description: - The datastore path to the ISO file to use, in the form of C([datastore1] path/to/file.iso). - - Required if type is set C(iso). + - Required if type is set V(iso). controller_type: type: str description: - - When set to C(sata), please make sure C(unit_number) is correct and not used by SATA disks. + - When set to V(sata), please make sure O(cdrom.unit_number) is correct and not used by SATA disks. choices: [ 'ide', 'sata' ] default: ide controller_number: type: int description: - - For C(ide) controller, valid value is 0 or 1. - - For C(sata) controller, valid value is 0 to 3. + - For O(cdrom.controller_type=ide), valid value is 0 or 1. + - For O(cdrom.controller_type=sata), valid value is 0 to 3. unit_number: type: int description: - - For CD-ROM device attach to C(ide) controller, valid value is 0 or 1. - - For CD-ROM device attach to C(sata) controller, valid value is 0 to 29. - - C(controller_number) and C(unit_number) are mandatory attributes. + - For O(cdrom.controller_type=ide), valid value is 0 or 1. + - For O(cdrom.controller_type=sata), valid value is 0 to 29. + - O(cdrom.controller_number) and O(cdrom.unit_number) are mandatory attributes. state: type: str description: - - If set to C(absent), then the specified CD-ROM will be removed. + - If set to V(absent), then the specified CD-ROM will be removed. choices: [ 'present', 'absent' ] default: present resource_pool: @@ -458,12 +446,12 @@ - Wait until vCenter detects all guest customizations as successfully completed. - When enabled, the VM will automatically be powered on. - "If vCenter does not detect guest customization start or succeed, failed events after time - C(wait_for_customization_timeout) parameter specified, warning message will be printed and task result is fail." + O(wait_for_customization_timeout) parameter specified, warning message will be printed and task result is fail." default: false type: bool state_change_timeout: description: - - If the C(state) is set to C(shutdownguest), by default the module will return immediately after sending the shutdown signal. + - If the O(state=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: 0 @@ -472,12 +460,12 @@ description: - 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 C(linked_clone) parameter, this parameter is required. + - While creating linked clone using O(linked_clone) parameter, this parameter is required. type: str linked_clone: description: - Whether to create a linked clone from the snapshot specified. - - If specified, then C(snapshot_src) is required parameter. + - If specified, then O(snapshot_src) is required parameter. default: false type: bool force: @@ -486,7 +474,7 @@ - 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 C(state) is set to C(absent).' + This is specifically the case for removing a powered on the virtual machine when O(state=absent).' default: false type: bool delete_from_inventory: @@ -503,21 +491,21 @@ cluster: description: - The cluster name where the virtual machine will run. - - This is a required parameter, if C(esxi_hostname) is not set. - - C(esxi_hostname) and C(cluster) are mutually exclusive parameters. + - This is a required parameter, if O(esxi_hostname) is not set. + - O(esxi_hostname) and O(cluster) are mutually exclusive parameters. - This parameter is case sensitive. type: str esxi_hostname: description: - The ESXi hostname where the virtual machine will run. - - This is a required parameter, if C(cluster) is not set. - - C(esxi_hostname) and C(cluster) are mutually exclusive parameters. + - This is a required parameter, if O(cluster) is not set. + - O(esxi_hostname) and O(cluster) are mutually exclusive parameters. - This parameter is case sensitive. type: str advanced_settings: description: - Define a list of advanced settings to be added to the VMX config. - - An advanced settings object takes two fields C(key) and C(value). + - An advanced settings object takes the two fields C(key) and C(value). - Incorrect key and values will be ignored. elements: dict type: list @@ -530,7 +518,7 @@ customvalues: description: - Define a list of custom values to set on virtual machine. - - A custom value object takes two fields C(key) and C(value). + - A custom value object takes the two fields C(key) and C(value). - Incorrect key and values will be ignored. elements: dict type: list @@ -552,7 +540,7 @@ description: - Name of the portgroup or distributed virtual portgroup for this interface. - Required per entry. - - When specifying distributed virtual portgroup make sure given C(esxi_hostname) or C(cluster) is associated with it. + - When specifying distributed virtual portgroup make sure given O(esxi_hostname) or O(cluster) is associated with it. vlan: type: int description: @@ -636,7 +624,7 @@ existing_vm: type: bool description: - - If set to C(true), do OS customization on the specified virtual machine directly. + - If set to V(true), do OS customization on the specified virtual machine directly. - Common for Linux and Windows customization. dns_servers: type: list @@ -660,7 +648,7 @@ type: str description: - Computer hostname. - - Default is shortened C(name) parameter. + - Default is shortened O(name) parameter. - Allowed characters are alphanumeric (uppercase and lowercase) and minus, rest of the characters are dropped as per RFC 952. - Common for Linux and Windows customization. timezone: @@ -693,19 +681,19 @@ description: - Number of autologon after reboot. - Specific to Windows customization. - - Ignored if C(autologon) is unset or set to C(false). + - Ignored if O(customization.autologon) is unset or set to O(customization.autologon=false). - If unset, 1 will be used. domainadmin: type: str description: - User used to join in AD domain. - - Required if C(joindomain) specified. + - Required if O(customization.joindomain) specified. - Specific to Windows customization. domainadminpassword: type: str description: - Password used to join in AD domain. - - Required if C(joindomain) specified. + - Required if O(customization.joindomain) specified. - Specific to Windows customization. fullname: type: str @@ -717,13 +705,13 @@ type: str description: - AD domain to join. - - Not compatible with C(joinworkgroup). + - Not compatible with O(customization.joinworkgroup). - Specific to Windows customization. joinworkgroup: type: str description: - Workgroup to join. - - Not compatible with C(joindomain). + - Not compatible with O(customization.joindomain). - Specific to Windows customization. - If unset, "WORKGROUP" will be used as a fall-back. orgname: @@ -780,12 +768,12 @@ description: - Unique name identifying the requested customization specification. - This parameter is case sensitive. - - If set, then overrides C(customization) parameter values. + - If set, then overrides O(customization) parameter values. type: str datastore: description: - Specify datastore or datastore cluster to provision virtual machine. - - This parameter takes precedence over C(disk.datastore) parameter. + - This parameter takes precedence over O(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. diff --git a/plugins/modules/vmware_guest_boot_info.py b/plugins/modules/vmware_guest_boot_info.py index f440d3704..711488e80 100644 --- a/plugins/modules/vmware_guest_boot_info.py +++ b/plugins/modules/vmware_guest_boot_info.py @@ -22,17 +22,17 @@ name: description: - Name of the VM to work with. - - This is required if C(uuid) or C(moid) parameter is not supplied. + - This is required if O(uuid) or O(moid) parameter is not supplied. type: str uuid: description: - UUID of the instance to manage if known, this is VMware's BIOS UUID by default. - - This is required if C(name) or C(moid) parameter is not supplied. + - This is required if O(name) or O(moid) parameter is not supplied. type: str moid: description: - 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 C(name) or C(uuid) is not supplied. + - This is required if O(name) or O(uuid) is not supplied. type: str use_instance_uuid: description: diff --git a/plugins/modules/vmware_guest_boot_manager.py b/plugins/modules/vmware_guest_boot_manager.py index 63be3ae0c..ad89e6aed 100644 --- a/plugins/modules/vmware_guest_boot_manager.py +++ b/plugins/modules/vmware_guest_boot_manager.py @@ -22,17 +22,17 @@ name: description: - Name of the VM to work with. - - This is required if C(uuid) or C(moid) parameter is not supplied. + - This is required if O(uuid) or O(moid) parameter is not supplied. type: str uuid: description: - UUID of the instance to manage if known, this is VMware's BIOS UUID by default. - - This is required if C(name) or C(moid) parameter is not supplied. + - This is required if O(name) or O(moid) parameter is not supplied. type: str moid: description: - 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 C(name) or C(uuid) is not supplied. + - This is required if O(name) or O(uuid) is not supplied. type: str use_instance_uuid: description: @@ -63,18 +63,18 @@ type: int enter_bios_setup: description: - - If set to C(true), the virtual machine automatically enters BIOS setup the next time it boots. + - If set to V(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. type: 'bool' boot_retry_enabled: description: - - If set to C(true), the virtual machine that fails to boot, will try to boot again after C(boot_retry_delay) is expired. - - If set to C(false), the virtual machine waits indefinitely for user intervention. + - If set to V(true), the virtual machine that fails to boot, will try to boot again after O(boot_retry_delay) is expired. + - If set to V(false), the virtual machine waits indefinitely for user intervention. type: 'bool' boot_retry_delay: description: - Specify the time in milliseconds between virtual machine boot failure and subsequent attempt to boot again. - - If set, will automatically set C(boot_retry_enabled) to C(true) as this parameter is required. + - If set, will automatically set O(boot_retry_enabled=true) as this parameter is required. type: int boot_firmware: description: diff --git a/plugins/modules/vmware_guest_controller.py b/plugins/modules/vmware_guest_controller.py index 85b7d3438..df92a9a05 100644 --- a/plugins/modules/vmware_guest_controller.py +++ b/plugins/modules/vmware_guest_controller.py @@ -23,17 +23,17 @@ name: description: - Name of the virtual machine. - - This is a required parameter, if parameter C(uuid) or C(moid) is not supplied. + - This is a required parameter, if parameter O(uuid) or O(moid) is not supplied. type: str uuid: description: - UUID of the instance to gather facts if known, this is VMware's unique identifier. - - This is a required parameter, if parameter C(name) or C(moid) is not supplied. + - This is a required parameter, if parameter O(name) or O(moid) is not supplied. type: str moid: description: - 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 C(name) or C(uuid) is not supplied. + - This is required if O(name) or O(uuid) is not supplied. type: str folder: description: @@ -70,8 +70,8 @@ suboptions: controller_number: description: - - Disk controller bus number. When C(state) is set to C(absent), this parameter is required. - - When C(type) set to C(usb2) or C(usb3), this parameter is not required. + - Disk controller bus number. When O(controllers.state=absent), this parameter is required. + - When O(controllers.type=usb2) or O(controllers.type=usb3), this parameter is not required. type: int choices: - 0 @@ -81,7 +81,7 @@ type: description: - Type of disk or USB controller. - - From vSphere 6.5 and virtual machine with hardware version 13, C(nvme) controller starts to be supported. + - From vSphere 6.5 and virtual machine with hardware version 13, V(nvme) controller starts to be supported. required: true type: str choices: @@ -96,9 +96,9 @@ state: description: - Add new controller or remove specified existing controller. - - If C(state) is set to C(absent), the specified controller will be removed from virtual machine when there is no disk or device attaching to it. + - If set to V(absent), the specified controller will be removed from virtual machine when there is no disk or device attaching to it. - If specified controller is removed or not exist, no action will be taken only warning message. - - If C(state) is set to C(present), new controller with specified type will be added. + - If set to V(present), new controller with specified type will be added. - If the number of controller with specified controller type reaches it's maximum, no action will be taken only warning message. required: true type: str @@ -117,7 +117,7 @@ gather_disk_controller_facts: description: - Whether to collect existing disk and USB controllers facts only. - - When this parameter is set to C(true), C(controllers) parameter will be ignored. + - When this parameter is set to V(true), O(controllers) parameter will be ignored. type: bool default: false sleep_time: diff --git a/plugins/modules/vmware_guest_cross_vc_clone.py b/plugins/modules/vmware_guest_cross_vc_clone.py index 5da157081..8d7c4abac 100644 --- a/plugins/modules/vmware_guest_cross_vc_clone.py +++ b/plugins/modules/vmware_guest_cross_vc_clone.py @@ -22,17 +22,17 @@ name: description: - Name of the virtual machine or template. - - This is a required parameter, if parameter C(uuid) or C(moid) is not supplied. + - This is a required parameter, if parameter O(uuid) or O(moid) is not supplied. type: str uuid: description: - UUID of the vm/template instance to clone from, this is VMware's unique identifier. - - This is a required parameter, if parameter C(name) or C(moid) is not supplied. + - This is a required parameter, if parameter O(name) or O(moid) is not supplied. type: str moid: description: - Managed Object ID of the vm/template instance to manage if known, this is a unique identifier only within a single vCenter instance. - - This is required if C(name) or C(uuid) is not supplied. + - This is required if O(name) or O(uuid) is not supplied. type: str use_instance_uuid: description: @@ -103,10 +103,10 @@ state: description: - The state of Virtual Machine deployed. - - If set to C(present) and VM does not exists, then VM is created. - - If set to C(present) and VM exists, no action is taken. - - If set to C(poweredon) and VM does not exists, then VM is created with powered on state. - - If set to C(poweredon) and VM exists, no action is taken. + - If set to V(present) and VM does not exists, then VM is created. + - If set to V(present) and VM exists, no action is taken. + - If set to V(poweredon) and VM does not exists, then VM is created with powered on state. + - If set to V(poweredon) and VM exists, no action is taken. type: str required: false default: 'present' diff --git a/plugins/modules/vmware_guest_custom_attribute_defs.py b/plugins/modules/vmware_guest_custom_attribute_defs.py index c7fdec652..9ff05e412 100644 --- a/plugins/modules/vmware_guest_custom_attribute_defs.py +++ b/plugins/modules/vmware_guest_custom_attribute_defs.py @@ -22,16 +22,16 @@ attribute_key: description: - Name of the custom attribute definition. - - This is required parameter, if C(state) is set to C(present) or C(absent). + - This is required parameter, if O(state=present) or O(state=absent). required: false type: str state: description: - Manage definition of custom attributes. - - If set to C(present) and definition not present, then custom attribute definition is created. - - If set to C(present) and definition is present, then no action taken. - - If set to C(absent) and definition is present, then custom attribute definition is removed. - - If set to C(absent) and definition is absent, then no action taken. + - If set to V(present) and definition not present, then custom attribute definition is created. + - If set to V(present) and definition is present, then no action taken. + - If set to V(absent) and definition is present, then custom attribute definition is removed. + - If set to V(absent) and definition is absent, then no action taken. default: 'present' choices: ['present', 'absent'] type: str