diff --git a/docs/community.vmware.vcenter_domain_user_group_info_module.rst b/docs/community.vmware.vcenter_domain_user_group_info_module.rst index d331b0208..0ae526326 100644 --- a/docs/community.vmware.vcenter_domain_user_group_info_module.rst +++ b/docs/community.vmware.vcenter_domain_user_group_info_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vcenter_domain_user_group_info_module: -*********************************************** -community.vmware.vcenter_domain_user_group_info -*********************************************** +community.vmware.vcenter_domain_user_group_info module -- Gather user or group information of a domain +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Gather user or group information of a domain** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vcenter_domain_user_group_info`. .. contents:: @@ -16,279 +17,270 @@ community.vmware.vcenter_domain_user_group_info Synopsis -------- + - This module can be used to gather information about user or group of a domain. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- belongs_to_group - -
- string -
-
- -
If a group existing, returned contains only users or groups that directly belong to the specified group.
-
-
- belongs_to_user - -
- string -
-
- -
If a user existing, returned contains only groups that directly contain the specified user.
-
-
- domain - -
- string -
-
- Default:
"vsphere.local"
-
-
The domain to be specified searching.
-
-
- exact_match - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
If exact_match is true, it indicates the search_string passed should match a user or group name exactly.
-
-
- find_groups - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
If find_groups is true, domain groups will be included in the result.
-
-
- find_users - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
If find_users is true, domain users will be included in the result.
-
-
- 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.
-
-
- search_string - -
- string - / required -
-
- -
The search_string is a string to be specified searching.
-
Specify the domain user or group name to be searched.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

belongs_to_group

+ +

+ string +

+
+

If a group existing, returned contains only users or groups that directly belong to the specified group.

+
+
+

belongs_to_user

+ +

+ string +

+
+

If a user existing, returned contains only groups that directly contain the specified user.

+
+
+

domain

+ +

+ string +

+
+

The domain to be specified searching.

+

Default: "vsphere.local"

+
+
+

exact_match

+ +

+ boolean +

+
+

If exact_match is true, it indicates the search_string passed should match a user or group name exactly.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

find_groups

+ +

+ boolean +

+
+

If find_groups is true, domain groups will be included in the result.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

find_users

+ +

+ boolean +

+
+

If find_users is true, domain users will be included in the result.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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.

+
+
+

search_string

+ +

+ string + / required +

+
+

The search_string is a string to be specified searching.

+

Specify the domain user or group name to be searched.

+
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -296,6 +288,7 @@ Examples .. code-block:: yaml + - name: Gather all domain user and group of vsphere.local community.vmware.vcenter_domain_user_group_info: hostname: "{{ vcenter_hostname }}" @@ -341,50 +334,55 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- domain_user_groups - -
- list -
-
success -
list of domain user and group information
-
-
Sample:
-
[ - { - "fullName": "Administrator vsphere.local", - "group": false, - "principal": "Administrator" - } - ]
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

domain_user_groups

+ +

+ list + / elements=string +

+
+

list of domain user and group information

+

Returned: success

+

Sample: ["[\n {\n \"fullName\": \"Administrator vsphere.local\"", "\n \"group\": false", "\n \"principal\": \"Administrator\"\n }\n]"]

+
+ + Authors ~~~~~~~ - sky-joker (@sky-joker) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vcenter_extension_info_module.rst b/docs/community.vmware.vcenter_extension_info_module.rst index 0a8cb670b..c9d8602b7 100644 --- a/docs/community.vmware.vcenter_extension_info_module.rst +++ b/docs/community.vmware.vcenter_extension_info_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vcenter_extension_info_module: -*************************************** -community.vmware.vcenter_extension_info -*************************************** +community.vmware.vcenter_extension_info module -- Gather info vCenter extensions +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Gather info vCenter extensions** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vcenter_extension_info`. .. contents:: @@ -16,159 +17,158 @@ community.vmware.vcenter_extension_info Synopsis -------- + - This module can be used to gather information about vCenter extension. + + + + 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.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -176,6 +176,7 @@ Examples .. code-block:: yaml + - name: Gather info about vCenter Extensions community.vmware.vcenter_extension_info: hostname: '{{ vcenter_hostname }}' @@ -186,44 +187,55 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- extension_info - -
- list -
-
success -
List of extensions
-
-
Sample:
-
[{'extension_company': 'VMware, Inc.', 'extension_key': 'com.vmware.vim.ls', 'extension_label': 'License Services', 'extension_last_heartbeat_time': '2018-09-03T09:36:18.003768+00:00', 'extension_subject_name': '', 'extension_summary': 'Provides various license services', 'extension_type': '', 'extension_version': '5.0'}, {'extension_company': 'VMware Inc.', 'extension_key': 'com.vmware.vim.sms', 'extension_label': 'VMware vCenter Storage Monitoring Service', 'extension_last_heartbeat_time': '2018-09-03T09:36:18.005730+00:00', 'extension_subject_name': '', 'extension_summary': 'Storage Monitoring and Reporting', 'extension_type': '', 'extension_version': '5.5'}]
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

extension_info

+ +

+ list + / elements=string +

+
+

List of extensions

+

Returned: success

+

Sample: [{"extension_company": "VMware, Inc.", "extension_key": "com.vmware.vim.ls", "extension_label": "License Services", "extension_last_heartbeat_time": "2018-09-03T09:36:18.003768+00:00", "extension_subject_name": "", "extension_summary": "Provides various license services", "extension_type": "", "extension_version": "5.0"}, {"extension_company": "VMware Inc.", "extension_key": "com.vmware.vim.sms", "extension_label": "VMware vCenter Storage Monitoring Service", "extension_last_heartbeat_time": "2018-09-03T09:36:18.005730+00:00", "extension_subject_name": "", "extension_summary": "Storage Monitoring and Reporting", "extension_type": "", "extension_version": "5.5"}]

+
+ + Authors ~~~~~~~ - Abhijeet Kasurde (@Akasurde) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vcenter_extension_module.rst b/docs/community.vmware.vcenter_extension_module.rst index df807ddc0..6f2a1a5d9 100644 --- a/docs/community.vmware.vcenter_extension_module.rst +++ b/docs/community.vmware.vcenter_extension_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vcenter_extension_module: -********************************** -community.vmware.vcenter_extension -********************************** +community.vmware.vcenter_extension module -- Register/deregister vCenter Extensions ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Register/deregister vCenter Extensions** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vcenter_extension`. .. contents:: @@ -16,351 +17,330 @@ community.vmware.vcenter_extension Synopsis -------- + - This module can be used to register/deregister vCenter Extensions. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- client_type - -
- string -
-
- Default:
"vsphere-client-serenity"
-
-
Required for state=present. Type of client the extension is (win32, .net, linux, etc.).
-
-
- company - -
- string -
-
- -
Required for state=present. The name of the company that makes the extension.
-
-
- description - -
- string -
-
- -
Required for state=present. A short description of the extension.
-
-
- email - -
- string -
-
- -
Required for state=present. Administrator email to use for extension.
-
-
- extension_key - -
- string - / required -
-
- -
The extension key of the extension to install or uninstall.
-
-
- 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 -
-
- -
Required for state=present. The name of the extension you are installing.
-
-
- 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.
-
-
- server_type - -
- string -
-
- Default:
"vsphere-client-serenity"
-
-
Required for state=present. Type of server being used to install the extension (SOAP, REST, HTTP, etc.).
-
-
- ssl_thumbprint - -
- string -
-
- -
Required for state=present. SSL thumbprint of the extension hosting server.
-
-
- state - -
- string -
-
-
    Choices: -
  • absent
  • -
  • present ←
  • -
-
-
Add or remove vCenter Extension.
-
-
- url - -
- string -
-
- -
Required for state=present. Link to server hosting extension zip file to install.
-
-
- 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 - / required -
-
- -
The version of the extension you are installing or uninstalling.
-
-
- visible - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Show the extension in solution manager inside vCenter.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

client_type

+ +

+ string +

+
+

Required for state=present. Type of client the extension is (win32, .net, linux, etc.).

+

Default: "vsphere-client-serenity"

+
+
+

company

+ +

+ string +

+
+

Required for state=present. The name of the company that makes the extension.

+
+
+

description

+ +

+ string +

+
+

Required for state=present. A short description of the extension.

+
+
+

email

+ +

+ string +

+
+

Required for state=present. Administrator email to use for extension.

+
+
+

extension_key

+ +

+ string + / required +

+
+

The extension key of the extension to install or uninstall.

+
+
+

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 +

+
+

Required for state=present. The name of the extension you are installing.

+
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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.

+
+
+

server_type

+ +

+ string +

+
+

Required for state=present. Type of server being used to install the extension (SOAP, REST, HTTP, etc.).

+

Default: "vsphere-client-serenity"

+
+
+

ssl_thumbprint

+ +

+ string +

+
+

Required for state=present. SSL thumbprint of the extension hosting server.

+
+
+

state

+ +

+ string +

+
+

Add or remove vCenter Extension.

+

Choices:

+
    +
  • "absent"

  • +
  • "present" ← (default)

  • +
+ +
+
+

url

+ +

+ string +

+
+

Required for state=present. Link to server hosting extension zip file to install.

+
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

version

+ +

+ string + / required +

+
+

The version of the extension you are installing or uninstalling.

+
+
+

visible

+ +

+ boolean +

+
+

Show the extension in solution manager inside vCenter.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -368,7 +348,8 @@ Examples .. code-block:: yaml - - name: Register vCenter Extension + + - name: Register vCenter Extension community.vmware.vcenter_extension: hostname: "{{ groups['vcsa'][0] }}" username: "{{ vcenter_username }}" @@ -398,44 +379,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- result - -
- string -
-
always -
information about performed operation
-
-
Sample:
-
'com.acme.Extension' installed.
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

result

+ +

+ string +

+
+

information about performed operation

+

Returned: always

+

Sample: "'com.acme.Extension' installed."

+
+ + Authors ~~~~~~~ - Michael Tipton (@castawayegr) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vcenter_folder_module.rst b/docs/community.vmware.vcenter_folder_module.rst index e06b8db15..e900ddf45 100644 --- a/docs/community.vmware.vcenter_folder_module.rst +++ b/docs/community.vmware.vcenter_folder_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vcenter_folder_module: -******************************* -community.vmware.vcenter_folder -******************************* +community.vmware.vcenter_folder module -- Manage folders on given datacenter +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Manage folders on given datacenter** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vcenter_folder`. .. contents:: @@ -16,262 +17,256 @@ community.vmware.vcenter_folder Synopsis -------- + - This module can be used to create, delete, move and rename folder on then given datacenter. - This module is only supported for vCenter. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- datacenter - -
- string - / required -
-
- -
Name of the datacenter.
-

aliases: datacenter_name
-
-
- folder_name - -
- string - / required -
-
- -
Name of folder to be managed.
-
This is case sensitive parameter.
-
Folder name should be under 80 characters. This is a VMware restriction.
-
-
- folder_type - -
- string -
-
-
    Choices: -
  • datastore
  • -
  • host
  • -
  • network
  • -
  • vm ←
  • -
-
-
This is type of folder.
-
If set to vm, then 'VM and Template Folder' is created under datacenter.
-
If set to host, then 'Host and Cluster Folder' is created under datacenter.
-
If set to datastore, then 'Storage Folder' is created under datacenter.
-
If set to network, then 'Network Folder' is created under datacenter.
-
This parameter is required, if state is set to present and parent_folder is absent.
-
This option is ignored, if parent_folder is set.
-
-
- 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.
-
-
- parent_folder - -
- string -
-
- -
Name of the parent folder under which new folder needs to be created.
-
This is case sensitive parameter.
-
If user wants to create a folder under '/DC0/vm/vm_folder', this value will be 'vm_folder'.
-
If user wants to create a folder under '/DC0/vm/folder1/folder2', this value will be 'folder1/folder2'.
-
-
- 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
  • -
-
-
State of folder.
-
If set to present without parent folder parameter, then folder with folder_type is created.
-
If set to present with parent folder parameter, then folder in created under parent folder. folder_type is ignored.
-
If set to absent, then folder is unregistered and destroyed.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+
+

datacenter

+ +

aliases: datacenter_name

+

+ string + / required +

+
+

Name of the datacenter.

+
+
+

folder_name

+ +

+ string + / required +

+
+

Name of folder to be managed.

+

This is case sensitive parameter.

+

Folder name should be under 80 characters. This is a VMware restriction.

+
+
+

folder_type

+ +

+ string +

+
+

This is type of folder.

+

If set to vm, then 'VM and Template Folder' is created under datacenter.

+

If set to host, then 'Host and Cluster Folder' is created under datacenter.

+

If set to datastore, then 'Storage Folder' is created under datacenter.

+

If set to network, then 'Network Folder' is created under datacenter.

+

This parameter is required, if state is set to present and parent_folder is absent.

+

This option is ignored, if parent_folder is set.

+

Choices:

+
    +
  • "datastore"

  • +
  • "host"

  • +
  • "network"

  • +
  • "vm" ← (default)

  • +
+ +
+
+

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.

+
+
+

parent_folder

+ +

+ string +

+
+

Name of the parent folder under which new folder needs to be created.

+

This is case sensitive parameter.

+

If user wants to create a folder under '/DC0/vm/vm_folder', this value will be 'vm_folder'.

+

If user wants to create a folder under '/DC0/vm/folder1/folder2', this value will be 'folder1/folder2'.

+
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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 +

+
+

State of folder.

+

If set to present without parent folder parameter, then folder with folder_type is created.

+

If set to present with parent folder parameter, then folder in created under parent folder. folder_type is ignored.

+

If set to absent, then folder is unregistered and destroyed.

+

Choices:

+
    +
  • "present" ← (default)

  • +
  • "absent"

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -279,6 +274,7 @@ Examples .. code-block:: yaml + - name: Create a VM folder on given datacenter community.vmware.vcenter_folder: hostname: '{{ vcenter_hostname }}' @@ -329,77 +325,86 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- result - -
- complex -
-
On success -
The detail about the new folder
-
-
  -
- msg - -
- string -
-
-
string stating about result
-
-
  -
- path - -
- string -
-
-
the full path of the new folder
-
-
-

- - -Status ------- + + + + + + + + + + + + + + + + + + + + + + + + +

Key

Description

+
+

result

+ +

+ complex +

+
+

The detail about the new folder

+

Returned: On success

+
+
+

msg

+ +

+ string +

+
+

string stating about result

+

Returned: success

+
+
+

path

+ +

+ string +

+
+

the full path of the new folder

+

Returned: success

+
+ + Authors ~~~~~~~ - Abhijeet Kasurde (@Akasurde) -- Christian Kotte (@ckotte) +- Christian Kotte (@ckotte) - Jan Meerkamp (@meerkampdvv) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vcenter_license_module.rst b/docs/community.vmware.vcenter_license_module.rst index 839ce07c4..36fd83109 100644 --- a/docs/community.vmware.vcenter_license_module.rst +++ b/docs/community.vmware.vcenter_license_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vcenter_license_module: -******************************** -community.vmware.vcenter_license -******************************** +community.vmware.vcenter_license module -- Manage VMware vCenter license keys ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Manage VMware vCenter license keys** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vcenter_license`. .. contents:: @@ -16,260 +17,249 @@ community.vmware.vcenter_license Synopsis -------- + - Add and delete vCenter, ESXi server license keys. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- cluster_name - -
- string -
-
- -
Name of the cluster to apply vSAN license.
-
-
- datacenter - -
- string -
-
- -
The datacenter name to use for the operation.
-
-
- esxi_hostname - -
- string -
-
- -
The hostname of the ESXi server to which the specified license will be assigned.
-
This parameter is optional.
-
-
- hostname - -
- string -
-
- -
The hostname or IP address of the vSphere vCenter server.
-
If the value is not specified in the task, the value of environment variable VMWARE_HOST will be used instead.
-
Environment variable supported added in Ansible 2.6.
-
-
- labels - -
- dictionary -
-
- Default:
{"source": "ansible"}
-
-
The optional labels of the license key to manage in vSphere vCenter.
-
This is dictionary with key/value pair.
-
-
- license - -
- string - / required -
-
- -
The license key to manage in vSphere vCenter.
-
-
- password - -
- string -
-
- -
The password of the vSphere vCenter server.
-
If the value is not specified in the task, the value of environment variable VMWARE_PASSWORD will be used instead.
-
Environment variable supported added in Ansible 2.6.
-

aliases: pass, pwd
-
-
- port - -
- integer -
-
- Default:
443
-
-
The port number of the vSphere vCenter server.
-
If the value is not specified in the task, the value of environment variable VMWARE_PORT will be used instead.
-
Environment variable supported added in 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.
-
-
- 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 ←
  • -
-
-
Whether to add (present) or remove (absent) the license key.
-
-
- username - -
- string -
-
- -
The username of the vSphere vCenter server.
-
If the value is not specified in the task, the value of environment variable VMWARE_USER will be used instead.
-
Environment variable supported added in 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 supported added in Ansible 2.6.
-
If set to true, please make sure Python >= 2.7.9 is installed on the given machine.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

cluster_name

+ +

+ string +

+
+

Name of the cluster to apply vSAN license.

+
+
+

datacenter

+ +

+ string +

+
+

The datacenter name to use for the operation.

+
+
+

esxi_hostname

+ +

+ string +

+
+

The hostname of the ESXi server to which the specified license will be assigned.

+

This parameter is optional.

+
+
+

hostname

+ +

+ string +

+
+

The hostname or IP address of the vSphere vCenter server.

+

If the value is not specified in the task, the value of environment variable VMWARE_HOST will be used instead.

+

Environment variable supported added in Ansible 2.6.

+
+
+

labels

+ +

+ dictionary +

+
+

The optional labels of the license key to manage in vSphere vCenter.

+

This is dictionary with key/value pair.

+

Default: {"source": "ansible"}

+
+
+

license

+ +

+ string + / required +

+
+

The license key to manage in vSphere vCenter.

+
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ string +

+
+

The password of the vSphere vCenter server.

+

If the value is not specified in the task, the value of environment variable VMWARE_PASSWORD will be used instead.

+

Environment variable supported added in Ansible 2.6.

+
+
+

port

+ +

+ integer +

+
+

The port number of the vSphere vCenter server.

+

If the value is not specified in the task, the value of environment variable VMWARE_PORT will be used instead.

+

Environment variable supported added in Ansible 2.6.

+

Default: 443

+
+
+

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.

+
+
+

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 +

+
+

Whether to add (present) or remove (absent) the license key.

+

Choices:

+
    +
  • "absent"

  • +
  • "present" ← (default)

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ string +

+
+

The username of the vSphere vCenter server.

+

If the value is not specified in the task, the value of environment variable VMWARE_USER will be used instead.

+

Environment variable supported added in Ansible 2.6.

+
+
+

validate_certs

+ +

+ boolean +

+
+

Allows connection when SSL certificates are not valid. Set to false when certificates are not trusted.

+

If the value is not specified in the task, the value of environment variable VMWARE_VALIDATE_CERTS will be used instead.

+

Environment variable supported added in Ansible 2.6.

+

If set to true, please make sure Python >= 2.7.9 is installed on the given machine.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - This module will also auto-assign the current vCenter to the license key if the product matches the license key, and vCenter us currently assigned an evaluation license only. - - The evaluation license (00000-00000-00000-00000-00000) is not listed when unused. - - If ``esxi_hostname`` is specified, then will assign the ``license`` key to the ESXi host. - - If ``esxi_hostname`` is not specified, then will just register the ``license`` key to vCenter inventory without assigning it to an ESXi host. - - All modules requires API write access and hence is not supported on a free ESXi license. - +- This module will also auto-assign the current vCenter to the license key if the product matches the license key, and vCenter us currently assigned an evaluation license only. +- The evaluation license (00000-00000-00000-00000-00000) is not listed when unused. +- If \ :literal:`esxi\_hostname`\ is specified, then will assign the \ :literal:`license`\ key to the ESXi host. +- If \ :literal:`esxi\_hostname`\ is not specified, then will just register the \ :literal:`license`\ key to vCenter inventory without assigning it to an ESXi host. +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -277,6 +267,7 @@ Examples .. code-block:: yaml + - name: Add a new vCenter license community.vmware.vcenter_license: hostname: '{{ vcenter_hostname }}' @@ -318,44 +309,55 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- licenses - -
- list -
-
always -
list of license keys after module executed
-
-
Sample:
-
['f600d-21ae3-5592b-249e0-cc341', '143cc-0e942-b2955-3ea12-d006f']
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

licenses

+ +

+ list + / elements=string +

+
+

list of license keys after module executed

+

Returned: always

+

Sample: ["f600d-21ae3-5592b-249e0-cc341", "143cc-0e942-b2955-3ea12-d006f"]

+
+ + Authors ~~~~~~~ - Dag Wieers (@dagwieers) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vcenter_standard_key_provider_module.rst b/docs/community.vmware.vcenter_standard_key_provider_module.rst index 0b63ece27..b704df6ca 100644 --- a/docs/community.vmware.vcenter_standard_key_provider_module.rst +++ b/docs/community.vmware.vcenter_standard_key_provider_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vcenter_standard_key_provider_module: -********************************************** -community.vmware.vcenter_standard_key_provider -********************************************** +community.vmware.vcenter_standard_key_provider module -- Add, reconfigure or remove Standard Key Provider on vCenter server ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Add, reconfigure or remove Standard Key Provider on vCenter server** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vcenter_standard_key_provider`. .. contents:: @@ -16,7 +17,12 @@ community.vmware.vcenter_standard_key_provider Synopsis -------- -- This module is used for adding, reconfiguring or removing Standard Key Provider on vCenter server. Refer to VMware docs for more information: `Standard Key Provider `_ + +- This module is used for adding, reconfiguring or removing Standard Key Provider on vCenter server. Refer to VMware docs for more information: \ `Standard Key Provider `__\ + + + + @@ -27,439 +33,405 @@ 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.
-
-
- kms_info - -
- list - / elements=dictionary -
-
- Default:
[]
-
-
The information of an external key server (KMS).
-
kms_name, kms_ip are required when adding a Standard Key Provider.
-
If kms_port is not specified, the default port 5696 will be used.
-
kms_ip, kms_port can be reconfigured for an existing KMS with name kms_name.
-
-
- kms_ip - -
- string -
-
- -
IP address of the external KMS.
-
-
- kms_name - -
- string -
-
- -
Name of the KMS to be configured.
-
-
- kms_port - -
- integer -
-
- -
Port of the external KMS.
-
-
- remove_kms - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Remove the configured KMS with name kms_name from the KMIP cluster.
-
-
- kms_password - -
- string -
-
- -
Password to authenticate to the KMS.
-
-
- kms_username - -
- string -
-
- -
Username to authenticate to the KMS.
-
-
- make_kms_trust_vc - -
- dictionary -
-
- -
After adding the Standard Key Provider to the vCenter Server, you can establish a trusted connection, the exact process depends on the certificates that the key provider accepts, and on your company policy.
-
Three methods implemented here, (1) upload client certificate and private key through upload_client_cert and upload_client_key parameters, (2) generate, update, download vCenter self signed certificate through download_self_signed_cert parameter, (3) download generated Certificate Signing Request(CSR) through download_client_csr parameter, send it to KMS then upload the KMS signed CSR through upload_kms_signed_client_csr parameter.
-
This is not set to be mandatory, if not set, please go to vCenter to setup trust connection with KMS manually.
-
-
- download_client_csr - -
- path -
-
- -
The absolute path on local machine for keeping vCenter generated CSR.
-
Then upload the KMS signed CSR using upload_kms_signed_client_csr to vCenter.
-
-
- download_self_signed_cert - -
- path -
-
- -
The absolute path on local machine for keeping vCenter generated self signed client cert.
-
-
- upload_client_cert - -
- path -
-
- -
The absolute file path of client certificate.
-
Request a certificate and private key from the KMS vendor. The files are X509 files in PEM format.
-
The certificate might be already trusted by the KMS server.
-
-
- upload_client_key - -
- path -
-
- -
The absolute file path of client private key to be uploaded together with upload_client_cert.
-
-
- upload_kms_signed_client_csr - -
- path -
-
- -
The absolute file path of KMS signed CSR downloaded from download_client_csr.
-
-
- mark_default - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Set specified Key Provider with name name as the default Key Provider.
-
If new added Key Provider is the only key provider in vCenter, then will mark it as default after adding.
-
-
- name - -
- string - / required -
-
- -
Name of the Key Provider to be added, reconfigured or removed from vCenter.
-
-
- 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 proxy server.
-
-
- proxy_server - -
- string -
-
- -
Address of the proxy server to connect to KMS.
-
-
- state - -
- string -
-
-
    Choices: -
  • present ←
  • -
  • absent
  • -
-
-
If set to absent, the named Key Provider will be removed from vCenter.
-
If set to present, the named existing Key Provider will be reconfigured or new Key Provider will be added.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

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.

+
+
+

kms_info

+ +

+ list + / elements=dictionary +

+
+

The information of an external key server (KMS).

+

kms_name, kms_ip are required when adding a Standard Key Provider.

+

If kms_port is not specified, the default port 5696 will be used.

+

kms_ip, kms_port can be reconfigured for an existing KMS with name kms_name.

+

Default: []

+
+
+

kms_ip

+ +

+ string +

+
+

IP address of the external KMS.

+
+
+

kms_name

+ +

+ string +

+
+

Name of the KMS to be configured.

+
+
+

kms_port

+ +

+ integer +

+
+

Port of the external KMS.

+
+
+

remove_kms

+ +

+ boolean +

+
+

Remove the configured KMS with name kms_name from the KMIP cluster.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+ +
+
+

kms_password

+ +

+ string +

+
+

Password to authenticate to the KMS.

+
+
+

kms_username

+ +

+ string +

+
+

Username to authenticate to the KMS.

+
+
+

make_kms_trust_vc

+ +

+ dictionary +

+
+

After adding the Standard Key Provider to the vCenter Server, you can establish a trusted connection, the exact process depends on the certificates that the key provider accepts, and on your company policy.

+

Three methods implemented here, (1) upload client certificate and private key through upload_client_cert and upload_client_key parameters, (2) generate, update, download vCenter self signed certificate through download_self_signed_cert parameter, (3) download generated Certificate Signing Request(CSR) through download_client_csr parameter, send it to KMS then upload the KMS signed CSR through upload_kms_signed_client_csr parameter.

+

This is not set to be mandatory, if not set, please go to vCenter to setup trust connection with KMS manually.

+
+
+

download_client_csr

+ +

+ path +

+
+

The absolute path on local machine for keeping vCenter generated CSR.

+

Then upload the KMS signed CSR using upload_kms_signed_client_csr to vCenter.

+
+
+

download_self_signed_cert

+ +

+ path +

+
+

The absolute path on local machine for keeping vCenter generated self signed client cert.

+
+
+

upload_client_cert

+ +

+ path +

+
+

The absolute file path of client certificate.

+

Request a certificate and private key from the KMS vendor. The files are X509 files in PEM format.

+

The certificate might be already trusted by the KMS server.

+
+
+

upload_client_key

+ +

+ path +

+
+

The absolute file path of client private key to be uploaded together with upload_client_cert.

+
+
+

upload_kms_signed_client_csr

+ +

+ path +

+
+

The absolute file path of KMS signed CSR downloaded from download_client_csr.

+
+
+

mark_default

+ +

+ boolean +

+
+

Set specified Key Provider with name name as the default Key Provider.

+

If new added Key Provider is the only key provider in vCenter, then will mark it as default after adding.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

name

+ +

+ string + / required +

+
+

Name of the Key Provider to be added, reconfigured or removed from vCenter.

+
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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 proxy server.

+
+
+

proxy_server

+ +

+ string +

+
+

Address of the proxy server to connect to KMS.

+
+
+

state

+ +

+ string +

+
+

If set to absent, the named Key Provider will be removed from vCenter.

+

If set to present, the named existing Key Provider will be reconfigured or new Key Provider will be added.

+

Choices:

+
    +
  • "present" ← (default)

  • +
  • "absent"

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -467,6 +439,7 @@ Examples .. code-block:: yaml + - name: Add a new Standard Key Provider with client certificate and private key community.vmware.vcenter_standard_key_provider: hostname: "{{ vcenter_hostname }}" @@ -506,44 +479,55 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- key_provider_clusters - -
- list -
-
always -
the Key Provider cluster info
-
-
Sample:
-
[{'has_backup': None, 'key_id': None, 'key_provide_id': 'test_standard', 'management_type': None, 'servers': [{'address': '192.168.1.10', 'name': 'test_kms', 'port': 5696, 'protocol': '', 'proxy': '', 'proxy_port': None, 'user_name': ''}], 'tpm_required': None, 'use_as_default': True}]
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

key_provider_clusters

+ +

+ list + / elements=string +

+
+

the Key Provider cluster info

+

Returned: always

+

Sample: [{"has_backup": null, "key_id": null, "key_provide_id": "test_standard", "management_type": null, "servers": [{"address": "192.168.1.10", "name": "test_kms", "port": 5696, "protocol": "", "proxy": "", "proxy_port": null, "user_name": ""}], "tpm_required": null, "use_as_default": true}]

+
+ + Authors ~~~~~~~ -- Diane Wang (@Tomorrow9) +- Diane Wang (@Tomorrow9) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_about_info_module.rst b/docs/community.vmware.vmware_about_info_module.rst index 575032f68..95a271cec 100644 --- a/docs/community.vmware.vmware_about_info_module.rst +++ b/docs/community.vmware.vmware_about_info_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_about_info_module: -********************************** -community.vmware.vmware_about_info -********************************** +community.vmware.vmware_about_info module -- Provides information about VMware server to which user is connecting to +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Provides information about VMware server to which user is connecting to** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_about_info`. .. contents:: @@ -16,159 +17,158 @@ community.vmware.vmware_about_info Synopsis -------- + - This module can be used to gather information about VMware server to which user is trying to connect. + + + + 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.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -176,6 +176,7 @@ Examples .. code-block:: yaml + - name: Provide information about vCenter community.vmware.vmware_about_info: hostname: '{{ vcenter_hostname }}' @@ -194,44 +195,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- about_info - -
- string -
-
success -
dict about VMware server
-
-
Sample:
-
{'api_type': 'VirtualCenter', 'api_version': '6.5', 'build': '5973321', 'instance_uuid': 'dbed6e0c-bd88-4ef6-b594-21283e1c677f', 'license_product_name': 'VMware VirtualCenter Server', 'license_product_version': '6.0', 'locale_build': '000', 'locale_version': 'INTL', 'os_type': 'darwin-amd64', 'product_full_name': 'VMware vCenter Server 6.5.0 build-5973321', 'product_line_id': 'vpx', 'product_name': 'VMware vCenter Server (govmomi simulator)', 'vendor': 'VMware, Inc.', 'version': '6.5.0'}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

about_info

+ +

+ string +

+
+

dict about VMware server

+

Returned: success

+

Sample: "{'api_type': 'VirtualCenter', 'api_version': '6.5', 'build': '5973321', 'instance_uuid': 'dbed6e0c-bd88-4ef6-b594-21283e1c677f', 'license_product_name': 'VMware VirtualCenter Server', 'license_product_version': '6.0', 'locale_build': '000', 'locale_version': 'INTL', 'os_type': 'darwin-amd64', 'product_full_name': 'VMware vCenter Server 6.5.0 build-5973321', 'product_line_id': 'vpx', 'product_name': 'VMware vCenter Server (govmomi simulator)', 'vendor': 'VMware, Inc.', 'version': '6.5.0'}"

+
+ + Authors ~~~~~~~ - Abhijeet Kasurde (@Akasurde) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_category_info_module.rst b/docs/community.vmware.vmware_category_info_module.rst index 6ec0d3f44..4928c0a24 100644 --- a/docs/community.vmware.vmware_category_info_module.rst +++ b/docs/community.vmware.vmware_category_info_module.rst @@ -1,12 +1,15 @@ -.. _community.vmware.vmware_category_info_module: -************************************* -community.vmware.vmware_category_info -************************************* +community.vmware.vmware_category_info module -- Gather info about VMware tag categories ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Gather info about VMware tag categories** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. +You need further requirements to be able to use this module, +see `Requirements `_ for details. + +To use it in a playbook, specify: :code:`community.vmware.vmware_category_info`. .. contents:: @@ -16,12 +19,15 @@ community.vmware.vmware_category_info Synopsis -------- + - This module can be used to gather information about VMware tag categories. - Tag feature is introduced in vSphere 6 version, so this module is not supported in earlier versions of vSphere. - All variables and VMware object names are case sensitive. +.. _ansible_collections.community.vmware.vmware_category_info_module_requirements: + Requirements ------------ The below requirements are needed on the host that executes this module. @@ -29,159 +35,159 @@ The below requirements are needed on the host that executes this module. - vSphere Automation SDK + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- hostname - -
- string -
-
- -
The hostname or IP address of the vSphere vCenter server.
-
If the value is not specified in the task, the value of environment variable VMWARE_HOST will be used instead.
-
-
- password - -
- string -
-
- -
The password of the vSphere vCenter server.
-
If the value is not specified in the task, the value of environment variable VMWARE_PASSWORD will be used instead.
-

aliases: pass, pwd
-
-
- port - -
- integer -
-
- Default:
443
-
-
The port number of the vSphere vCenter.
-
If the value is not specified in the task, the value of environment variable VMWARE_PORT will be used instead.
-
-
- protocol - -
- string -
-
-
    Choices: -
  • http
  • -
  • https ←
  • -
-
-
The connection to protocol.
-
-
- 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.
-
-
- 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 server.
-
If the value is not specified in the task, the value of environment variable VMWARE_USER will be used instead.
-

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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

hostname

+ +

+ string +

+
+

The hostname or IP address of the vSphere vCenter server.

+

If the value is not specified in the task, the value of environment variable VMWARE_HOST will be used instead.

+
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ string +

+
+

The password of the vSphere vCenter server.

+

If the value is not specified in the task, the value of environment variable VMWARE_PASSWORD will be used instead.

+
+
+

port

+ +

+ integer +

+
+

The port number of the vSphere vCenter.

+

If the value is not specified in the task, the value of environment variable VMWARE_PORT will be used instead.

+

Default: 443

+
+
+

protocol

+ +

+ string +

+
+

The connection to protocol.

+

Choices:

+
    +
  • "http"

  • +
  • "https" ← (default)

  • +
+ +
+
+

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.

+
+
+

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

+ +

aliases: admin, user

+

+ string +

+
+

The username of the vSphere vCenter server.

+

If the value is not specified in the task, the value of environment variable VMWARE_USER will be used instead.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + @@ -191,6 +197,7 @@ Examples .. code-block:: yaml + - name: Gather info about tag categories community.vmware.vmware_category_info: hostname: "{{ vcenter_hostname }}" @@ -216,44 +223,56 @@ Examples + + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- tag_category_info - -
- list -
-
always -
metadata of tag categories
-
-
Sample:
-
[{'category_associable_types': [], 'category_cardinality': 'MULTIPLE', 'category_description': 'awesome description', 'category_id': 'urn:vmomi:InventoryServiceCategory:e785088d-6981-4b1c-9fb8-1100c3e1f742:GLOBAL', 'category_name': 'Category0001', 'category_used_by': []}, {'category_associable_types': ['VirtualMachine'], 'category_cardinality': 'SINGLE', 'category_description': 'another awesome description', 'category_id': 'urn:vmomi:InventoryServiceCategory:ae5b7c6c-e622-4671-9b96-76e93adb70f2:GLOBAL', 'category_name': 'template_tag', 'category_used_by': []}]
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

tag_category_info

+ +

+ list + / elements=string +

+
+

metadata of tag categories

+

Returned: always

+

Sample: [{"category_associable_types": [], "category_cardinality": "MULTIPLE", "category_description": "awesome description", "category_id": "urn:vmomi:InventoryServiceCategory:e785088d-6981-4b1c-9fb8-1100c3e1f742:GLOBAL", "category_name": "Category0001", "category_used_by": []}, {"category_associable_types": ["VirtualMachine"], "category_cardinality": "SINGLE", "category_description": "another awesome description", "category_id": "urn:vmomi:InventoryServiceCategory:ae5b7c6c-e622-4671-9b96-76e93adb70f2:GLOBAL", "category_name": "template_tag", "category_used_by": []}]

+
+ + Authors ~~~~~~~ - Abhijeet Kasurde (@Akasurde) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_category_module.rst b/docs/community.vmware.vmware_category_module.rst index 72cb068bc..2d54ab08b 100644 --- a/docs/community.vmware.vmware_category_module.rst +++ b/docs/community.vmware.vmware_category_module.rst @@ -1,12 +1,15 @@ -.. _community.vmware.vmware_category_module: -******************************** -community.vmware.vmware_category -******************************** +community.vmware.vmware_category module -- Manage VMware categories ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Manage VMware categories** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. +You need further requirements to be able to use this module, +see `Requirements `_ for details. + +To use it in a playbook, specify: :code:`community.vmware.vmware_category`. .. contents:: @@ -16,12 +19,15 @@ community.vmware.vmware_category Synopsis -------- + - This module can be used to create / delete / update VMware categories. - Tag feature is introduced in vSphere 6 version, so this module is not supported in the earlier versions of vSphere. - All variables and VMware object names are case sensitive. +.. _ansible_collections.community.vmware.vmware_category_module_requirements: + Requirements ------------ The below requirements are needed on the host that executes this module. @@ -29,288 +35,282 @@ The below requirements are needed on the host that executes this module. - vSphere Automation SDK + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- associable_object_types - -
- list - / elements=string -
-
-
    Choices: -
  • All objects
  • -
  • Cluster
  • -
  • Content Library
  • -
  • Datacenter
  • -
  • Datastore
  • -
  • Datastore Cluster
  • -
  • Distributed Port Group
  • -
  • Distributed Switch
  • -
  • Folder
  • -
  • Host
  • -
  • Library item
  • -
  • Network
  • -
  • Host Network
  • -
  • Opaque Network
  • -
  • Resource Pool
  • -
  • vApp
  • -
  • Virtual Machine
  • -
-
-
List of object types that can be associated with the given category.
-
-
- category_cardinality - -
- string -
-
-
    Choices: -
  • multiple ←
  • -
  • single
  • -
-
-
The category cardinality.
-
This parameter is ignored, when updating existing category.
-
-
- category_description - -
- string -
-
- Default:
""
-
-
The category description.
-
This is required only if state is set to present.
-
This parameter is ignored, when state is set to absent.
-
-
- category_name - -
- string - / required -
-
- -
The name of category to manage.
-
-
- hostname - -
- string -
-
- -
The hostname or IP address of the vSphere vCenter server.
-
If the value is not specified in the task, the value of environment variable VMWARE_HOST will be used instead.
-
-
- new_category_name - -
- string -
-
- -
The new name for an existing category.
-
This value is used while updating an existing category.
-
-
- password - -
- string -
-
- -
The password of the vSphere vCenter server.
-
If the value is not specified in the task, the value of environment variable VMWARE_PASSWORD will be used instead.
-

aliases: pass, pwd
-
-
- port - -
- integer -
-
- Default:
443
-
-
The port number of the vSphere vCenter.
-
If the value is not specified in the task, the value of environment variable VMWARE_PORT will be used instead.
-
-
- protocol - -
- string -
-
-
    Choices: -
  • http
  • -
  • https ←
  • -
-
-
The connection to protocol.
-
-
- 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.
-
-
- 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
  • -
-
-
The state of category.
-
If set to present and category does not exists, then category is created.
-
If set to present and category exists, then category is updated.
-
If set to absent and category exists, then category is deleted.
-
If set to absent and category does not exists, no action is taken.
-
Process of updating category only allows name, description change.
-
-
- username - -
- string -
-
- -
The username of the vSphere vCenter server.
-
If the value is not specified in the task, the value of environment variable VMWARE_USER will be used instead.
-

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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

associable_object_types

+ +

+ list + / elements=string +

+
+

List of object types that can be associated with the given category.

+

Choices:

+
    +
  • "All objects"

  • +
  • "Cluster"

  • +
  • "Content Library"

  • +
  • "Datacenter"

  • +
  • "Datastore"

  • +
  • "Datastore Cluster"

  • +
  • "Distributed Port Group"

  • +
  • "Distributed Switch"

  • +
  • "Folder"

  • +
  • "Host"

  • +
  • "Library item"

  • +
  • "Network"

  • +
  • "Host Network"

  • +
  • "Opaque Network"

  • +
  • "Resource Pool"

  • +
  • "vApp"

  • +
  • "Virtual Machine"

  • +
+ +
+
+

category_cardinality

+ +

+ string +

+
+

The category cardinality.

+

This parameter is ignored, when updating existing category.

+

Choices:

+
    +
  • "multiple" ← (default)

  • +
  • "single"

  • +
+ +
+
+

category_description

+ +

+ string +

+
+

The category description.

+

This is required only if state is set to present.

+

This parameter is ignored, when state is set to absent.

+

Default: ""

+
+
+

category_name

+ +

+ string + / required +

+
+

The name of category to manage.

+
+
+

hostname

+ +

+ string +

+
+

The hostname or IP address of the vSphere vCenter server.

+

If the value is not specified in the task, the value of environment variable VMWARE_HOST will be used instead.

+
+
+

new_category_name

+ +

+ string +

+
+

The new name for an existing category.

+

This value is used while updating an existing category.

+
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ string +

+
+

The password of the vSphere vCenter server.

+

If the value is not specified in the task, the value of environment variable VMWARE_PASSWORD will be used instead.

+
+
+

port

+ +

+ integer +

+
+

The port number of the vSphere vCenter.

+

If the value is not specified in the task, the value of environment variable VMWARE_PORT will be used instead.

+

Default: 443

+
+
+

protocol

+ +

+ string +

+
+

The connection to protocol.

+

Choices:

+
    +
  • "http"

  • +
  • "https" ← (default)

  • +
+ +
+
+

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.

+
+
+

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 +

+
+

The state of category.

+

If set to present and category does not exists, then category is created.

+

If set to present and category exists, then category is updated.

+

If set to absent and category exists, then category is deleted.

+

If set to absent and category does not exists, no action is taken.

+

Process of updating category only allows name, description change.

+

Choices:

+
    +
  • "present" ← (default)

  • +
  • "absent"

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ string +

+
+

The username of the vSphere vCenter server.

+

If the value is not specified in the task, the value of environment variable VMWARE_USER will be used instead.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + @@ -320,6 +320,7 @@ Examples .. code-block:: yaml + - name: Create a category community.vmware.vmware_category: hostname: "{{ vcenter_hostname }}" @@ -370,44 +371,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- category_results - -
- dictionary -
-
on success -
dictionary of category metadata
-
-
Sample:
-
{'category_id': 'urn:vmomi:InventoryServiceCategory:d7120bda-9fa5-4f92-9d71-aa1acff2e5a8:GLOBAL', 'msg': 'Category NewCat_0001 updated.'}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

category_results

+ +

+ dictionary +

+
+

dictionary of category metadata

+

Returned: on success

+

Sample: {"category_id": "urn:vmomi:InventoryServiceCategory:d7120bda-9fa5-4f92-9d71-aa1acff2e5a8:GLOBAL", "msg": "Category NewCat_0001 updated."}

+
+ + Authors ~~~~~~~ - Abhijeet Kasurde (@Akasurde) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_cfg_backup_module.rst b/docs/community.vmware.vmware_cfg_backup_module.rst index a44b42863..501d3b578 100644 --- a/docs/community.vmware.vmware_cfg_backup_module.rst +++ b/docs/community.vmware.vmware_cfg_backup_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_cfg_backup_module: -********************************** -community.vmware.vmware_cfg_backup -********************************** +community.vmware.vmware_cfg_backup module -- Backup / Restore / Reset ESXi host configuration ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Backup / Restore / Reset ESXi host configuration** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_cfg_backup`. .. contents:: @@ -16,231 +17,224 @@ community.vmware.vmware_cfg_backup Synopsis -------- + - This module can be used to perform various operations related to backup, restore and reset of ESXi host configuration. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- dest - -
- path -
-
- -
The destination where the ESXi configuration bundle will be saved. The dest can be a folder or a file.
-
If dest is a folder, the backup file will be saved in the folder with the default filename generated from the ESXi server.
-
If dest is a file, the backup file will be saved with that filename. The file extension will always be .tgz.
-
-
- esxi_hostname - -
- string -
-
- -
Name of ESXi server. This is required only if authentication against a vCenter is done.
-
-
- 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.
-
-
- src - -
- path -
-
- -
The file containing the ESXi configuration that will be restored.
-
-
- state - -
- string - / required -
-
-
    Choices: -
  • saved
  • -
  • absent
  • -
  • loaded
  • -
-
-
If saved, the .tgz backup bundle will be saved in dest.
-
If absent, the host configuration will be reset to default values.
-
If loaded, the backup file in src will be loaded to the ESXi host rewriting the hosts settings.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

dest

+ +

+ path +

+
+

The destination where the ESXi configuration bundle will be saved. The dest can be a folder or a file.

+

If dest is a folder, the backup file will be saved in the folder with the default filename generated from the ESXi server.

+

If dest is a file, the backup file will be saved with that filename. The file extension will always be .tgz.

+
+
+

esxi_hostname

+ +

+ string +

+
+

Name of ESXi server. This is required only if authentication against a vCenter is done.

+
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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.

+
+
+

src

+ +

+ path +

+
+

The file containing the ESXi configuration that will be restored.

+
+
+

state

+ +

+ string + / required +

+
+

If saved, the .tgz backup bundle will be saved in dest.

+

If absent, the host configuration will be reset to default values.

+

If loaded, the backup file in src will be loaded to the ESXi host rewriting the hosts settings.

+

Choices:

+
    +
  • "saved"

  • +
  • "absent"

  • +
  • "loaded"

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - Works only for ESXi hosts - - For configuration load or reset, the host will be switched automatically to maintenance mode. - - All modules requires API write access and hence is not supported on a free ESXi license. - +- Works only for ESXi hosts +- For configuration load or reset, the host will be switched automatically to maintenance mode. +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -248,6 +242,7 @@ Examples .. code-block:: yaml + - name: Save the ESXi configuration locally by authenticating directly against the ESXi host community.vmware.vmware_cfg_backup: hostname: '{{ esxi_hostname }}' @@ -269,44 +264,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- dest_file - -
- string -
-
changed -
The full path of where the file holding the ESXi configurations was stored
-
-
Sample:
-
/tmp/configBundle-esxi.host.domain.tgz
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

dest_file

+ +

+ string +

+
+

The full path of where the file holding the ESXi configurations was stored

+

Returned: changed

+

Sample: "/tmp/configBundle-esxi.host.domain.tgz"

+
+ + Authors ~~~~~~~ - Andreas Nafpliotis (@nafpliot-ibm) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_cluster_dpm_module.rst b/docs/community.vmware.vmware_cluster_dpm_module.rst index c3c8c5c6e..76ab16517 100644 --- a/docs/community.vmware.vmware_cluster_dpm_module.rst +++ b/docs/community.vmware.vmware_cluster_dpm_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_cluster_dpm_module: -*********************************** -community.vmware.vmware_cluster_dpm -*********************************** +community.vmware.vmware_cluster_dpm module -- Manage Distributed Power Management (DPM) on VMware vSphere clusters +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Manage Distributed Power Management (DPM) on VMware vSphere clusters** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_cluster_dpm`. .. contents:: @@ -16,254 +17,250 @@ community.vmware.vmware_cluster_dpm Synopsis -------- + - Manages DPM on VMware vSphere clusters. - All values and VMware object names are case sensitive. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- cluster_name - -
- string - / required -
-
- -
The name of the cluster to be managed.
-
-
- datacenter - -
- string - / required -
-
- -
The name of the datacenter.
-

aliases: datacenter_name
-
-
- default_dpm_behaviour - -
- string -
-
-
    Choices: -
  • automated ←
  • -
  • manual
  • -
-
-
Whether dpm should be automated or manual
-
-
- enable_dpm - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Whether to enable DPM.
-
-
- host_power_action_rate - -
- integer -
-
-
    Choices: -
  • 1
  • -
  • 2
  • -
  • 3 ←
  • -
  • 4
  • -
  • 5
  • -
-
-
specify host power action rate
-
1 is the lowest and 5 the highest
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

cluster_name

+ +

+ string + / required +

+
+

The name of the cluster to be managed.

+
+
+
+

datacenter

+ +

aliases: datacenter_name

+

+ string + / required +

+
+

The name of the datacenter.

+
+
+

default_dpm_behaviour

+ +

+ string +

+
+

Whether dpm should be automated or manual

+

Choices:

+
    +
  • "automated" ← (default)

  • +
  • "manual"

  • +
+ +
+
+

enable_dpm

+ +

+ boolean +

+
+

Whether to enable DPM.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

host_power_action_rate

+ +

+ integer +

+
+

specify host power action rate

+

1 is the lowest and 5 the highest

+

Choices:

+
    +
  • 1

  • +
  • 2

  • +
  • 3 ← (default)

  • +
  • 4

  • +
  • 5

  • +
+ +
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -271,6 +268,7 @@ Examples .. code-block:: yaml + - name: Enable DPM community.vmware.vmware_cluster_dpm: hostname: '{{ vcenter_hostname }}' @@ -286,11 +284,21 @@ Examples -Status ------- + + Authors ~~~~~~~ - Olivia Luetolf (@olilu) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_cluster_drs_module.rst b/docs/community.vmware.vmware_cluster_drs_module.rst index 01f955017..73a488895 100644 --- a/docs/community.vmware.vmware_cluster_drs_module.rst +++ b/docs/community.vmware.vmware_cluster_drs_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_cluster_drs_module: -*********************************** -community.vmware.vmware_cluster_drs -*********************************** +community.vmware.vmware_cluster_drs module -- Manage Distributed Resource Scheduler (DRS) on VMware vSphere clusters +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Manage Distributed Resource Scheduler (DRS) on VMware vSphere clusters** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_cluster_drs`. .. contents:: @@ -16,314 +17,308 @@ community.vmware.vmware_cluster_drs Synopsis -------- + - Manages DRS on VMware vSphere clusters. - All values and VMware object names are case sensitive. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- advanced_settings - -
- dictionary -
-
- Default:
{}
-
-
A dictionary of advanced DRS settings.
-
-
- cluster_name - -
- string - / required -
-
- -
The name of the cluster to be managed.
-
-
- datacenter - -
- string - / required -
-
- -
The name of the datacenter.
-

aliases: datacenter_name
-
-
- drs_default_vm_behavior - -
- string -
-
-
    Choices: -
  • fullyAutomated ←
  • -
  • manual
  • -
  • partiallyAutomated
  • -
-
-
Specifies the cluster-wide default DRS behavior for virtual machines.
-
If set to partiallyAutomated, vCenter generates recommendations for virtual machine migration and for the placement with a host, then automatically implements placement recommendations at power on.
-
If set to manual, then vCenter generates recommendations for virtual machine migration and for the placement with a host, but does not implement the recommendations automatically.
-
If set to fullyAutomated, then vCenter automates both the migration of virtual machines and their placement with a host at power on.
-
-
- drs_enable_vm_behavior_overrides - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Whether DRS Behavior overrides for individual virtual machines are enabled.
-
If set to true, overrides drs_default_vm_behavior.
-
-
- drs_vmotion_rate - -
- integer -
-
-
    Choices: -
  • 1
  • -
  • 2
  • -
  • 3 ←
  • -
  • 4
  • -
  • 5
  • -
-
-
Threshold for generated ClusterRecommendations ranging from 1 (lowest) to 5 (highest).
-
-
- enable - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Whether to enable DRS.
-
-
- 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.
-
-
- predictive_drs - -
- boolean -
-
added in 3.3.0
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
In addition to real-time metrics, DRS will respond to forecasted metrics provided by vRealize Operations Manager.
-
You must also configure Predictive DRS in a version of vRealize Operations that supports this feature.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

advanced_settings

+ +

+ dictionary +

+
+

A dictionary of advanced DRS settings.

+

Default: {}

+
+
+

cluster_name

+ +

+ string + / required +

+
+

The name of the cluster to be managed.

+
+
+
+

datacenter

+ +

aliases: datacenter_name

+

+ string + / required +

+
+

The name of the datacenter.

+
+
+

drs_default_vm_behavior

+ +

+ string +

+
+

Specifies the cluster-wide default DRS behavior for virtual machines.

+

If set to partiallyAutomated, vCenter generates recommendations for virtual machine migration and for the placement with a host, then automatically implements placement recommendations at power on.

+

If set to manual, then vCenter generates recommendations for virtual machine migration and for the placement with a host, but does not implement the recommendations automatically.

+

If set to fullyAutomated, then vCenter automates both the migration of virtual machines and their placement with a host at power on.

+

Choices:

+
    +
  • "fullyAutomated" ← (default)

  • +
  • "manual"

  • +
  • "partiallyAutomated"

  • +
+ +
+
+

drs_enable_vm_behavior_overrides

+ +

+ boolean +

+
+

Whether DRS Behavior overrides for individual virtual machines are enabled.

+

If set to true, overrides drs_default_vm_behavior.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

drs_vmotion_rate

+ +

+ integer +

+
+

Threshold for generated ClusterRecommendations ranging from 1 (lowest) to 5 (highest).

+

Choices:

+
    +
  • 1

  • +
  • 2

  • +
  • 3 ← (default)

  • +
  • 4

  • +
  • 5

  • +
+ +
+
+

enable

+ +

+ boolean +

+
+

Whether to enable DRS.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

predictive_drs

+ +

+ boolean +

+

added in community.vmware 3.3.0

+
+

In addition to real-time metrics, DRS will respond to forecasted metrics provided by vRealize Operations Manager.

+

You must also configure Predictive DRS in a version of vRealize Operations that supports this feature.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

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

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -331,6 +326,7 @@ Examples .. code-block:: yaml + - name: Enable DRS community.vmware.vmware_cluster_drs: hostname: '{{ vcenter_hostname }}' @@ -365,8 +361,7 @@ Examples -Status ------- + Authors @@ -374,3 +369,13 @@ Authors - Joseph Callen (@jcpowermac) - Abhijeet Kasurde (@Akasurde) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_cluster_drs_recommendations_module.rst b/docs/community.vmware.vmware_cluster_drs_recommendations_module.rst index 0c4d8d974..5f3c55cb6 100644 --- a/docs/community.vmware.vmware_cluster_drs_recommendations_module.rst +++ b/docs/community.vmware.vmware_cluster_drs_recommendations_module.rst @@ -1,14 +1,15 @@ -.. _community.vmware.vmware_cluster_drs_recommendations_module: -*************************************************** -community.vmware.vmware_cluster_drs_recommendations -*************************************************** +community.vmware.vmware_cluster_drs_recommendations module -- Apply DRS Recommendations ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Apply DRS Recommendations** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. -Version added: 3.7.0 +To use it in a playbook, specify: :code:`community.vmware.vmware_cluster_drs_recommendations`. + +New in community.vmware 3.7.0 .. contents:: :local: @@ -17,192 +18,188 @@ Version added: 3.7.0 Synopsis -------- + - Apply DRS Recommendations for Cluster. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- cluster_name - -
- string - / required -
-
- -
The name of the cluster to be managed.
-
-
- datacenter - -
- string - / required -
-
- -
The 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

cluster_name

+ +

+ string + / required +

+
+

The name of the cluster to be managed.

+
+
+
+

datacenter

+ +

aliases: datacenter_name

+

+ string + / required +

+
+

The name of the datacenter.

+
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -210,6 +207,7 @@ Examples .. code-block:: yaml + - name: Apply DRS Recommendations for Cluster community.vmware.vmware_cluster: hostname: '{{ vcenter_hostname }}' @@ -221,45 +219,56 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- result - -
- list -
-
always -
list of the recommendations
-
What server moved from which host to which host.
-
-
Sample:
-
['server1 move from host1 to host2.', 'server2 move from host1 to host2.']
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

result

+ +

+ list + / elements=string +

+
+

list of the recommendations

+

What server moved from which host to which host.

+

Returned: always

+

Sample: ["server1 move from host1 to host2.", "server2 move from host1 to host2."]

+
+ + Authors ~~~~~~~ - Nina Loser (@Nina2244) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_cluster_ha_module.rst b/docs/community.vmware.vmware_cluster_ha_module.rst index ece53763a..975528650 100644 --- a/docs/community.vmware.vmware_cluster_ha_module.rst +++ b/docs/community.vmware.vmware_cluster_ha_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_cluster_ha_module: -********************************** -community.vmware.vmware_cluster_ha -********************************** +community.vmware.vmware_cluster_ha module -- Manage High Availability (HA) on VMware vSphere clusters ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Manage High Availability (HA) on VMware vSphere clusters** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_cluster_ha`. .. contents:: @@ -16,632 +17,600 @@ community.vmware.vmware_cluster_ha Synopsis -------- + - Manages HA configuration on VMware vSphere clusters. - All values and VMware object names are case sensitive. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- advanced_settings - -
- dictionary -
-
- Default:
{}
-
-
A dictionary of advanced HA settings.
-
-
- apd_delay - -
- integer -
-
added in 2.9.0
-
- Default:
180
-
-
The response recovery delay time in sec for storage failures categorized as All Paths Down (APD).
-
Only set if apd_response is restartConservative or restartAggressive.
-
-
- apd_reaction - -
- string -
-
added in 2.9.0
-
-
    Choices: -
  • reset ←
  • -
  • none
  • -
-
-
VM response recovery reaction for storage failures categorized as All Paths Down (APD).
-
Only set if apd_response is restartConservative or restartAggressive.
-
-
- apd_response - -
- string -
-
-
    Choices: -
  • disabled
  • -
  • warning ←
  • -
  • restartConservative
  • -
  • restartAggressive
  • -
-
-
VM storage protection setting for storage failures categorized as All Paths Down (APD).
-
-
- cluster_name - -
- string - / required -
-
- -
The name of the cluster to be managed.
-
-
- datacenter - -
- string - / required -
-
- -
The name of the datacenter.
-

aliases: datacenter_name
-
-
- enable - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Whether to enable HA.
-
-
- failover_host_admission_control - -
- dictionary -
-
- -
Configure dedicated failover hosts.
-
slot_based_admission_control, reservation_based_admission_control and failover_host_admission_control are mutually exclusive.
-
-
- failover_hosts - -
- list - / elements=string - / required -
-
- -
List of dedicated failover hosts.
-
-
- ha_host_monitoring - -
- string -
-
-
    Choices: -
  • enabled ←
  • -
  • disabled
  • -
-
-
Whether HA restarts virtual machines after a host fails.
-
If set to enabled, HA restarts virtual machines after a host fails.
-
If set to disabled, HA does not restart virtual machines after a host fails.
-
If enable is set to false, then this value is ignored.
-
-
- ha_restart_priority - -
- string -
-
-
    Choices: -
  • disabled
  • -
  • high
  • -
  • low
  • -
  • medium ←
  • -
-
-
Priority HA gives to a virtual machine if sufficient capacity is not available to power on all failed virtual machines.
-
Valid only if ha_vm_monitoring is set to either vmAndAppMonitoring or vmMonitoringOnly.
-
If set to disabled, then HA is disabled for this virtual machine.
-
If set to high, then virtual machine with this priority have a higher chance of powering on after a failure, when there is insufficient capacity on hosts to meet all virtual machine needs.
-
If set to medium, then virtual machine with this priority have an intermediate chance of powering on after a failure, when there is insufficient capacity on hosts to meet all virtual machine needs.
-
If set to low, then virtual machine with this priority have a lower chance of powering on after a failure, when there is insufficient capacity on hosts to meet all virtual machine needs.
-
-
- ha_vm_failure_interval - -
- integer -
-
- Default:
30
-
-
The number of seconds after which virtual machine is declared as failed if no heartbeat has been received.
-
This setting is only valid if ha_vm_monitoring is set to, either vmAndAppMonitoring or vmMonitoringOnly.
-
Unit is seconds.
-
-
- ha_vm_max_failure_window - -
- integer -
-
- Default:
-1
-
-
The number of seconds for the window during which up to ha_vm_max_failures resets can occur before automated responses stop.
-
Valid only when ha_vm_monitoring is set to either vmAndAppMonitoring or vmMonitoringOnly.
-
Unit is seconds.
-
Default specifies no failure window.
-
-
- ha_vm_max_failures - -
- integer -
-
- Default:
3
-
-
Maximum number of failures and automated resets allowed during the time that ha_vm_max_failure_window specifies.
-
Valid only when ha_vm_monitoring is set to either vmAndAppMonitoring or vmMonitoringOnly.
-
-
- ha_vm_min_up_time - -
- integer -
-
- Default:
120
-
-
The number of seconds for the virtual machine's heartbeats to stabilize after the virtual machine has been powered on.
-
Valid only when ha_vm_monitoring is set to either vmAndAppMonitoring or vmMonitoringOnly.
-
Unit is seconds.
-
-
- ha_vm_monitoring - -
- string -
-
-
    Choices: -
  • vmAndAppMonitoring
  • -
  • vmMonitoringOnly
  • -
  • vmMonitoringDisabled ←
  • -
-
-
State of virtual machine health monitoring service.
-
If set to vmAndAppMonitoring, HA response to both virtual machine and application heartbeat failure.
-
If set to vmMonitoringDisabled, virtual machine health monitoring is disabled.
-
If set to vmMonitoringOnly, HA response to virtual machine heartbeat failure.
-
If enable is set to false, then this value is ignored.
-
-
- host_isolation_response - -
- string -
-
-
    Choices: -
  • none ←
  • -
  • powerOff
  • -
  • shutdown
  • -
-
-
Indicates whether or VMs should be powered off if a host determines that it is isolated from the rest of the compute resource.
-
If set to none, do not power off VMs in the event of a host network isolation.
-
If set to powerOff, power off VMs in the event of a host network isolation.
-
If set to shutdown, shut down VMs guest operating system in the event of a host network isolation.
-
-
- 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
-
-
- pdl_response - -
- string -
-
-
    Choices: -
  • disabled
  • -
  • warning ←
  • -
  • restartAggressive
  • -
-
-
VM storage protection setting for storage failures categorized as Permenant Device Loss (PDL).
-
-
- 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.
-
-
- reservation_based_admission_control - -
- dictionary -
-
- -
Configure reservation based admission control policy.
-
slot_based_admission_control, reservation_based_admission_control and failover_host_admission_control are mutually exclusive.
-
-
- auto_compute_percentages - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
By default, failover_level is used to calculate cpu_failover_resources_percent and memory_failover_resources_percent. If a user wants to override the percentage values, he has to set this field to false.
-
-
- cpu_failover_resources_percent - -
- integer -
-
- Default:
50
-
-
Percentage of CPU resources in the cluster to reserve for failover. Ignored if auto_compute_percentages is not set to false.
-
-
- failover_level - -
- integer - / required -
-
- -
Number of host failures that should be tolerated.
-
-
- memory_failover_resources_percent - -
- integer -
-
- Default:
50
-
-
Percentage of memory resources in the cluster to reserve for failover. Ignored if auto_compute_percentages is not set to false.
-
-
- slot_based_admission_control - -
- dictionary -
-
- -
Configure slot based admission control policy.
-
slot_based_admission_control, reservation_based_admission_control and failover_host_admission_control are mutually exclusive.
-
-
- failover_level - -
- integer - / required -
-
- -
Number of host failures that should be tolerated.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

advanced_settings

+ +

+ dictionary +

+
+

A dictionary of advanced HA settings.

+

Default: {}

+
+
+

apd_delay

+ +

+ integer +

+

added in community.vmware 2.9.0

+
+

The response recovery delay time in sec for storage failures categorized as All Paths Down (APD).

+

Only set if apd_response is restartConservative or restartAggressive.

+

Default: 180

+
+
+

apd_reaction

+ +

+ string +

+

added in community.vmware 2.9.0

+
+

VM response recovery reaction for storage failures categorized as All Paths Down (APD).

+

Only set if apd_response is restartConservative or restartAggressive.

+

Choices:

+
    +
  • "reset" ← (default)

  • +
  • "none"

  • +
+ +
+
+

apd_response

+ +

+ string +

+
+

VM storage protection setting for storage failures categorized as All Paths Down (APD).

+

Choices:

+
    +
  • "disabled"

  • +
  • "warning" ← (default)

  • +
  • "restartConservative"

  • +
  • "restartAggressive"

  • +
+ +
+
+

cluster_name

+ +

+ string + / required +

+
+

The name of the cluster to be managed.

+
+
+
+

datacenter

+ +

aliases: datacenter_name

+

+ string + / required +

+
+

The name of the datacenter.

+
+
+

enable

+ +

+ boolean +

+
+

Whether to enable HA.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

failover_host_admission_control

+ +

+ dictionary +

+
+

Configure dedicated failover hosts.

+

slot_based_admission_control, reservation_based_admission_control and failover_host_admission_control are mutually exclusive.

+
+
+

failover_hosts

+ +

+ list + / elements=string + / required +

+
+

List of dedicated failover hosts.

+
+
+

ha_host_monitoring

+ +

+ string +

+
+

Whether HA restarts virtual machines after a host fails.

+

If set to enabled, HA restarts virtual machines after a host fails.

+

If set to disabled, HA does not restart virtual machines after a host fails.

+

If enable is set to false, then this value is ignored.

+

Choices:

+
    +
  • "enabled" ← (default)

  • +
  • "disabled"

  • +
+ +
+
+

ha_restart_priority

+ +

+ string +

+
+

Priority HA gives to a virtual machine if sufficient capacity is not available to power on all failed virtual machines.

+

Valid only if ha_vm_monitoring is set to either vmAndAppMonitoring or vmMonitoringOnly.

+

If set to disabled, then HA is disabled for this virtual machine.

+

If set to high, then virtual machine with this priority have a higher chance of powering on after a failure, when there is insufficient capacity on hosts to meet all virtual machine needs.

+

If set to medium, then virtual machine with this priority have an intermediate chance of powering on after a failure, when there is insufficient capacity on hosts to meet all virtual machine needs.

+

If set to low, then virtual machine with this priority have a lower chance of powering on after a failure, when there is insufficient capacity on hosts to meet all virtual machine needs.

+

Choices:

+
    +
  • "disabled"

  • +
  • "high"

  • +
  • "low"

  • +
  • "medium" ← (default)

  • +
+ +
+
+

ha_vm_failure_interval

+ +

+ integer +

+
+

The number of seconds after which virtual machine is declared as failed if no heartbeat has been received.

+

This setting is only valid if ha_vm_monitoring is set to, either vmAndAppMonitoring or vmMonitoringOnly.

+

Unit is seconds.

+

Default: 30

+
+
+

ha_vm_max_failure_window

+ +

+ integer +

+
+

The number of seconds for the window during which up to ha_vm_max_failures resets can occur before automated responses stop.

+

Valid only when ha_vm_monitoring is set to either vmAndAppMonitoring or vmMonitoringOnly.

+

Unit is seconds.

+

Default specifies no failure window.

+

Default: -1

+
+
+

ha_vm_max_failures

+ +

+ integer +

+
+

Maximum number of failures and automated resets allowed during the time that ha_vm_max_failure_window specifies.

+

Valid only when ha_vm_monitoring is set to either vmAndAppMonitoring or vmMonitoringOnly.

+

Default: 3

+
+
+

ha_vm_min_up_time

+ +

+ integer +

+
+

The number of seconds for the virtual machine's heartbeats to stabilize after the virtual machine has been powered on.

+

Valid only when ha_vm_monitoring is set to either vmAndAppMonitoring or vmMonitoringOnly.

+

Unit is seconds.

+

Default: 120

+
+
+

ha_vm_monitoring

+ +

+ string +

+
+

State of virtual machine health monitoring service.

+

If set to vmAndAppMonitoring, HA response to both virtual machine and application heartbeat failure.

+

If set to vmMonitoringDisabled, virtual machine health monitoring is disabled.

+

If set to vmMonitoringOnly, HA response to virtual machine heartbeat failure.

+

If enable is set to false, then this value is ignored.

+

Choices:

+
    +
  • "vmAndAppMonitoring"

  • +
  • "vmMonitoringOnly"

  • +
  • "vmMonitoringDisabled" ← (default)

  • +
+ +
+
+

host_isolation_response

+ +

+ string +

+
+

Indicates whether or VMs should be powered off if a host determines that it is isolated from the rest of the compute resource.

+

If set to none, do not power off VMs in the event of a host network isolation.

+

If set to powerOff, power off VMs in the event of a host network isolation.

+

If set to shutdown, shut down VMs guest operating system in the event of a host network isolation.

+

Choices:

+
    +
  • "none" ← (default)

  • +
  • "powerOff"

  • +
  • "shutdown"

  • +
+ +
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

pdl_response

+ +

+ string +

+
+

VM storage protection setting for storage failures categorized as Permenant Device Loss (PDL).

+

Choices:

+
    +
  • "disabled"

  • +
  • "warning" ← (default)

  • +
  • "restartAggressive"

  • +
+ +
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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.

+
+
+

reservation_based_admission_control

+ +

+ dictionary +

+
+

Configure reservation based admission control policy.

+

slot_based_admission_control, reservation_based_admission_control and failover_host_admission_control are mutually exclusive.

+
+
+

auto_compute_percentages

+ +

+ boolean +

+
+

By default, failover_level is used to calculate cpu_failover_resources_percent and memory_failover_resources_percent. If a user wants to override the percentage values, he has to set this field to false.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

cpu_failover_resources_percent

+ +

+ integer +

+
+

Percentage of CPU resources in the cluster to reserve for failover. Ignored if auto_compute_percentages is not set to false.

+

Default: 50

+
+
+

failover_level

+ +

+ integer + / required +

+
+

Number of host failures that should be tolerated.

+
+
+

memory_failover_resources_percent

+ +

+ integer +

+
+

Percentage of memory resources in the cluster to reserve for failover. Ignored if auto_compute_percentages is not set to false.

+

Default: 50

+
+
+

slot_based_admission_control

+ +

+ dictionary +

+
+

Configure slot based admission control policy.

+

slot_based_admission_control, reservation_based_admission_control and failover_host_admission_control are mutually exclusive.

+
+
+

failover_level

+ +

+ integer + / required +

+
+

Number of host failures that should be tolerated.

+
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -649,6 +618,7 @@ Examples .. code-block:: yaml + - name: Enable HA without admission control community.vmware.vmware_cluster_ha: hostname: '{{ vcenter_hostname }}' @@ -688,8 +658,7 @@ Examples -Status ------- + Authors @@ -697,3 +666,13 @@ Authors - Joseph Callen (@jcpowermac) - Abhijeet Kasurde (@Akasurde) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_cluster_info_module.rst b/docs/community.vmware.vmware_cluster_info_module.rst index 9c17e24bd..99f04ea8a 100644 --- a/docs/community.vmware.vmware_cluster_info_module.rst +++ b/docs/community.vmware.vmware_cluster_info_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_cluster_info_module: -************************************ -community.vmware.vmware_cluster_info -************************************ +community.vmware.vmware_cluster_info module -- Gather info about clusters available in given vCenter +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Gather info about clusters available in given vCenter** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_cluster_info`. .. contents:: @@ -16,256 +17,249 @@ community.vmware.vmware_cluster_info Synopsis -------- + - This module can be used to gather information about clusters in VMWare infrastructure. - All values and VMware object names are case sensitive. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- cluster_name - -
- string -
-
- -
Name of the cluster.
-
If set, information of this cluster will be returned.
-
This parameter is required, if datacenter is not supplied.
-
-
- datacenter - -
- string -
-
- -
Datacenter to search for cluster/s.
-
This parameter is required, if cluster_name is not supplied.
-
-
- 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.
-
Example:
-
properties: [
-
"name",
-
"configuration.dasConfig.enabled",
-
"summary.totalCpu"
-
]
-
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.
-
-
- show_tag - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Tags related to cluster are shown if set to true.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

cluster_name

+ +

+ string +

+
+

Name of the cluster.

+

If set, information of this cluster will be returned.

+

This parameter is required, if datacenter is not supplied.

+
+
+

datacenter

+ +

+ string +

+
+

Datacenter to search for cluster/s.

+

This parameter is required, if cluster_name is not supplied.

+
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

properties

+ +

+ list + / elements=string +

+
+

Specify the properties to retrieve.

+

Example:

+

properties: [

+

"name",

+

"configuration.dasConfig.enabled",

+

"summary.totalCpu"

+

]

+

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 +

+
+

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.

+

Choices:

+
    +
  • "summary" ← (default)

  • +
  • "vsphere"

  • +
+ +
+
+

show_tag

+ +

+ boolean +

+
+

Tags related to cluster are shown if set to true.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -273,6 +267,7 @@ Examples .. code-block:: yaml + - name: Gather cluster info from given datacenter community.vmware.vmware_cluster_info: hostname: '{{ vcenter_hostname }}' @@ -317,42 +312,42 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- clusters - -
- dictionary -
-
always -
metadata about the available clusters
-
datacenter added in the return values from version 1.6.0
-
-
Sample:
-
{'DC0_C0': {'datacenter': 'DC0', 'moid': 'domain-c9', 'drs_default_vm_behavior': None, 'drs_enable_vm_behavior_overrides': None, 'drs_vmotion_rate': None, 'enable_ha': None, 'enabled_drs': True, 'enabled_vsan': False, 'ha_admission_control_enabled': None, 'ha_failover_level': None, 'ha_host_monitoring': None, 'ha_restart_priority': None, 'ha_vm_failure_interval': None, 'ha_vm_max_failure_window': None, 'ha_vm_max_failures': None, 'ha_vm_min_up_time': None, 'ha_vm_monitoring': None, 'ha_vm_tools_monitoring': None, 'vsan_auto_claim_storage': False, 'hosts': [{'name': 'esxi01.vsphere.local', 'folder': '/DC0/host/DC0_C0'}, {'name': 'esxi02.vsphere.local', 'folder': '/DC0/host/DC0_C0'}, {'name': 'esxi03.vsphere.local', 'folder': '/DC0/host/DC0_C0'}, {'name': 'esxi04.vsphere.local', 'folder': '/DC0/host/DC0_C0'}], 'resource_summary': {'cpuCapacityMHz': 4224, 'cpuUsedMHz': 87, 'memCapacityMB': 6139, 'memUsedMB': 1254, 'pMemAvailableMB': 0, 'pMemCapacityMB': 0, 'storageCapacityMB': 33280, 'storageUsedMB': 19953}, 'tags': [{'category_id': 'urn:vmomi:InventoryServiceCategory:9fbf83de-7903-442e-8004-70fd3940297c:GLOBAL', 'category_name': 'sample_cluster_cat_0001', 'description': '', 'id': 'urn:vmomi:InventoryServiceTag:93d680db-b3a6-4834-85ad-3e9516e8fee8:GLOBAL', 'name': 'sample_cluster_tag_0001'}]}}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

clusters

+ +

+ dictionary +

+
+

metadata about the available clusters

+

datacenter added in the return values from version 1.6.0

+

Returned: always

+

Sample: {"DC0_C0": {"datacenter": "DC0", "drs_default_vm_behavior": null, "drs_enable_vm_behavior_overrides": null, "drs_vmotion_rate": null, "enable_ha": null, "enabled_drs": true, "enabled_vsan": false, "ha_admission_control_enabled": null, "ha_failover_level": null, "ha_host_monitoring": null, "ha_restart_priority": null, "ha_vm_failure_interval": null, "ha_vm_max_failure_window": null, "ha_vm_max_failures": null, "ha_vm_min_up_time": null, "ha_vm_monitoring": null, "ha_vm_tools_monitoring": null, "hosts": [{"folder": "/DC0/host/DC0_C0", "name": "esxi01.vsphere.local"}, {"folder": "/DC0/host/DC0_C0", "name": "esxi02.vsphere.local"}, {"folder": "/DC0/host/DC0_C0", "name": "esxi03.vsphere.local"}, {"folder": "/DC0/host/DC0_C0", "name": "esxi04.vsphere.local"}], "moid": "domain-c9", "resource_summary": {"cpuCapacityMHz": 4224, "cpuUsedMHz": 87, "memCapacityMB": 6139, "memUsedMB": 1254, "pMemAvailableMB": 0, "pMemCapacityMB": 0, "storageCapacityMB": 33280, "storageUsedMB": 19953}, "tags": [{"category_id": "urn:vmomi:InventoryServiceCategory:9fbf83de-7903-442e-8004-70fd3940297c:GLOBAL", "category_name": "sample_cluster_cat_0001", "description": "", "id": "urn:vmomi:InventoryServiceTag:93d680db-b3a6-4834-85ad-3e9516e8fee8:GLOBAL", "name": "sample_cluster_tag_0001"}], "vsan_auto_claim_storage": false}}

+
+ + Authors @@ -360,3 +355,13 @@ Authors - Abhijeet Kasurde (@Akasurde) - Christian Neugum (@digifuchsi) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_cluster_module.rst b/docs/community.vmware.vmware_cluster_module.rst index 4cdf0c4f8..ff75c786b 100644 --- a/docs/community.vmware.vmware_cluster_module.rst +++ b/docs/community.vmware.vmware_cluster_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_cluster_module: -******************************* -community.vmware.vmware_cluster -******************************* +community.vmware.vmware_cluster module -- Manage VMware vSphere clusters +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Manage VMware vSphere clusters** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_cluster`. .. contents:: @@ -16,232 +17,229 @@ community.vmware.vmware_cluster Synopsis -------- + - Adds or removes VMware vSphere clusters. -- To manage DRS, HA and VSAN related configurations, use the new modules vmware_cluster_drs, vmware_cluster_ha and vmware_cluster_vsan. +- To manage DRS, HA and VSAN related configurations, use the new modules vmware\_cluster\_drs, vmware\_cluster\_ha and vmware\_cluster\_vsan. - All values and VMware object names are case sensitive. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- cluster_name - -
- string - / required -
-
- -
The name of the cluster to be managed.
-
-
- datacenter - -
- string - / required -
-
- -
The 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.
-
-
- state - -
- string -
-
-
    Choices: -
  • absent
  • -
  • present ←
  • -
-
-
Create present or remove absent a VMware vSphere cluster.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

cluster_name

+ +

+ string + / required +

+
+

The name of the cluster to be managed.

+
+
+
+

datacenter

+ +

aliases: datacenter_name

+

+ string + / required +

+
+

The name of the datacenter.

+
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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 +

+
+

Create present or remove absent a VMware vSphere cluster.

+

Choices:

+
    +
  • "absent"

  • +
  • "present" ← (default)

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. See Also -------- -.. seealso:: +* \ `community.vmware.vmware\_cluster\_drs `__\ + + Manage Distributed Resource Scheduler (DRS) on VMware vSphere clusters. +* \ `community.vmware.vmware\_cluster\_ha `__\ - :ref:`community.vmware.vmware_cluster_drs_module` - The official documentation on the **community.vmware.vmware_cluster_drs** module. - :ref:`community.vmware.vmware_cluster_ha_module` - The official documentation on the **community.vmware.vmware_cluster_ha** module. - :ref:`community.vmware.vmware_cluster_vsan_module` - The official documentation on the **community.vmware.vmware_cluster_vsan** module. + Manage High Availability (HA) on VMware vSphere clusters. +* \ `community.vmware.vmware\_cluster\_vsan `__\ + Manages virtual storage area network (vSAN) configuration on VMware vSphere clusters. Examples -------- .. code-block:: yaml + - name: Create Cluster community.vmware.vmware_cluster: hostname: '{{ vcenter_hostname }}' @@ -264,8 +262,7 @@ Examples -Status ------- + Authors @@ -273,3 +270,13 @@ Authors - Joseph Callen (@jcpowermac) - Abhijeet Kasurde (@Akasurde) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_cluster_vcls_module.rst b/docs/community.vmware.vmware_cluster_vcls_module.rst index 680ad64e9..f773ae405 100644 --- a/docs/community.vmware.vmware_cluster_vcls_module.rst +++ b/docs/community.vmware.vmware_cluster_vcls_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_cluster_vcls_module: -************************************ -community.vmware.vmware_cluster_vcls -************************************ +community.vmware.vmware_cluster_vcls module -- Override the default vCLS (vSphere Cluster Services) VM disk placement for this cluster. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Override the default vCLS (vSphere Cluster Services) VM disk placement for this cluster.** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_cluster_vcls`. .. contents:: @@ -16,6 +17,7 @@ community.vmware.vmware_cluster_vcls Synopsis -------- + - Override the default vCLS VM disk placement for this cluster. - Some datastores cannot be selected for vCLS 'Allowed' as they are blocked by solutions as SRM or vSAN maintenance mode where vCLS cannot be configured. - All values and VMware object names are case sensitive. @@ -23,205 +25,198 @@ Synopsis + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- allowed_datastores - -
- list - / elements=string - / required -
-
- -
List of the allowed Datastores.
-
If there is one more in the current List it will be removed.
-
-
- cluster_name - -
- string - / required -
-
- -
The name of the cluster to be managed.
-
-
- datacenter - -
- string - / required -
-
- -
The 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

allowed_datastores

+ +

+ list + / elements=string + / required +

+
+

List of the allowed Datastores.

+

If there is one more in the current List it will be removed.

+
+
+

cluster_name

+ +

+ string + / required +

+
+

The name of the cluster to be managed.

+
+
+
+

datacenter

+ +

aliases: datacenter_name

+

+ string + / required +

+
+

The name of the datacenter.

+
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -229,6 +224,7 @@ Examples .. code-block:: yaml + - name: Set Allowed vCLS Datastores community.vmware.vmware_cluster_vcls: hostname: '{{ vcenter_hostname }}' @@ -243,41 +239,41 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- result - -
- string -
-
always -
information about performed operation
-
-
Sample:
-
{'result': None, 'Added_AllowedDatastores': ['ds2'], 'Removed_AllowedDatastores': ['ds3']}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

result

+ +

+ string +

+
+

information about performed operation

+

Returned: always

+

Sample: "{'Added_AllowedDatastores': ['ds2'], 'Removed_AllowedDatastores': ['ds3'], 'result': None}"

+
+ + Authors @@ -285,3 +281,13 @@ Authors - Joseph Callen (@jcpowermac) - Nina Loser (@Nina2244) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_cluster_vsan_module.rst b/docs/community.vmware.vmware_cluster_vsan_module.rst index c723f88cb..fb49143d9 100644 --- a/docs/community.vmware.vmware_cluster_vsan_module.rst +++ b/docs/community.vmware.vmware_cluster_vsan_module.rst @@ -1,12 +1,15 @@ -.. _community.vmware.vmware_cluster_vsan_module: -************************************ -community.vmware.vmware_cluster_vsan -************************************ +community.vmware.vmware_cluster_vsan module -- Manages virtual storage area network (vSAN) configuration on VMware vSphere clusters ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Manages virtual storage area network (vSAN) configuration on VMware vSphere clusters** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. +You need further requirements to be able to use this module, +see `Requirements `_ for details. + +To use it in a playbook, specify: :code:`community.vmware.vmware_cluster_vsan`. .. contents:: @@ -16,11 +19,14 @@ community.vmware.vmware_cluster_vsan Synopsis -------- + - Manages vSAN on VMware vSphere clusters. - All values and VMware object names are case sensitive. +.. _ansible_collections.community.vmware.vmware_cluster_vsan_module_requirements: + Requirements ------------ The below requirements are needed on the host that executes this module. @@ -28,338 +34,329 @@ The below requirements are needed on the host that executes this module. - vSAN Management SDK, which needs to be downloaded from VMware and installed manually. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- advanced_options - -
- dictionary -
-
- -
Advanced VSAN Options.
-
-
- automatic_rebalance - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
If enabled, vSAN automatically rebalances (moves the data among disks) when a capacity disk fullness hits proactive rebalance threshold.
-
-
- disable_site_read_locality - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
For vSAN stretched clusters, reads to vSAN objects occur on the site the VM resides on.
-
Setting to true will force reads across all mirrors.
-
-
- large_cluster_support - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Allow > 32 VSAN hosts per cluster; if this is changed on an existing vSAN cluster, all hosts are required to reboot to apply this change.
-
-
- object_repair_timer - -
- integer -
-
- -
Delay time in minutes for VSAN to wait for the absent component to come back before starting to repair it.
-
-
- thin_swap - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
When enabled, swap objects would not reserve 100% space of their size on vSAN datastore.
-
-
- cluster_name - -
- string - / required -
-
- -
The name of the cluster to be managed.
-
-
- datacenter - -
- string - / required -
-
- -
The name of the datacenter.
-

aliases: datacenter_name
-
-
- enable - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Whether to enable vSAN.
-
-
- 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.
-
-
- vsan_auto_claim_storage - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Whether the VSAN service is configured to automatically claim local storage on VSAN-enabled hosts in the cluster.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

advanced_options

+ +

+ dictionary +

+
+

Advanced VSAN Options.

+
+
+

automatic_rebalance

+ +

+ boolean +

+
+

If enabled, vSAN automatically rebalances (moves the data among disks) when a capacity disk fullness hits proactive rebalance threshold.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+ +
+
+

disable_site_read_locality

+ +

+ boolean +

+
+

For vSAN stretched clusters, reads to vSAN objects occur on the site the VM resides on.

+

Setting to true will force reads across all mirrors.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+ +
+
+

large_cluster_support

+ +

+ boolean +

+
+

Allow > 32 VSAN hosts per cluster; if this is changed on an existing vSAN cluster, all hosts are required to reboot to apply this change.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+ +
+
+

object_repair_timer

+ +

+ integer +

+
+

Delay time in minutes for VSAN to wait for the absent component to come back before starting to repair it.

+
+
+

thin_swap

+ +

+ boolean +

+
+

When enabled, swap objects would not reserve 100% space of their size on vSAN datastore.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+ +
+
+

cluster_name

+ +

+ string + / required +

+
+

The name of the cluster to be managed.

+
+
+
+

datacenter

+ +

aliases: datacenter_name

+

+ string + / required +

+
+

The name of the datacenter.

+
+
+

enable

+ +

+ boolean +

+
+

Whether to enable vSAN.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

vsan_auto_claim_storage

+ +

+ boolean +

+
+

Whether the VSAN service is configured to automatically claim local storage on VSAN-enabled hosts in the cluster.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -367,6 +364,7 @@ Examples .. code-block:: yaml + - name: Enable vSAN community.vmware.vmware_cluster_vsan: hostname: '{{ vcenter_hostname }}' @@ -403,8 +401,7 @@ Examples -Status ------- + Authors @@ -413,3 +410,13 @@ Authors - Joseph Callen (@jcpowermac) - Abhijeet Kasurde (@Akasurde) - Mario Lenz (@mariolenz) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_content_deploy_ovf_template_module.rst b/docs/community.vmware.vmware_content_deploy_ovf_template_module.rst index 7ca26359d..9fbbccfb3 100644 --- a/docs/community.vmware.vmware_content_deploy_ovf_template_module.rst +++ b/docs/community.vmware.vmware_content_deploy_ovf_template_module.rst @@ -1,12 +1,15 @@ -.. _community.vmware.vmware_content_deploy_ovf_template_module: -*************************************************** -community.vmware.vmware_content_deploy_ovf_template -*************************************************** +community.vmware.vmware_content_deploy_ovf_template module -- Deploy Virtual Machine from ovf template stored in content library. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Deploy Virtual Machine from ovf template stored in content library.** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. +You need further requirements to be able to use this module, +see `Requirements `_ for details. + +To use it in a playbook, specify: :code:`community.vmware.vmware_content_deploy_ovf_template`. .. contents:: @@ -16,11 +19,14 @@ community.vmware.vmware_content_deploy_ovf_template Synopsis -------- + - Module to deploy virtual machine from ovf template in content library. - All variables and VMware object names are case sensitive. +.. _ansible_collections.community.vmware.vmware_content_deploy_ovf_template_module_requirements: + Requirements ------------ The below requirements are needed on the host that executes this module. @@ -28,358 +34,344 @@ The below requirements are needed on the host that executes this module. - vSphere Automation SDK + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- cluster - -
- string -
-
- -
Name of the cluster in datacenter in which to place deployed VM.
-
-
- datacenter - -
- string - / required -
-
- -
Name of the datacenter, where VM to be deployed.
-
-
- datastore - -
- string -
-
- -
Name of the datastore to store deployed VM and disk.
-
-
- datastore_cluster - -
- string -
-
- -
Name of the datastore cluster housing a datastore to store deployed VM and disk.
-
If datastore is not specified, the recommended datastore from this cluster will be used.
-
-
- folder - -
- string -
-
- Default:
"vm"
-
-
Name of the folder in datacenter in which to place deployed VM.
-
-
- host - -
- string -
-
- -
Name of the ESX Host in datacenter in which to place deployed VM. The host has to be a member of the cluster that contains the resource pool.
-
-
- hostname - -
- string -
-
- -
The hostname or IP address of the vSphere vCenter server.
-
If the value is not specified in the task, the value of environment variable VMWARE_HOST will be used instead.
-
-
- library - -
- string -
-
- -
The name of the content library from where the template resides.
-

aliases: content_library, content_library_src
-
-
- log_level - -
- string -
-
-
    Choices: -
  • debug
  • -
  • info
  • -
  • normal ←
  • -
-
-
The level of logging desired in this module.
-
-
- name - -
- string - / required -
-
- -
The name of the VM to be deployed.
-

aliases: vm_name
-
-
- password - -
- string -
-
- -
The password of the vSphere vCenter server.
-
If the value is not specified in the task, the value of environment variable VMWARE_PASSWORD will be used instead.
-

aliases: pass, pwd
-
-
- port - -
- integer -
-
- Default:
443
-
-
The port number of the vSphere vCenter.
-
If the value is not specified in the task, the value of environment variable VMWARE_PORT will be used instead.
-
-
- protocol - -
- string -
-
-
    Choices: -
  • http
  • -
  • https ←
  • -
-
-
The connection to protocol.
-
-
- 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.
-
-
- 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 -
-
- -
Name of the resourcepool in datacenter in which to place deployed VM.
-
-
- storage_provisioning - -
- string -
-
-
    Choices: -
  • thin ←
  • -
  • thick
  • -
  • eagerZeroedThick
  • -
  • eagerzeroedthick
  • -
-
-
Default storage provisioning type to use for all sections of type vmw:StorageSection in the OVF descriptor.
-
-
- template - -
- string - / required -
-
- -
The name of OVF template from which VM to be deployed.
-

aliases: ovf, ovf_template, template_src
-
-
- username - -
- string -
-
- -
The username of the vSphere vCenter server.
-
If the value is not specified in the task, the value of environment variable VMWARE_USER will be used instead.
-

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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

cluster

+ +

+ string +

+
+

Name of the cluster in datacenter in which to place deployed VM.

+
+
+

datacenter

+ +

+ string + / required +

+
+

Name of the datacenter, where VM to be deployed.

+
+
+

datastore

+ +

+ string +

+
+

Name of the datastore to store deployed VM and disk.

+
+
+

datastore_cluster

+ +

+ string +

+
+

Name of the datastore cluster housing a datastore to store deployed VM and disk.

+

If datastore is not specified, the recommended datastore from this cluster will be used.

+
+
+

folder

+ +

+ string +

+
+

Name of the folder in datacenter in which to place deployed VM.

+

Default: "vm"

+
+
+

host

+ +

+ string +

+
+

Name of the ESX Host in datacenter in which to place deployed VM. The host has to be a member of the cluster that contains the resource pool.

+
+
+

hostname

+ +

+ string +

+
+

The hostname or IP address of the vSphere vCenter server.

+

If the value is not specified in the task, the value of environment variable VMWARE_HOST will be used instead.

+
+
+
+
+

library

+ +

aliases: content_library, content_library_src

+

+ string +

+
+

The name of the content library from where the template resides.

+
+
+

log_level

+ +

+ string +

+
+

The level of logging desired in this module.

+

Choices:

+
    +
  • "debug"

  • +
  • "info"

  • +
  • "normal" ← (default)

  • +
+ +
+
+
+

name

+ +

aliases: vm_name

+

+ string + / required +

+
+

The name of the VM to be deployed.

+
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ string +

+
+

The password of the vSphere vCenter server.

+

If the value is not specified in the task, the value of environment variable VMWARE_PASSWORD will be used instead.

+
+
+

port

+ +

+ integer +

+
+

The port number of the vSphere vCenter.

+

If the value is not specified in the task, the value of environment variable VMWARE_PORT will be used instead.

+

Default: 443

+
+
+

protocol

+ +

+ string +

+
+

The connection to protocol.

+

Choices:

+
    +
  • "http"

  • +
  • "https" ← (default)

  • +
+ +
+
+

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.

+
+
+

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 +

+
+

Name of the resourcepool in datacenter in which to place deployed VM.

+
+
+

storage_provisioning

+ +

+ string +

+
+

Default storage provisioning type to use for all sections of type vmw:StorageSection in the OVF descriptor.

+

Choices:

+
    +
  • "thin" ← (default)

  • +
  • "thick"

  • +
  • "eagerZeroedThick"

  • +
  • "eagerzeroedthick"

  • +
+ +
+
+
+
+
+

template

+ +

aliases: ovf, ovf_template, template_src

+

+ string + / required +

+
+

The name of OVF template from which VM to be deployed.

+
+
+
+
+

username

+ +

aliases: admin, user

+

+ string +

+
+

The username of the vSphere vCenter server.

+

If the value is not specified in the task, the value of environment variable VMWARE_USER will be used instead.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + @@ -389,6 +381,7 @@ Examples .. code-block:: yaml + - name: Deploy Virtual Machine from OVF template in content library community.vmware.vmware_content_deploy_ovf_template: hostname: '{{ vcenter_hostname }}' @@ -418,44 +411,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- vm_deploy_info - -
- dictionary -
-
on success -
Virtual machine deployment message and vm_id
-
-
Sample:
-
{'msg': "Deployed Virtual Machine 'Sample_VM'.", 'vm_id': 'vm-1009'}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

vm_deploy_info

+ +

+ dictionary +

+
+

Virtual machine deployment message and vm_id

+

Returned: on success

+

Sample: {"msg": "Deployed Virtual Machine 'Sample_VM'.", "vm_id": "vm-1009"}

+
+ + Authors ~~~~~~~ - Lev Goncharv (@ultral) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_content_deploy_template_module.rst b/docs/community.vmware.vmware_content_deploy_template_module.rst index 87f2ad237..5c4862565 100644 --- a/docs/community.vmware.vmware_content_deploy_template_module.rst +++ b/docs/community.vmware.vmware_content_deploy_template_module.rst @@ -1,12 +1,15 @@ -.. _community.vmware.vmware_content_deploy_template_module: -*********************************************** -community.vmware.vmware_content_deploy_template -*********************************************** +community.vmware.vmware_content_deploy_template module -- Deploy Virtual Machine from template stored in content library. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Deploy Virtual Machine from template stored in content library.** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. +You need further requirements to be able to use this module, +see `Requirements `_ for details. + +To use it in a playbook, specify: :code:`community.vmware.vmware_content_deploy_template`. .. contents:: @@ -16,6 +19,7 @@ community.vmware.vmware_content_deploy_template Synopsis -------- + - Module to deploy virtual machine from template in content library. - Content Library feature is introduced in vSphere 6.0 version. - vmtx templates feature is introduced in vSphere 67U1 and APIs for clone template from content library in 67U2. @@ -24,6 +28,8 @@ Synopsis +.. _ansible_collections.community.vmware.vmware_content_deploy_template_module_requirements: + Requirements ------------ The below requirements are needed on the host that executes this module. @@ -31,369 +37,353 @@ The below requirements are needed on the host that executes this module. - vSphere Automation SDK + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- cluster - -
- string -
-
- -
Name of the cluster in datacenter in which to place deployed VM.
-
Required if resource_pool is not specified.
-
-
- datacenter - -
- string - / required -
-
- -
Name of the datacenter, where VM to be deployed.
-
-
- datastore - -
- string -
-
- -
Name of the datastore to store deployed VM and disk.
-
Required if datastore_cluster is not provided.
-
-
- datastore_cluster - -
- string -
-
- -
Name of the datastore cluster to store deployed VM and disk.
-
Please make sure Storage DRS is active for recommended datastore from the given datastore cluster.
-
If Storage DRS is not enabled, datastore with largest free storage space is selected.
-
Required if datastore is not provided.
-
-
- folder - -
- string -
-
- Default:
"vm"
-
-
Name of the folder in datacenter in which to place deployed VM.
-
-
- host - -
- string -
-
- -
Name of the ESX Host in datacenter in which to place deployed VM.
-
The host has to be a member of the cluster that contains the resource pool.
-
Required with resource_pool to find resource pool details. This will be used as additional information when there are resource pools with same name.
-
-
- hostname - -
- string -
-
- -
The hostname or IP address of the vSphere vCenter server.
-
If the value is not specified in the task, the value of environment variable VMWARE_HOST will be used instead.
-
-
- library - -
- string -
-
- -
The name of the content library from where the template resides.
-

aliases: content_library, content_library_src
-
-
- log_level - -
- string -
-
-
    Choices: -
  • debug
  • -
  • info
  • -
  • normal ←
  • -
-
-
The level of logging desired in this module.
-
-
- name - -
- string - / required -
-
- -
The name of the VM to be deployed.
-

aliases: vm_name
-
-
- password - -
- string -
-
- -
The password of the vSphere vCenter server.
-
If the value is not specified in the task, the value of environment variable VMWARE_PASSWORD will be used instead.
-

aliases: pass, pwd
-
-
- port - -
- integer -
-
- Default:
443
-
-
The port number of the vSphere vCenter.
-
If the value is not specified in the task, the value of environment variable VMWARE_PORT will be used instead.
-
-
- protocol - -
- string -
-
-
    Choices: -
  • http
  • -
  • https ←
  • -
-
-
The connection to protocol.
-
-
- 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.
-
-
- 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 -
-
- -
Name of the resource pool in datacenter in which to place deployed VM.
-
Required if cluster is not specified.
-
For default or non-unique resource pool names, specify host and cluster.
-
Resources is the default name of resource pool.
-
-
- state - -
- string -
-
-
    Choices: -
  • present ←
  • -
  • poweredon
  • -
-
-
The state of Virtual Machine deployed from template in content library.
-
If set to present and VM does not exists, then VM is created.
-
If set to present and VM exists, no action is taken.
-
If set to poweredon and VM does not exists, then VM is created with powered on state.
-
If set to poweredon and VM exists, no action is taken.
-
-
- template - -
- string - / required -
-
- -
The name of template from which VM to be deployed.
-

aliases: template_src
-
-
- username - -
- string -
-
- -
The username of the vSphere vCenter server.
-
If the value is not specified in the task, the value of environment variable VMWARE_USER will be used instead.
-

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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

cluster

+ +

+ string +

+
+

Name of the cluster in datacenter in which to place deployed VM.

+

Required if resource_pool is not specified.

+
+
+

datacenter

+ +

+ string + / required +

+
+

Name of the datacenter, where VM to be deployed.

+
+
+

datastore

+ +

+ string +

+
+

Name of the datastore to store deployed VM and disk.

+

Required if datastore_cluster is not provided.

+
+
+

datastore_cluster

+ +

+ string +

+
+

Name of the datastore cluster to store deployed VM and disk.

+

Please make sure Storage DRS is active for recommended datastore from the given datastore cluster.

+

If Storage DRS is not enabled, datastore with largest free storage space is selected.

+

Required if datastore is not provided.

+
+
+

folder

+ +

+ string +

+
+

Name of the folder in datacenter in which to place deployed VM.

+

Default: "vm"

+
+
+

host

+ +

+ string +

+
+

Name of the ESX Host in datacenter in which to place deployed VM.

+

The host has to be a member of the cluster that contains the resource pool.

+

Required with resource_pool to find resource pool details. This will be used as additional information when there are resource pools with same name.

+
+
+

hostname

+ +

+ string +

+
+

The hostname or IP address of the vSphere vCenter server.

+

If the value is not specified in the task, the value of environment variable VMWARE_HOST will be used instead.

+
+
+
+
+

library

+ +

aliases: content_library, content_library_src

+

+ string +

+
+

The name of the content library from where the template resides.

+
+
+

log_level

+ +

+ string +

+
+

The level of logging desired in this module.

+

Choices:

+
    +
  • "debug"

  • +
  • "info"

  • +
  • "normal" ← (default)

  • +
+ +
+
+
+

name

+ +

aliases: vm_name

+

+ string + / required +

+
+

The name of the VM to be deployed.

+
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ string +

+
+

The password of the vSphere vCenter server.

+

If the value is not specified in the task, the value of environment variable VMWARE_PASSWORD will be used instead.

+
+
+

port

+ +

+ integer +

+
+

The port number of the vSphere vCenter.

+

If the value is not specified in the task, the value of environment variable VMWARE_PORT will be used instead.

+

Default: 443

+
+
+

protocol

+ +

+ string +

+
+

The connection to protocol.

+

Choices:

+
    +
  • "http"

  • +
  • "https" ← (default)

  • +
+ +
+
+

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.

+
+
+

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 +

+
+

Name of the resource pool in datacenter in which to place deployed VM.

+

Required if cluster is not specified.

+

For default or non-unique resource pool names, specify host and cluster.

+

Resources is the default name of resource pool.

+
+
+

state

+ +

+ string +

+
+

The state of Virtual Machine deployed from template in content library.

+

If set to present and VM does not exists, then VM is created.

+

If set to present and VM exists, no action is taken.

+

If set to poweredon and VM does not exists, then VM is created with powered on state.

+

If set to poweredon and VM exists, no action is taken.

+

Choices:

+
    +
  • "present" ← (default)

  • +
  • "poweredon"

  • +
+ +
+
+
+

template

+ +

aliases: template_src

+

+ string + / required +

+
+

The name of template from which VM to be deployed.

+
+
+
+
+

username

+ +

aliases: admin, user

+

+ string +

+
+

The username of the vSphere vCenter server.

+

If the value is not specified in the task, the value of environment variable VMWARE_USER will be used instead.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + @@ -403,6 +393,7 @@ Examples .. code-block:: yaml + - name: Deploy Virtual Machine from template in content library community.vmware.vmware_content_deploy_template: hostname: '{{ vcenter_hostname }}' @@ -434,44 +425,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- vm_deploy_info - -
- dictionary -
-
on success -
Virtual machine deployment message and vm_id
-
-
Sample:
-
{'msg': "Deployed Virtual Machine 'Sample_VM'.", 'vm_id': 'vm-1009'}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

vm_deploy_info

+ +

+ dictionary +

+
+

Virtual machine deployment message and vm_id

+

Returned: on success

+

Sample: {"msg": "Deployed Virtual Machine 'Sample_VM'.", "vm_id": "vm-1009"}

+
+ + Authors ~~~~~~~ - Pavan Bidkar (@pgbidkar) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_content_library_info_module.rst b/docs/community.vmware.vmware_content_library_info_module.rst index 6b9dce2c0..cd08bd539 100644 --- a/docs/community.vmware.vmware_content_library_info_module.rst +++ b/docs/community.vmware.vmware_content_library_info_module.rst @@ -1,12 +1,15 @@ -.. _community.vmware.vmware_content_library_info_module: -******************************************** -community.vmware.vmware_content_library_info -******************************************** +community.vmware.vmware_content_library_info module -- Gather information about VMWare Content Library +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Gather information about VMWare Content Library** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. +You need further requirements to be able to use this module, +see `Requirements `_ for details. + +To use it in a playbook, specify: :code:`community.vmware.vmware_content_library_info`. .. contents:: @@ -16,6 +19,7 @@ community.vmware.vmware_content_library_info Synopsis -------- + - Module to list the content libraries. - Module to get information about specific content library. - Content Library feature is introduced in vSphere 6.0 version, so this module is not supported in the earlier versions of vSphere. @@ -23,6 +27,8 @@ Synopsis +.. _ansible_collections.community.vmware.vmware_content_library_info_module_requirements: + Requirements ------------ The below requirements are needed on the host that executes this module. @@ -30,174 +36,172 @@ The below requirements are needed on the host that executes this module. - vSphere Automation SDK + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- hostname - -
- string -
-
- -
The hostname or IP address of the vSphere vCenter server.
-
If the value is not specified in the task, the value of environment variable VMWARE_HOST will be used instead.
-
-
- library_id - -
- string -
-
- -
content library id for which details needs to be fetched.
-
-
- password - -
- string -
-
- -
The password of the vSphere vCenter server.
-
If the value is not specified in the task, the value of environment variable VMWARE_PASSWORD will be used instead.
-

aliases: pass, pwd
-
-
- port - -
- integer -
-
- Default:
443
-
-
The port number of the vSphere vCenter.
-
If the value is not specified in the task, the value of environment variable VMWARE_PORT will be used instead.
-
-
- protocol - -
- string -
-
-
    Choices: -
  • http
  • -
  • https ←
  • -
-
-
The connection to protocol.
-
-
- 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.
-
-
- 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 server.
-
If the value is not specified in the task, the value of environment variable VMWARE_USER will be used instead.
-

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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

hostname

+ +

+ string +

+
+

The hostname or IP address of the vSphere vCenter server.

+

If the value is not specified in the task, the value of environment variable VMWARE_HOST will be used instead.

+
+
+

library_id

+ +

+ string +

+
+

content library id for which details needs to be fetched.

+
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ string +

+
+

The password of the vSphere vCenter server.

+

If the value is not specified in the task, the value of environment variable VMWARE_PASSWORD will be used instead.

+
+
+

port

+ +

+ integer +

+
+

The port number of the vSphere vCenter.

+

If the value is not specified in the task, the value of environment variable VMWARE_PORT will be used instead.

+

Default: 443

+
+
+

protocol

+ +

+ string +

+
+

The connection to protocol.

+

Choices:

+
    +
  • "http"

  • +
  • "https" ← (default)

  • +
+ +
+
+

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.

+
+
+

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

+ +

aliases: admin, user

+

+ string +

+
+

The username of the vSphere vCenter server.

+

If the value is not specified in the task, the value of environment variable VMWARE_USER will be used instead.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + @@ -207,6 +211,7 @@ Examples .. code-block:: yaml + - name: Get List of Content Libraries community.vmware.vmware_content_library_info: hostname: '{{ vcenter_hostname }}' @@ -224,61 +229,71 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- content_lib_details - -
- list -
-
on success -
list of content library metadata
-
-
Sample:
-
[{'library_creation_time': '2019-07-02T11:50:52.242000', 'library_description': 'new description', 'library_id': '13b0f060-f4d3-4f84-b61f-0fe1b0c0a5a8', 'library_name': 'demo-local-lib', 'library_publish_info': {'authentication_method': 'NONE', 'persist_json_enabled': False, 'publish_url': None, 'published': False, 'user_name': None}, 'library_server_guid': '0fd5813b-aac7-4b92-9fb7-f18f16565613', 'library_type': 'LOCAL', 'library_version': '3'}]
-
-
- content_libs - -
- list -
-
on success -
list of content libraries
-
-
Sample:
-
['ded9c4d5-0dcd-4837-b1d8-af7398511e33', '36b72549-14ed-4b5f-94cb-6213fecacc02']
-
-

- - -Status ------- + + + + + + + + + + + + + + + + + +

Key

Description

+
+

content_lib_details

+ +

+ list + / elements=string +

+
+

list of content library metadata

+

Returned: on success

+

Sample: [{"library_creation_time": "2019-07-02T11:50:52.242000", "library_description": "new description", "library_id": "13b0f060-f4d3-4f84-b61f-0fe1b0c0a5a8", "library_name": "demo-local-lib", "library_publish_info": {"authentication_method": "NONE", "persist_json_enabled": false, "publish_url": null, "published": false, "user_name": null}, "library_server_guid": "0fd5813b-aac7-4b92-9fb7-f18f16565613", "library_type": "LOCAL", "library_version": "3"}]

+
+
+

content_libs

+ +

+ list + / elements=string +

+
+

list of content libraries

+

Returned: on success

+

Sample: ["ded9c4d5-0dcd-4837-b1d8-af7398511e33", "36b72549-14ed-4b5f-94cb-6213fecacc02"]

+
+ + Authors ~~~~~~~ - Pavan Bidkar (@pgbidkar) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_content_library_manager_module.rst b/docs/community.vmware.vmware_content_library_manager_module.rst index 5ccd12cad..512b1ef2c 100644 --- a/docs/community.vmware.vmware_content_library_manager_module.rst +++ b/docs/community.vmware.vmware_content_library_manager_module.rst @@ -1,12 +1,15 @@ -.. _community.vmware.vmware_content_library_manager_module: -*********************************************** -community.vmware.vmware_content_library_manager -*********************************************** +community.vmware.vmware_content_library_manager module -- Create, update and delete VMware content library +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Create, update and delete VMware content library** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. +You need further requirements to be able to use this module, +see `Requirements `_ for details. + +To use it in a playbook, specify: :code:`community.vmware.vmware_content_library_manager`. .. contents:: @@ -16,12 +19,15 @@ community.vmware.vmware_content_library_manager Synopsis -------- + - Module to manage VMware content Library - Content Library feature is introduced in vSphere 6.0 version, so this module is not supported in the earlier versions of vSphere. - All variables and VMware object names are case sensitive. +.. _ansible_collections.community.vmware.vmware_content_library_manager_module_requirements: + Requirements ------------ The below requirements are needed on the host that executes this module. @@ -29,316 +35,307 @@ The below requirements are needed on the host that executes this module. - vSphere Automation SDK + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- datastore_name - -
- string -
-
- -
Name of the datastore on which backing content library is created.
-
This is required only if state is set to present.
-
This parameter is ignored, when state is set to absent.
-
Currently only datastore backing creation is supported.
-

aliases: datastore
-
-
- hostname - -
- string -
-
- -
The hostname or IP address of the vSphere vCenter server.
-
If the value is not specified in the task, the value of environment variable VMWARE_HOST will be used instead.
-
-
- library_description - -
- string -
-
- -
The content library description.
-
This is required only if state is set to present.
-
This parameter is ignored, when state is set to absent.
-
Process of updating content library only allows description change.
-
-
- library_name - -
- string - / required -
-
- -
The name of VMware content library to manage.
-
-
- library_type - -
- string -
-
-
    Choices: -
  • local ←
  • -
  • subscribed
  • -
-
-
The content library type.
-
This is required only if state is set to present.
-
This parameter is ignored, when state is set to absent.
-
-
- password - -
- string -
-
- -
The password of the vSphere vCenter server.
-
If the value is not specified in the task, the value of environment variable VMWARE_PASSWORD will be used instead.
-

aliases: pass, pwd
-
-
- port - -
- integer -
-
- Default:
443
-
-
The port number of the vSphere vCenter.
-
If the value is not specified in the task, the value of environment variable VMWARE_PORT will be used instead.
-
-
- protocol - -
- string -
-
-
    Choices: -
  • http
  • -
  • https ←
  • -
-
-
The connection to protocol.
-
-
- 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.
-
-
- 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.
-
-
- ssl_thumbprint - -
- string -
-
- Default:
""
-
-
The SHA1 SSL thumbprint of the subscribed content library to subscribe to.
-
This is required only if library_type is set to subscribed and the library is https.
-
This parameter is ignored, when state is set to absent.
-
The information can be extracted using openssl using the following example: echo | openssl s_client -connect test-library.com:443 |& openssl x509 -fingerprint -noout
-
-
- state - -
- string -
-
-
    Choices: -
  • present ←
  • -
  • absent
  • -
-
-
The state of content library.
-
If set to present and library does not exists, then content library is created.
-
If set to present and library exists, then content library is updated.
-
If set to absent and library exists, then content library is deleted.
-
If set to absent and library does not exists, no action is taken.
-
-
- subscription_url - -
- string -
-
- Default:
""
-
-
The url of the content library to subscribe to.
-
This is required only if library_type is set to subscribed.
-
This parameter is ignored, when state is set to absent.
-
-
- update_on_demand - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Whether to download all content on demand.
-
If set to true, all content will be downloaded on demand.
-
If set to false content will be downloaded ahead of time.
-
This is required only if library_type is set to subscribed.
-
This parameter is ignored, when state is set to absent.
-
-
- username - -
- string -
-
- -
The username of the vSphere vCenter server.
-
If the value is not specified in the task, the value of environment variable VMWARE_USER will be used instead.
-

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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+
+

datastore_name

+ +

aliases: datastore

+

+ string +

+
+

Name of the datastore on which backing content library is created.

+

This is required only if state is set to present.

+

This parameter is ignored, when state is set to absent.

+

Currently only datastore backing creation is supported.

+
+
+

hostname

+ +

+ string +

+
+

The hostname or IP address of the vSphere vCenter server.

+

If the value is not specified in the task, the value of environment variable VMWARE_HOST will be used instead.

+
+
+

library_description

+ +

+ string +

+
+

The content library description.

+

This is required only if state is set to present.

+

This parameter is ignored, when state is set to absent.

+

Process of updating content library only allows description change.

+
+
+

library_name

+ +

+ string + / required +

+
+

The name of VMware content library to manage.

+
+
+

library_type

+ +

+ string +

+
+

The content library type.

+

This is required only if state is set to present.

+

This parameter is ignored, when state is set to absent.

+

Choices:

+
    +
  • "local" ← (default)

  • +
  • "subscribed"

  • +
+ +
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ string +

+
+

The password of the vSphere vCenter server.

+

If the value is not specified in the task, the value of environment variable VMWARE_PASSWORD will be used instead.

+
+
+

port

+ +

+ integer +

+
+

The port number of the vSphere vCenter.

+

If the value is not specified in the task, the value of environment variable VMWARE_PORT will be used instead.

+

Default: 443

+
+
+

protocol

+ +

+ string +

+
+

The connection to protocol.

+

Choices:

+
    +
  • "http"

  • +
  • "https" ← (default)

  • +
+ +
+
+

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.

+
+
+

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.

+
+
+

ssl_thumbprint

+ +

+ string +

+
+

The SHA1 SSL thumbprint of the subscribed content library to subscribe to.

+

This is required only if library_type is set to subscribed and the library is https.

+

This parameter is ignored, when state is set to absent.

+

The information can be extracted using openssl using the following example: echo | openssl s_client -connect test-library.com:443 |& openssl x509 -fingerprint -noout

+

Default: ""

+
+
+

state

+ +

+ string +

+
+

The state of content library.

+

If set to present and library does not exists, then content library is created.

+

If set to present and library exists, then content library is updated.

+

If set to absent and library exists, then content library is deleted.

+

If set to absent and library does not exists, no action is taken.

+

Choices:

+
    +
  • "present" ← (default)

  • +
  • "absent"

  • +
+ +
+
+

subscription_url

+ +

+ string +

+
+

The url of the content library to subscribe to.

+

This is required only if library_type is set to subscribed.

+

This parameter is ignored, when state is set to absent.

+

Default: ""

+
+
+

update_on_demand

+ +

+ boolean +

+
+

Whether to download all content on demand.

+

If set to true, all content will be downloaded on demand.

+

If set to false content will be downloaded ahead of time.

+

This is required only if library_type is set to subscribed.

+

This parameter is ignored, when state is set to absent.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ string +

+
+

The username of the vSphere vCenter server.

+

If the value is not specified in the task, the value of environment variable VMWARE_USER will be used instead.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + @@ -348,6 +345,7 @@ Examples .. code-block:: yaml + - name: Create Local Content Library community.vmware.vmware_content_library_manager: hostname: '{{ vcenter_hostname }}' @@ -396,44 +394,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- content_library_info - -
- dictionary -
-
on success -
library creation success and library_id
-
-
Sample:
-
{'library_id': 'd0b92fa9-7039-4f29-8e9c-0debfcb22b72', 'library_description': 'Test description', 'library_type': 'LOCAL', 'msg': "Content Library 'demo-local-lib-4' created."}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

content_library_info

+ +

+ dictionary +

+
+

library creation success and library_id

+

Returned: on success

+

Sample: {"library_description": "Test description", "library_id": "d0b92fa9-7039-4f29-8e9c-0debfcb22b72", "library_type": "LOCAL", "msg": "Content Library 'demo-local-lib-4' created."}

+
+ + Authors ~~~~~~~ - Pavan Bidkar (@pgbidkar) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_custom_attribute_manager_module.rst b/docs/community.vmware.vmware_custom_attribute_manager_module.rst index 3a9077229..e1bcc149a 100644 --- a/docs/community.vmware.vmware_custom_attribute_manager_module.rst +++ b/docs/community.vmware.vmware_custom_attribute_manager_module.rst @@ -1,14 +1,15 @@ -.. _community.vmware.vmware_custom_attribute_manager_module: -************************************************ -community.vmware.vmware_custom_attribute_manager -************************************************ +community.vmware.vmware_custom_attribute_manager module -- Manage custom attributes from VMware for the given vSphere object +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Manage custom attributes from VMware for the given vSphere object** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. -Version added: 3.2.0 +To use it in a playbook, specify: :code:`community.vmware.vmware_custom_attribute_manager`. + +New in community.vmware 3.2.0 .. contents:: :local: @@ -17,275 +18,266 @@ Version added: 3.2.0 Synopsis -------- + - This module can be used to add, remove and update custom attributes for the given vSphere object. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- custom_attributes - -
- list - / elements=dictionary - / required -
-
- -
A list of name and value of custom attributes that needs to be manage.
-
Value of custom attribute is not required and will be ignored, if state is set to absent.
-
-
- name - -
- string - / required -
-
- -
Name of the attribute.
-
-
- value - -
- string -
-
- Default:
""
-
-
Value of the attribute.
-
-
- 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.
-
-
- object_name - -
- string - / required -
-
- -
Name of the vSphere object to work with.
-
-
- object_type - -
- string - / required -
-
-
    Choices: -
  • Cluster
  • -
  • Datacenter
  • -
  • Datastore
  • -
  • DistributedVirtualPortgroup
  • -
  • DistributedVirtualSwitch
  • -
  • Folder
  • -
  • HostSystem
  • -
  • ResourcePool
  • -
  • VirtualMachine
  • -
-
-
Type of the object the custom attribute is associated with.
-
-
- 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, the custom attribute is set to the given value.
-
If set to absent, the custom attribute is cleared. The given value is ignored in this case.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

custom_attributes

+ +

+ list + / elements=dictionary + / required +

+
+

A list of name and value of custom attributes that needs to be manage.

+

Value of custom attribute is not required and will be ignored, if state is set to absent.

+
+
+

name

+ +

+ string + / required +

+
+

Name of the attribute.

+
+
+

value

+ +

+ string +

+
+

Value of the attribute.

+

Default: ""

+
+
+

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.

+
+
+

object_name

+ +

+ string + / required +

+
+

Name of the vSphere object to work with.

+
+
+

object_type

+ +

+ string + / required +

+
+

Type of the object the custom attribute is associated with.

+

Choices:

+
    +
  • "Cluster"

  • +
  • "Datacenter"

  • +
  • "Datastore"

  • +
  • "DistributedVirtualPortgroup"

  • +
  • "DistributedVirtualSwitch"

  • +
  • "Folder"

  • +
  • "HostSystem"

  • +
  • "ResourcePool"

  • +
  • "VirtualMachine"

  • +
+ +
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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 +

+
+

If set to present, the custom attribute is set to the given value.

+

If set to absent, the custom attribute is cleared. The given value is ignored in this case.

+

Choices:

+
    +
  • "present" ← (default)

  • +
  • "absent"

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -293,6 +285,7 @@ Examples .. code-block:: yaml + - name: Add virtual machine custom attributes community.vmware.vmware_custom_attribute_manager: hostname: "{{ vcenter_hostname }}" @@ -337,11 +330,20 @@ Examples -Status ------- + Authors ~~~~~~~ - Mario Lenz (@mariolenz) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_custom_attribute_module.rst b/docs/community.vmware.vmware_custom_attribute_module.rst index 6cf068807..92195c8d3 100644 --- a/docs/community.vmware.vmware_custom_attribute_module.rst +++ b/docs/community.vmware.vmware_custom_attribute_module.rst @@ -1,14 +1,15 @@ -.. _community.vmware.vmware_custom_attribute_module: -**************************************** -community.vmware.vmware_custom_attribute -**************************************** +community.vmware.vmware_custom_attribute module -- Manage custom attributes definitions ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Manage custom attributes definitions** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. -Version added: 3.2.0 +To use it in a playbook, specify: :code:`community.vmware.vmware_custom_attribute`. + +New in community.vmware 3.2.0 .. contents:: :local: @@ -17,226 +18,223 @@ Version added: 3.2.0 Synopsis -------- + - This module can be used to add and remove custom attributes definitions for various vSphere objects. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- custom_attribute - -
- string - / required -
-
- -
Name of the custom attribute.
-
-
- 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.
-
-
- object_type - -
- string - / required -
-
-
    Choices: -
  • Cluster
  • -
  • Datacenter
  • -
  • Datastore
  • -
  • DistributedVirtualPortgroup
  • -
  • DistributedVirtualSwitch
  • -
  • Folder
  • -
  • Global
  • -
  • HostSystem
  • -
  • ResourcePool
  • -
  • VirtualMachine
  • -
-
-
Type of the object the custom attribute is associated with.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

custom_attribute

+ +

+ string + / required +

+
+

Name of the custom attribute.

+
+
+

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.

+
+
+

object_type

+ +

+ string + / required +

+
+

Type of the object the custom attribute is associated with.

+

Choices:

+
    +
  • "Cluster"

  • +
  • "Datacenter"

  • +
  • "Datastore"

  • +
  • "DistributedVirtualPortgroup"

  • +
  • "DistributedVirtualSwitch"

  • +
  • "Folder"

  • +
  • "Global"

  • +
  • "HostSystem"

  • +
  • "ResourcePool"

  • +
  • "VirtualMachine"

  • +
+ +
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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 +

+
+

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.

+

Choices:

+
    +
  • "present" ← (default)

  • +
  • "absent"

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -244,6 +242,7 @@ Examples .. code-block:: yaml + - name: Add VM Custom Attribute Definition community.vmware.vmware_custom_attribute: hostname: "{{ vcenter_hostname }}" @@ -269,11 +268,20 @@ Examples -Status ------- + Authors ~~~~~~~ - Mario Lenz (@mariolenz) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_datacenter_info_module.rst b/docs/community.vmware.vmware_datacenter_info_module.rst index a7503a742..37558f3c8 100644 --- a/docs/community.vmware.vmware_datacenter_info_module.rst +++ b/docs/community.vmware.vmware_datacenter_info_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_datacenter_info_module: -*************************************** -community.vmware.vmware_datacenter_info -*************************************** +community.vmware.vmware_datacenter_info module -- Gather information about VMware vSphere Datacenters ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Gather information about VMware vSphere Datacenters** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_datacenter_info`. .. contents:: @@ -16,239 +17,235 @@ community.vmware.vmware_datacenter_info Synopsis -------- + - This module can be used to gather information VMware vSphere Datacenters. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- datacenter - -
- string -
-
- -
The name of the datacenter to gather information for.
-
If not provided, will gather information about all datacenters from the VMware infra.
-

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.
-
-
- 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: [
-
"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.
-
-
- show_tag - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Tags related to Datacenter are shown if set to true.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+
+

datacenter

+ +

aliases: datacenter_name

+

+ string +

+
+

The name of the datacenter to gather information for.

+

If not provided, will gather information about all datacenters from the VMware infra.

+
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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: [

+

"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 +

+
+

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.

+

Choices:

+
    +
  • "summary" ← (default)

  • +
  • "vsphere"

  • +
+ +
+
+

show_tag

+ +

+ boolean +

+
+

Tags related to Datacenter are shown if set to true.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -256,6 +253,7 @@ Examples .. code-block:: yaml + - name: Gather information about all datacenters community.vmware.vmware_datacenter_info: hostname: '{{ vcenter_hostname }}' @@ -293,44 +291,55 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- datacenter_info - -
- list -
-
always -
Information about datacenter
-
-
Sample:
-
[{'configStatus': 'gray', 'moid': 'datacenter-2', 'name': 'Asia-Datacenter1'}]
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

datacenter_info

+ +

+ list + / elements=string +

+
+

Information about datacenter

+

Returned: always

+

Sample: [{"configStatus": "gray", "moid": "datacenter-2", "name": "Asia-Datacenter1"}]

+
+ + Authors ~~~~~~~ - Abhijeet Kasurde (@Akasurde) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_datacenter_module.rst b/docs/community.vmware.vmware_datacenter_module.rst index 535a7d413..3d1c59fe1 100644 --- a/docs/community.vmware.vmware_datacenter_module.rst +++ b/docs/community.vmware.vmware_datacenter_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_datacenter_module: -********************************** -community.vmware.vmware_datacenter -********************************** +community.vmware.vmware_datacenter module -- Manage VMware vSphere Datacenters +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Manage VMware vSphere Datacenters** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_datacenter`. .. contents:: @@ -16,194 +17,191 @@ community.vmware.vmware_datacenter Synopsis -------- + - This module can be used to manage (create, delete) VMware vSphere Datacenters. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- datacenter_name - -
- string - / required -
-
- -
The name of the datacenter the cluster will be created in.
-
-
- 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
  • -
-
-
If the datacenter should be present or absent.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

datacenter_name

+ +

+ string + / required +

+
+

The name of the datacenter the cluster will be created in.

+
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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 +

+
+

If the datacenter should be present or absent.

+

Choices:

+
    +
  • "present" ← (default)

  • +
  • "absent"

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -211,6 +209,7 @@ Examples .. code-block:: yaml + - name: Create Datacenter community.vmware.vmware_datacenter: hostname: '{{ vcenter_hostname }}' @@ -233,8 +232,7 @@ Examples -Status ------- + Authors @@ -242,3 +240,13 @@ Authors - Joseph Callen (@jcpowermac) - Kamil Szczygiel (@kamsz) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_datastore_cluster_manager_module.rst b/docs/community.vmware.vmware_datastore_cluster_manager_module.rst index f43579cfa..df06b23e7 100644 --- a/docs/community.vmware.vmware_datastore_cluster_manager_module.rst +++ b/docs/community.vmware.vmware_datastore_cluster_manager_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_datastore_cluster_manager_module: -************************************************* -community.vmware.vmware_datastore_cluster_manager -************************************************* +community.vmware.vmware_datastore_cluster_manager module -- Manage VMware vSphere datastore cluster's members ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Manage VMware vSphere datastore cluster's members** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_datastore_cluster_manager`. .. contents:: @@ -16,230 +17,225 @@ community.vmware.vmware_datastore_cluster_manager Synopsis -------- + - This module can be used to add datastore in the datastore cluster. - All parameters and VMware object values are case sensitive. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- datacenter_name - -
- string -
-
- -
The name of the datacenter.
-

aliases: datacenter
-
-
- datastore_cluster_name - -
- string - / required -
-
- -
The name of the datastore cluster.
-

aliases: datastore_cluster
-
-
- datastores - -
- list - / elements=string - / required -
-
- -
A list of datastores to be 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.
-
-
- 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, datastores specified by datastores will be added to the given datastore cluster.
-
If set to absent, datastores specified by datastores will be moved from the given datastore cluster to datstore folder of the parent datacenter.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+
+

datacenter_name

+ +

aliases: datacenter

+

+ string +

+
+

The name of the datacenter.

+
+
+
+

datastore_cluster_name

+ +

aliases: datastore_cluster

+

+ string + / required +

+
+

The name of the datastore cluster.

+
+
+

datastores

+ +

+ list + / elements=string + / required +

+
+

A list of datastores to be 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.

+
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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 +

+
+

If set to present, datastores specified by datastores will be added to the given datastore cluster.

+

If set to absent, datastores specified by datastores will be moved from the given datastore cluster to datstore folder of the parent datacenter.

+

Choices:

+
    +
  • "present" ← (default)

  • +
  • "absent"

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -247,6 +243,7 @@ Examples .. code-block:: yaml + - name: Add datastore to the given datastore cluster community.vmware.vmware_datastore_cluster_manager: hostname: '{{ vcenter_hostname }}' @@ -275,44 +272,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- datastore_cluster_info - -
- string -
-
always -
information about datastore cluster
-
-
Sample:
-
{'changed_datastores': ['ds_171_1'], 'current_datastores': [], 'msg': None, 'previous_datastores': ['ds_171_1']}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

datastore_cluster_info

+ +

+ string +

+
+

information about datastore cluster

+

Returned: always

+

Sample: "{'changed_datastores': ['ds_171_1'], 'current_datastores': [], 'msg': None, 'previous_datastores': ['ds_171_1']}"

+
+ + Authors ~~~~~~~ - Abhijeet Kasurde (@Akasurde) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_datastore_cluster_module.rst b/docs/community.vmware.vmware_datastore_cluster_module.rst index 27d9b0c4a..9442ce524 100644 --- a/docs/community.vmware.vmware_datastore_cluster_module.rst +++ b/docs/community.vmware.vmware_datastore_cluster_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_datastore_cluster_module: -***************************************** -community.vmware.vmware_datastore_cluster -***************************************** +community.vmware.vmware_datastore_cluster module -- Manage VMware vSphere datastore clusters +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Manage VMware vSphere datastore clusters** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_datastore_cluster`. .. contents:: @@ -16,331 +17,323 @@ community.vmware.vmware_datastore_cluster Synopsis -------- + - This module can be used to add and delete datastore cluster in given VMware environment. - All parameters and VMware object values are case sensitive. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- automation_level - -
- string -
-
-
    Choices: -
  • automated
  • -
  • manual ←
  • -
-
-
Run SDRS automated or manually.
-
-
- datacenter_name - -
- string -
-
- -
The name of the datacenter.
-
You must specify either a datacenter_name or a folder.
-
Mutually exclusive with folder parameter.
-

aliases: datacenter
-
-
- datastore_cluster_name - -
- string - / required -
-
- -
The name of the datastore cluster.
-
-
- enable_io_loadbalance - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Whether or not storage DRS takes into account storage I/O workload when making load balancing and initial placement recommendations.
-
-
- enable_sdrs - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Whether or not storage DRS is enabled.
-
-
- folder - -
- string -
-
- -
Destination folder, absolute path to place datastore cluster in.
-
The folder should include the datacenter.
-
This parameter is case sensitive.
-
You must specify either a folder or a datacenter_name.
-
Examples:
-
folder: /datacenter1/datastore
-
folder: datacenter1/datastore
-
folder: /datacenter1/datastore/folder1
-
folder: datacenter1/datastore/folder1
-
folder: /folder1/datacenter1/datastore
-
folder: folder1/datacenter1/datastore
-
folder: /folder1/datacenter1/datastore/folder2
-
-
- 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.
-
-
- keep_vmdks_together - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Specifies whether or not each VM in this datastore cluster should have its virtual disks on the same datastore by default.
-
-
- loadbalance_interval - -
- integer -
-
- Default:
480
-
-
Specify the interval in minutes that storage DRS runs to load balance among datastores.
-
-
- 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 the datastore cluster should be present or absent.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

automation_level

+ +

+ string +

+
+

Run SDRS automated or manually.

+

Choices:

+
    +
  • "automated"

  • +
  • "manual" ← (default)

  • +
+ +
+
+
+

datacenter_name

+ +

aliases: datacenter

+

+ string +

+
+

The name of the datacenter.

+

You must specify either a datacenter_name or a folder.

+

Mutually exclusive with folder parameter.

+
+
+

datastore_cluster_name

+ +

+ string + / required +

+
+

The name of the datastore cluster.

+
+
+

enable_io_loadbalance

+ +

+ boolean +

+
+

Whether or not storage DRS takes into account storage I/O workload when making load balancing and initial placement recommendations.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

enable_sdrs

+ +

+ boolean +

+
+

Whether or not storage DRS is enabled.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

folder

+ +

+ string +

+
+

Destination folder, absolute path to place datastore cluster in.

+

The folder should include the datacenter.

+

This parameter is case sensitive.

+

You must specify either a folder or a datacenter_name.

+

Examples:

+

folder: /datacenter1/datastore

+

folder: datacenter1/datastore

+

folder: /datacenter1/datastore/folder1

+

folder: datacenter1/datastore/folder1

+

folder: /folder1/datacenter1/datastore

+

folder: folder1/datacenter1/datastore

+

folder: /folder1/datacenter1/datastore/folder2

+
+
+

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.

+
+
+

keep_vmdks_together

+ +

+ boolean +

+
+

Specifies whether or not each VM in this datastore cluster should have its virtual disks on the same datastore by default.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

loadbalance_interval

+ +

+ integer +

+
+

Specify the interval in minutes that storage DRS runs to load balance among datastores.

+

Default: 480

+
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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 +

+
+

If the datastore cluster should be present or absent.

+

Choices:

+
    +
  • "present" ← (default)

  • +
  • "absent"

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -348,6 +341,7 @@ Examples .. code-block:: yaml + - name: Create datastore cluster and enable SDRS community.vmware.vmware_datastore_cluster: hostname: '{{ vcenter_hostname }}' @@ -381,44 +375,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- result - -
- string -
-
always -
information about datastore cluster operation
-
-
Sample:
-
Datastore cluster 'DSC2' created successfully.
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

result

+ +

+ string +

+
+

information about datastore cluster operation

+

Returned: always

+

Sample: "Datastore cluster 'DSC2' created successfully."

+
+ + Authors ~~~~~~~ - Abhijeet Kasurde (@Akasurde) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_datastore_info_module.rst b/docs/community.vmware.vmware_datastore_info_module.rst index af37de0da..2c012d450 100644 --- a/docs/community.vmware.vmware_datastore_info_module.rst +++ b/docs/community.vmware.vmware_datastore_info_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_datastore_info_module: -************************************** -community.vmware.vmware_datastore_info -************************************** +community.vmware.vmware_datastore_info module -- Gather info about datastores available in given vCenter +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Gather info about datastores available in given vCenter** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_datastore_info`. .. contents:: @@ -16,318 +17,310 @@ community.vmware.vmware_datastore_info Synopsis -------- + - This module can be used to gather information about datastores in VMWare infrastructure. - All values and VMware object names are case sensitive. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- cluster - -
- string -
-
- -
Cluster to search for datastores.
-
If set, information of datastores belonging this clusters will be returned.
-
This parameter is required, if datacenter is not supplied.
-
-
- datacenter - -
- string -
-
- -
Datacenter to search for datastores.
-
This parameter is required, if cluster is not supplied.
-

aliases: datacenter_name
-
-
- gather_nfs_mount_info - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Gather mount information of NFS datastores.
-
Disabled per default because this slows down the execution if you have a lot of datastores.
-
Only valid when schema is summary.
-
-
- gather_vmfs_mount_info - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Gather mount information of VMFS datastores.
-
Disabled per default because this slows down the execution if you have a lot of datastores.
-
Only valid when schema is summary.
-
-
- 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 -
-
- -
Name of the datastore to match.
-
If set, information of specific datastores are returned.
-
-
- 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: [
-
"name",
-
"info.vmfs.ssd",
-
"capability.vsanSparseSupported",
-
"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
-
-
- show_tag - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Tags related to Datastore are shown if set to true.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

cluster

+ +

+ string +

+
+

Cluster to search for datastores.

+

If set, information of datastores belonging this clusters will be returned.

+

This parameter is required, if datacenter is not supplied.

+
+
+
+

datacenter

+ +

aliases: datacenter_name

+

+ string +

+
+

Datacenter to search for datastores.

+

This parameter is required, if cluster is not supplied.

+
+
+

gather_nfs_mount_info

+ +

+ boolean +

+
+

Gather mount information of NFS datastores.

+

Disabled per default because this slows down the execution if you have a lot of datastores.

+

Only valid when schema is summary.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

gather_vmfs_mount_info

+ +

+ boolean +

+
+

Gather mount information of VMFS datastores.

+

Disabled per default because this slows down the execution if you have a lot of datastores.

+

Only valid when schema is summary.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

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 +

+
+

Name of the datastore to match.

+

If set, information of specific datastores are returned.

+
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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: [

+

"name",

+

"info.vmfs.ssd",

+

"capability.vsanSparseSupported",

+

"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 +

+
+

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

+

Choices:

+
    +
  • "summary" ← (default)

  • +
  • "vsphere"

  • +
+ +
+
+

show_tag

+ +

+ boolean +

+
+

Tags related to Datastore are shown if set to true.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -335,6 +328,7 @@ Examples .. code-block:: yaml + - name: Gather info from standalone ESXi server having datacenter as 'ha-datacenter' community.vmware.vmware_datastore_info: hostname: '{{ esxi_hostname }}' @@ -371,44 +365,55 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- datastores - -
- list -
-
always -
metadata about the available datastores
-
-
Sample:
-
[{'accessible': False, 'capacity': 42681237504, 'datastore_cluster': 'datacluster0', 'freeSpace': 39638269952, 'maintenanceMode': 'normal', 'multipleHostAccess': False, 'name': 'datastore2', 'provisioned': 12289211488, 'type': 'VMFS', 'uncommitted': 9246243936, 'url': 'ds:///vmfs/volumes/5a69b18a-c03cd88c-36ae-5254001249ce/', 'vmfs_blockSize': 1024, 'vmfs_uuid': '5a69b18a-c03cd88c-36ae-5254001249ce', 'vmfs_version': '6.81'}, {'accessible': True, 'capacity': 5497558138880, 'datastore_cluster': 'datacluster0', 'freeSpace': 4279000641536, 'maintenanceMode': 'normal', 'multipleHostAccess': True, 'name': 'datastore3', 'nfs_path': '/vol/datastore3', 'nfs_server': 'nfs_server1', 'provisioned': 1708109410304, 'type': 'NFS', 'uncommitted': 489551912960, 'url': 'ds:///vmfs/volumes/420b3e73-67070776/'}]
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

datastores

+ +

+ list + / elements=string +

+
+

metadata about the available datastores

+

Returned: always

+

Sample: [{"accessible": false, "capacity": 42681237504, "datastore_cluster": "datacluster0", "freeSpace": 39638269952, "maintenanceMode": "normal", "multipleHostAccess": false, "name": "datastore2", "provisioned": 12289211488, "type": "VMFS", "uncommitted": 9246243936, "url": "ds:///vmfs/volumes/5a69b18a-c03cd88c-36ae-5254001249ce/", "vmfs_blockSize": 1024, "vmfs_uuid": "5a69b18a-c03cd88c-36ae-5254001249ce", "vmfs_version": "6.81"}, {"accessible": true, "capacity": 5497558138880, "datastore_cluster": "datacluster0", "freeSpace": 4279000641536, "maintenanceMode": "normal", "multipleHostAccess": true, "name": "datastore3", "nfs_path": "/vol/datastore3", "nfs_server": "nfs_server1", "provisioned": 1708109410304, "type": "NFS", "uncommitted": 489551912960, "url": "ds:///vmfs/volumes/420b3e73-67070776/"}]

+
+ + Authors ~~~~~~~ - Tim Rightnour (@garbled1) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_datastore_maintenancemode_module.rst b/docs/community.vmware.vmware_datastore_maintenancemode_module.rst index 1b4bc2bef..835afea40 100644 --- a/docs/community.vmware.vmware_datastore_maintenancemode_module.rst +++ b/docs/community.vmware.vmware_datastore_maintenancemode_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_datastore_maintenancemode_module: -************************************************* -community.vmware.vmware_datastore_maintenancemode -************************************************* +community.vmware.vmware_datastore_maintenancemode module -- Place a datastore into maintenance mode ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Place a datastore into maintenance mode** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_datastore_maintenancemode`. .. contents:: @@ -16,230 +17,223 @@ community.vmware.vmware_datastore_maintenancemode Synopsis -------- + - This module can be used to manage maintenance mode of a datastore. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- cluster_name - -
- string -
-
- -
Name of the cluster where datastore is connected to.
-
If multiple datastores are connected to the given cluster, then all datastores will be managed by state.
-
If datastore or datastore_cluster are not set, this parameter is required.
-
-
- datastore - -
- string -
-
- -
Name of datastore to manage.
-
If datastore_cluster or cluster_name are not set, this parameter is required.
-
-
- datastore_cluster - -
- string -
-
- -
Name of the datastore cluster from all child datastores to be managed.
-
If datastore or cluster_name are not set, this parameter is required.
-
-
- 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
  • -
-
-
If set to present, then enter datastore into maintenance mode.
-
If set to present and datastore is already in maintenance mode, then no action will be taken.
-
If set to absent and datastore is in maintenance mode, then exit maintenance mode.
-
If set to absent and datastore is not in maintenance mode, then no action will be taken.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

cluster_name

+ +

+ string +

+
+

Name of the cluster where datastore is connected to.

+

If multiple datastores are connected to the given cluster, then all datastores will be managed by state.

+

If datastore or datastore_cluster are not set, this parameter is required.

+
+
+

datastore

+ +

+ string +

+
+

Name of datastore to manage.

+

If datastore_cluster or cluster_name are not set, this parameter is required.

+
+
+

datastore_cluster

+ +

+ string +

+
+

Name of the datastore cluster from all child datastores to be managed.

+

If datastore or cluster_name are not set, this parameter is required.

+
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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 +

+
+

If set to present, then enter datastore into maintenance mode.

+

If set to present and datastore is already in maintenance mode, then no action will be taken.

+

If set to absent and datastore is in maintenance mode, then exit maintenance mode.

+

If set to absent and datastore is not in maintenance mode, then no action will be taken.

+

Choices:

+
    +
  • "present" ← (default)

  • +
  • "absent"

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -247,6 +241,7 @@ Examples .. code-block:: yaml + - name: Enter datastore into Maintenance Mode community.vmware.vmware_datastore_maintenancemode: hostname: '{{ vcenter_hostname }}' @@ -285,44 +280,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- datastore_status - -
- dictionary -
-
always -
Action taken for datastore
-
-
Sample:
-
{'ds_226_01': "Datastore 'ds_226_01' is already in maintenance mode."}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

datastore_status

+ +

+ dictionary +

+
+

Action taken for datastore

+

Returned: always

+

Sample: {"ds_226_01": "Datastore 'ds_226_01' is already in maintenance mode."}

+
+ + Authors ~~~~~~~ - Abhijeet Kasurde (@Akasurde) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_datastore_module.rst b/docs/community.vmware.vmware_datastore_module.rst index 96304be52..085fc3f00 100644 --- a/docs/community.vmware.vmware_datastore_module.rst +++ b/docs/community.vmware.vmware_datastore_module.rst @@ -1,14 +1,15 @@ -.. _community.vmware.vmware_datastore_module: -********************************* -community.vmware.vmware_datastore -********************************* +community.vmware.vmware_datastore module -- Configure Datastores +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Configure Datastores** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. -Version added: 3.0.0 +To use it in a playbook, specify: :code:`community.vmware.vmware_datastore`. + +New in community.vmware 3.0.0 .. contents:: :local: @@ -17,269 +18,261 @@ Version added: 3.0.0 Synopsis -------- + - Configure Storage I/O Control Settings of a Datastore. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- congestion_threshold_manual - -
- integer -
-
- -
Storage I/O congestion threshold in ms.
-
Only use congestion_threshold_percentage or congestion_threshold_manual.
-
Only valid when storage_io_control is enable_io_statistics.
-
-
- congestion_threshold_percentage - -
- integer -
-
- Default:
90
-
-
Storage I/O congestion threshold in percentage of peak throughput.
-
A value between 50% and 100%.
-
Recommended: 90%
-
Only use congestion_threshold_percentage or congestion_threshold_manual.
-
Only valid when storage_io_control is enable_io_statistics.
-
-
- datacenter - -
- string -
-
- -
Datacenter to search for the datastores.
-

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.
-
-
- name - -
- string - / required -
-
- -
Name of the datastore.
-
-
- 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.
-
-
- statistic_collection - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Include I/O statistics for SDRS.
-
Only valid when storage_io_control is enable_io_statistics or enable_statistics.
-
-
- storage_io_control - -
- string - / required -
-
-
    Choices: -
  • enable_io_statistics
  • -
  • enable_statistics
  • -
  • disable
  • -
-
-
Specify datastore typ.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

congestion_threshold_manual

+ +

+ integer +

+
+

Storage I/O congestion threshold in ms.

+

Only use congestion_threshold_percentage or congestion_threshold_manual.

+

Only valid when storage_io_control is enable_io_statistics.

+
+
+

congestion_threshold_percentage

+ +

+ integer +

+
+

Storage I/O congestion threshold in percentage of peak throughput.

+

A value between 50% and 100%.

+

Recommended: 90%

+

Only use congestion_threshold_percentage or congestion_threshold_manual.

+

Only valid when storage_io_control is enable_io_statistics.

+

Default: 90

+
+
+
+

datacenter

+ +

aliases: datacenter_name

+

+ string +

+
+

Datacenter to search for the datastores.

+
+
+

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 + / required +

+
+

Name of the datastore.

+
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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.

+
+
+

statistic_collection

+ +

+ boolean +

+
+

Include I/O statistics for SDRS.

+

Only valid when storage_io_control is enable_io_statistics or enable_statistics.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

storage_io_control

+ +

+ string + / required +

+
+

Specify datastore typ.

+

Choices:

+
    +
  • "enable_io_statistics"

  • +
  • "enable_statistics"

  • +
  • "disable"

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -287,6 +280,7 @@ Examples .. code-block:: yaml + - name: Configure Storage I/O Control of an mounted datastore community.vmware.vmware_datastore_info: hostname: '{{ vcenter_hostname }}' @@ -302,44 +296,55 @@ Examples + + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- result - -
- string -
-
always -
Information about datastore operation.
-
-
Sample:
-
Datastore configured successfully.
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

result

+ +

+ string +

+
+

Information about datastore operation.

+

Returned: always

+

Sample: "Datastore configured successfully."

+
+ + Authors ~~~~~~~ - Nina Loser (@Nina2244) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_deploy_ovf_module.rst b/docs/community.vmware.vmware_deploy_ovf_module.rst index be2a35d11..814971d8f 100644 --- a/docs/community.vmware.vmware_deploy_ovf_module.rst +++ b/docs/community.vmware.vmware_deploy_ovf_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_deploy_ovf_module: -********************************** -community.vmware.vmware_deploy_ovf -********************************** +community.vmware.vmware_deploy_ovf module -- Deploys a VMware virtual machine from an OVF or OVA file ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Deploys a VMware virtual machine from an OVF or OVA file** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_deploy_ovf`. .. contents:: @@ -16,490 +17,467 @@ community.vmware.vmware_deploy_ovf Synopsis -------- + - This module can be used to deploy a VMware VM from an OVF or OVA file + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- allow_duplicates - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
- Default:
"True"
-
-
Whether or not to allow duplicate VM names. ESXi allows duplicates, vCenter may not.
-
-
- cluster - -
- string -
-
- -
Cluster to deploy to.
-
This is a required parameter, if esxi_hostname is not set and hostname is set to the vCenter server.
-
esxi_hostname and cluster are mutually exclusive parameters.
-
This parameter is case sensitive.
-
-
- datacenter - -
- string -
-
- Default:
"ha-datacenter"
-
-
Datacenter to deploy to.
-
-
- datastore - -
- string -
-
- Default:
"datastore1"
-
-
Datastore to deploy to.
-
-
- deployment_option - -
- string -
-
- -
The key of the chosen deployment option.
-
-
- disk_provisioning - -
- string -
-
-
    Choices: -
  • flat
  • -
  • eagerZeroedThick
  • -
  • monolithicSparse
  • -
  • twoGbMaxExtentSparse
  • -
  • twoGbMaxExtentFlat
  • -
  • thin ←
  • -
  • sparse
  • -
  • thick
  • -
  • seSparse
  • -
  • monolithicFlat
  • -
-
-
Disk provisioning type.
-
-
- esxi_hostname - -
- string -
-
- -
The ESXi hostname where the virtual machine will run.
-
This is a required parameter, if cluster is not set and hostname is set to the vCenter server.
-
esxi_hostname and cluster are mutually exclusive parameters.
-
This parameter is case sensitive.
-
-
- fail_on_spec_warnings - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Cause the module to treat OVF Import Spec warnings as errors.
-
-
- folder - -
- string -
-
- -
Absolute path of folder to place the virtual machine.
-
If not specified, defaults to the value of datacenter.vmFolder.
-
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.
-
-
- inject_ovf_env - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Force the given properties to be inserted into an OVF Environment and injected through VMware Tools.
-
-
- name - -
- string -
-
- -
Name of the VM to work with.
-
Virtual machine names in vCenter are not necessarily unique, which may be problematic.
-
-
- networks - -
- dictionary -
-
- Default:
{"VM Network": "VM Network"}
-
-
key: value mapping of OVF network name, to the vCenter network name.
-
-
- ovf - -
- path -
-
- -
Path to OVF or OVA file to deploy.
-

aliases: ova
-
-
- 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.
-
-
- power_on - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Whether or not to power on the virtual machine after creation.
-
-
- properties - -
- dictionary -
-
- -
The assignment of values to the properties found in the OVF as key value pairs.
-
-
- 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 -
-
- Default:
"Resources"
-
-
Resource Pool to deploy to.
-
-
- 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.
-
-
- wait - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Wait for the host to power on.
-
-
- wait_for_ip_address - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Wait until vCenter detects an IP address for the VM.
-
This requires vmware-tools (vmtoolsd) to properly work after creation.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

allow_duplicates

+ +

+ boolean +

+
+

Whether or not to allow duplicate VM names. ESXi allows duplicates, vCenter may not.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

cluster

+ +

+ string +

+
+

Cluster to deploy to.

+

This is a required parameter, if esxi_hostname is not set and hostname is set to the vCenter server.

+

esxi_hostname and cluster are mutually exclusive parameters.

+

This parameter is case sensitive.

+
+
+

datacenter

+ +

+ string +

+
+

Datacenter to deploy to.

+

Default: "ha-datacenter"

+
+
+

datastore

+ +

+ string +

+
+

Datastore to deploy to.

+

Default: "datastore1"

+
+
+

deployment_option

+ +

+ string +

+
+

The key of the chosen deployment option.

+
+
+

disk_provisioning

+ +

+ string +

+
+

Disk provisioning type.

+

Choices:

+
    +
  • "flat"

  • +
  • "eagerZeroedThick"

  • +
  • "monolithicSparse"

  • +
  • "twoGbMaxExtentSparse"

  • +
  • "twoGbMaxExtentFlat"

  • +
  • "thin" ← (default)

  • +
  • "sparse"

  • +
  • "thick"

  • +
  • "seSparse"

  • +
  • "monolithicFlat"

  • +
+ +
+
+

esxi_hostname

+ +

+ string +

+
+

The ESXi hostname where the virtual machine will run.

+

This is a required parameter, if cluster is not set and hostname is set to the vCenter server.

+

esxi_hostname and cluster are mutually exclusive parameters.

+

This parameter is case sensitive.

+
+
+

fail_on_spec_warnings

+ +

+ boolean +

+
+

Cause the module to treat OVF Import Spec warnings as errors.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

folder

+ +

+ string +

+
+

Absolute path of folder to place the virtual machine.

+

If not specified, defaults to the value of datacenter.vmFolder.

+

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.

+
+
+

inject_ovf_env

+ +

+ boolean +

+
+

Force the given properties to be inserted into an OVF Environment and injected through VMware Tools.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

name

+ +

+ string +

+
+

Name of the VM to work with.

+

Virtual machine names in vCenter are not necessarily unique, which may be problematic.

+
+
+

networks

+ +

+ dictionary +

+
+

key: value mapping of OVF network name, to the vCenter network name.

+

Default: {"VM Network": "VM Network"}

+
+
+
+

ovf

+ +

aliases: ova

+

+ path +

+
+

Path to OVF or OVA file to deploy.

+
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

power_on

+ +

+ boolean +

+
+

Whether or not to power on the virtual machine after creation.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

properties

+ +

+ dictionary +

+
+

The assignment of values to the properties found in the OVF as key value pairs.

+
+
+

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 +

+
+

Resource Pool to deploy to.

+

Default: "Resources"

+
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

wait

+ +

+ boolean +

+
+

Wait for the host to power on.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

wait_for_ip_address

+ +

+ boolean +

+
+

Wait until vCenter detects an IP address for the VM.

+

This requires vmware-tools (vmtoolsd) to properly work after creation.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -507,6 +485,7 @@ Examples .. code-block:: yaml + - community.vmware.vmware_deploy_ovf: hostname: '{{ vcenter_hostname }}' username: '{{ vcenter_username }}' @@ -541,44 +520,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- instance - -
- dictionary -
-
always -
metadata about the new virtual machine
-
-
Sample:
-
None
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

instance

+ +

+ dictionary +

+
+

metadata about the new virtual machine

+

Returned: always

+

Sample: "None"

+
+ + Authors ~~~~~~~ - Matt Martz (@sivel) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_drs_group_info_module.rst b/docs/community.vmware.vmware_drs_group_info_module.rst index 97457bc91..d5d0d0f29 100644 --- a/docs/community.vmware.vmware_drs_group_info_module.rst +++ b/docs/community.vmware.vmware_drs_group_info_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_drs_group_info_module: -************************************** -community.vmware.vmware_drs_group_info -************************************** +community.vmware.vmware_drs_group_info module -- Gathers info about DRS VM/Host groups on the given cluster ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Gathers info about DRS VM/Host groups on the given cluster** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_drs_group_info`. .. contents:: @@ -16,192 +17,188 @@ community.vmware.vmware_drs_group_info 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

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

+ +

aliases: datacenter_name

+

+ string +

+
+

Datacenter to search for DRS VM/Host groups.

+
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -209,6 +206,7 @@ Examples .. code-block:: yaml + --- - name: "Gather DRS info about given Cluster" register: cluster_drs_group_info @@ -230,44 +228,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +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 ------- + + + + + + + + + + + + + +

Key

Description

+
+

drs_group_info

+ +

+ dictionary +

+
+

Metadata about DRS group from given cluster / datacenter

+

Returned: always

+

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": []}}

+
+ + Authors ~~~~~~~ - Karsten Kaj Jakobsen (@karstenjakobsen) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_drs_group_manager_module.rst b/docs/community.vmware.vmware_drs_group_manager_module.rst index 5bfe13f38..4c520633d 100644 --- a/docs/community.vmware.vmware_drs_group_manager_module.rst +++ b/docs/community.vmware.vmware_drs_group_manager_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_drs_group_manager_module: -***************************************** -community.vmware.vmware_drs_group_manager -***************************************** +community.vmware.vmware_drs_group_manager module -- Manage VMs and Hosts in DRS group. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Manage VMs and Hosts in DRS group.** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_drs_group_manager`. .. contents:: @@ -16,262 +17,253 @@ community.vmware.vmware_drs_group_manager 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+
+

cluster

+ +

aliases: cluster_name

+

+ string + / required +

+
+

Cluster to which DRS group associated with.

+
+
+
+

datacenter

+ +

aliases: datacenter_name

+

+ string +

+
+

Name of the datacenter.

+
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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 +

+
+

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.

+

Choices:

+
    +
  • "present" ← (default)

  • +
  • "absent"

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

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. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -279,6 +271,7 @@ Examples .. code-block:: yaml + --- - name: Add VMs in an existing DRS VM group delegate_to: localhost @@ -337,61 +330,70 @@ Examples + + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +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 ------- + + + + + + + + + + + + + + + + + +

Key

Description

+
+

drs_group_member_info

+ +

+ dictionary +

+
+

Metadata about DRS group

+

Returned: always

+

Sample: {"Asia-Cluster1": [{"group_name": "vm_group_002", "type": "vm", "vms": ["dev-1"]}]}

+
+
+

msg

+ +

+ string +

+
+

Info message

+

Returned: always

+

Sample: "Updated host group TEST_HOST_01 successfully"

+
+ + Authors ~~~~~~~ - Abhijeet Kasurde (@Akasurde) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_drs_group_module.rst b/docs/community.vmware.vmware_drs_group_module.rst index 9e347fa94..fce6b96dc 100644 --- a/docs/community.vmware.vmware_drs_group_module.rst +++ b/docs/community.vmware.vmware_drs_group_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_drs_group_module: -********************************* -community.vmware.vmware_drs_group -********************************* +community.vmware.vmware_drs_group module -- Creates vm/host group in a given cluster. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Creates vm/host group in a given cluster.** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_drs_group`. .. contents:: @@ -16,7 +17,12 @@ community.vmware.vmware_drs_group 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. + +- This module can be used to create VM/Host groups in a given cluster. Creates a vm group if \ :literal:`vms`\ is set. Creates a host group if \ :literal:`hosts`\ is set. + + + + @@ -26,251 +32,236 @@ 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

cluster_name

+ +

+ string + / required +

+
+

Cluster to create vm/host group.

+
+
+
+

datacenter

+ +

aliases: datacenter_name

+

+ string +

+
+

Datacenter to search for given cluster. If not set, we use first cluster we encounter with cluster_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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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 +

+
+

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.

+

Choices:

+
    +
  • "present" ← (default)

  • +
  • "absent"

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

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. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -278,6 +269,7 @@ Examples .. code-block:: yaml + --- - name: "Create DRS VM group" delegate_to: localhost @@ -321,44 +313,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +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 ------- + + + + + + + + + + + + + +

Key

Description

+
+

drs_group_facts

+ +

+ dictionary +

+
+

Metadata about DRS group created

+

Returned: always

+

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"}]}}}

+
+ + Authors ~~~~~~~ - Karsten Kaj Jakobsen (@karstenjakobsen) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_drs_rule_info_module.rst b/docs/community.vmware.vmware_drs_rule_info_module.rst index 6faacf84b..4b8a0b5bc 100644 --- a/docs/community.vmware.vmware_drs_rule_info_module.rst +++ b/docs/community.vmware.vmware_drs_rule_info_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_drs_rule_info_module: -************************************* -community.vmware.vmware_drs_rule_info -************************************* +community.vmware.vmware_drs_rule_info module -- Gathers info about DRS rule on the given cluster +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Gathers info about DRS rule on the given cluster** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_drs_rule_info`. .. contents:: @@ -16,193 +17,188 @@ community.vmware.vmware_drs_rule_info 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -210,6 +206,7 @@ Examples .. code-block:: yaml + - name: Gather DRS info about given Cluster community.vmware.vmware_drs_rule_info: hostname: '{{ vcenter_hostname }}' @@ -230,44 +227,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +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 ------- + + + + + + + + + + + + + +

Key

Description

+
+

drs_rule_info

+ +

+ dictionary +

+
+

metadata about DRS rule from given cluster / datacenter

+

Returned: always

+

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": null, "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"]}]}

+
+ + Authors ~~~~~~~ - Abhijeet Kasurde (@Akasurde) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_dvs_host_module.rst b/docs/community.vmware.vmware_dvs_host_module.rst index 36fd43cae..cbb22c38c 100644 --- a/docs/community.vmware.vmware_dvs_host_module.rst +++ b/docs/community.vmware.vmware_dvs_host_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_dvs_host_module: -******************************** -community.vmware.vmware_dvs_host -******************************** +community.vmware.vmware_dvs_host module -- Add or remove a host from distributed virtual switch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Add or remove a host from distributed virtual switch** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_dvs_host`. .. contents:: @@ -16,331 +17,312 @@ community.vmware.vmware_dvs_host Synopsis -------- + - Manage a host system from distributed virtual switch. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- esxi_hostname - -
- string - / required -
-
- -
The ESXi hostname.
-
-
- 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.
-
-
- lag_uplinks - -
- list - / elements=dictionary -
-
- Default:
[]
-
-
The ESXi hosts vmnics to use with specific LAGs.
-
-
- lag - -
- string - / required -
-
- -
Name of the LAG.
-
-
- vmnics - -
- list - / elements=string -
-
- Default:
[]
-
-
The ESXi hosts vmnics to use with the LAG.
-
-
- 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 the host should be present or absent attached to the vSwitch.
-
-
- switch_name - -
- string - / required -
-
- -
The name of the Distributed vSwitch.
-
-
- 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.
-
-
- vendor_specific_config - -
- list - / elements=dictionary -
-
- -
List of key, value dictionaries for the Vendor Specific Configuration.
-
-
- key - -
- string - / required -
-
- -
Key of setting.
-
-
- value - -
- string - / required -
-
- -
Value of setting.
-
-
- vmnics - -
- list - / elements=string -
-
- Default:
[]
-
-
The ESXi hosts vmnics to use with the Distributed vSwitch.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

esxi_hostname

+ +

+ string + / required +

+
+

The ESXi hostname.

+
+
+

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.

+
+ +

lag_uplinks

+ +

+ list + / elements=dictionary +

+
+

The ESXi hosts vmnics to use with specific LAGs.

+

Default: []

+
+
+

lag

+ +

+ string + / required +

+
+

Name of the LAG.

+
+
+

vmnics

+ +

+ list + / elements=string +

+
+

The ESXi hosts vmnics to use with the LAG.

+

Default: []

+
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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 +

+
+

If the host should be present or absent attached to the vSwitch.

+

Choices:

+
    +
  • "present" ← (default)

  • +
  • "absent"

  • +
+ +
+
+

switch_name

+ +

+ string + / required +

+
+

The name of the Distributed vSwitch.

+
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

vendor_specific_config

+ +

+ list + / elements=dictionary +

+
+

List of key, value dictionaries for the Vendor Specific Configuration.

+
+
+

key

+ +

+ string + / required +

+
+

Key of setting.

+
+
+

value

+ +

+ string + / required +

+
+

Value of setting.

+
+
+

vmnics

+ +

+ list + / elements=string +

+
+

The ESXi hosts vmnics to use with the Distributed vSwitch.

+

Default: []

+
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -348,6 +330,7 @@ Examples .. code-block:: yaml + - name: Add Host to dVS community.vmware.vmware_dvs_host: hostname: '{{ vcenter_hostname }}' @@ -399,8 +382,7 @@ Examples -Status ------- + Authors @@ -409,3 +391,13 @@ Authors - Joseph Callen (@jcpowermac) - Abhijeet Kasurde (@Akasurde) - Joseph Andreatta (@vmwjoseph) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_dvs_portgroup_find_module.rst b/docs/community.vmware.vmware_dvs_portgroup_find_module.rst index 00d20063c..3a8ee9e63 100644 --- a/docs/community.vmware.vmware_dvs_portgroup_find_module.rst +++ b/docs/community.vmware.vmware_dvs_portgroup_find_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_dvs_portgroup_find_module: -****************************************** -community.vmware.vmware_dvs_portgroup_find -****************************************** +community.vmware.vmware_dvs_portgroup_find module -- Find portgroup(s) in a VMware environment +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Find portgroup(s) in a VMware environment** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_dvs_portgroup_find`. .. contents:: @@ -16,226 +17,219 @@ community.vmware.vmware_dvs_portgroup_find 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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 +

+
+

Show or hide uplink portgroups.

+

Only relevant when vlanid is supplied.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

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. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -243,6 +237,7 @@ Examples .. code-block:: yaml + - name: Get all portgroups in dvswitch vDS community.vmware.vmware_dvs_portgroup_find: hostname: "{{ vcenter_hostname }}" @@ -261,44 +256,55 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +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 ------- + + + + + + + + + + + + + +

Key

Description

+
+

dvs_portgroups

+ +

+ list + / elements=string +

+
+

basic details of portgroups found

+

Returned: on success

+

Sample: [{"dvswitch": "vDS", "name": "N-51", "pvlan": true, "trunk": true, "vlan_id": "0"}]

+
+ + Authors ~~~~~~~ - David Martinez (@dx0xm) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_dvs_portgroup_info_module.rst b/docs/community.vmware.vmware_dvs_portgroup_info_module.rst index c245c66ed..d6b99b95c 100644 --- a/docs/community.vmware.vmware_dvs_portgroup_info_module.rst +++ b/docs/community.vmware.vmware_dvs_portgroup_info_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_dvs_portgroup_info_module: -****************************************** -community.vmware.vmware_dvs_portgroup_info -****************************************** +community.vmware.vmware_dvs_portgroup_info module -- Gathers info DVS portgroup configurations +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Gathers info DVS portgroup configurations** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_dvs_portgroup_info`. .. contents:: @@ -16,304 +17,299 @@ community.vmware.vmware_dvs_portgroup_info Synopsis -------- + - This module can be used to gather information about DVS portgroup configurations. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- datacenter - -
- string - / required -
-
- -
Name of the datacenter.
-
-
- dvswitch - -
- string -
-
- -
Name of a dvswitch 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.
-
-
- 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_mac_learning - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Show or hide MAC learning information of the DVS portgroup.
-
-
- show_network_policy - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Show or hide network policies of DVS portgroup.
-
-
- show_port_policy - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Show or hide port policies of DVS portgroup.
-
-
- show_teaming_policy - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Show or hide teaming policies of DVS portgroup.
-
-
- show_uplinks - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Show or hide uplinks of DVS portgroup.
-
-
- show_vlan_info - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Show or hide vlan information of the DVS portgroup.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

datacenter

+ +

+ string + / required +

+
+

Name of the datacenter.

+
+
+

dvswitch

+ +

+ string +

+
+

Name of a dvswitch 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.

+
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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_mac_learning

+ +

+ boolean +

+
+

Show or hide MAC learning information of the DVS portgroup.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

show_network_policy

+ +

+ boolean +

+
+

Show or hide network policies of DVS portgroup.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

show_port_policy

+ +

+ boolean +

+
+

Show or hide port policies of DVS portgroup.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

show_teaming_policy

+ +

+ boolean +

+
+

Show or hide teaming policies of DVS portgroup.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ +

show_uplinks

+ +

+ boolean +

+
+

Show or hide uplinks of DVS portgroup.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

show_vlan_info

+ +

+ boolean +

+
+

Show or hide vlan information of the DVS portgroup.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -321,6 +317,7 @@ Examples .. code-block:: yaml + - name: Get info about DVPG community.vmware.vmware_dvs_portgroup_info: hostname: "{{ vcenter_hostname }}" @@ -339,44 +336,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- dvs_portgroup_info - -
- dictionary -
-
on success -
metadata about DVS portgroup configuration
-
-
Sample:
-
{'dvs_0': [{'description': None, 'dvswitch_name': 'dvs_001', 'network_policy': {'forged_transmits': False, 'mac_changes': False, 'promiscuous': False}, 'num_ports': 8, 'port_policy': {'block_override': True, 'ipfix_override': False, 'live_port_move': False, 'network_rp_override': False, 'port_config_reset_at_disconnect': True, 'security_override': False, 'shaping_override': False, 'traffic_filter_override': False, 'uplink_teaming_override': False, 'vendor_config_override': False, 'vlan_override': False}, 'portgroup_name': 'dvpg_001', 'teaming_policy': {'inbound_policy': True, 'notify_switches': True, 'policy': 'loadbalance_srcid', 'rolling_order': False}, 'vlan_info': {'trunk': False, 'pvlan': False, 'vlan_id': 0}, 'type': 'earlyBinding'}]}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

dvs_portgroup_info

+ +

+ dictionary +

+
+

metadata about DVS portgroup configuration

+

Returned: on success

+

Sample: {"dvs_0": [{"description": null, "dvswitch_name": "dvs_001", "network_policy": {"forged_transmits": false, "mac_changes": false, "promiscuous": false}, "num_ports": 8, "port_policy": {"block_override": true, "ipfix_override": false, "live_port_move": false, "network_rp_override": false, "port_config_reset_at_disconnect": true, "security_override": false, "shaping_override": false, "traffic_filter_override": false, "uplink_teaming_override": false, "vendor_config_override": false, "vlan_override": false}, "portgroup_name": "dvpg_001", "teaming_policy": {"inbound_policy": true, "notify_switches": true, "policy": "loadbalance_srcid", "rolling_order": false}, "type": "earlyBinding", "vlan_info": {"pvlan": false, "trunk": false, "vlan_id": 0}}]}

+
+ + Authors ~~~~~~~ - Abhijeet Kasurde (@Akasurde) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_dvs_portgroup_module.rst b/docs/community.vmware.vmware_dvs_portgroup_module.rst index bf3f8649c..12ba01d24 100644 --- a/docs/community.vmware.vmware_dvs_portgroup_module.rst +++ b/docs/community.vmware.vmware_dvs_portgroup_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_dvs_portgroup_module: -************************************* -community.vmware.vmware_dvs_portgroup -************************************* +community.vmware.vmware_dvs_portgroup module -- Create or remove a Distributed vSwitch portgroup. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Create or remove a Distributed vSwitch portgroup.** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_dvs_portgroup`. .. contents:: @@ -16,1135 +17,1097 @@ community.vmware.vmware_dvs_portgroup 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

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 community.vmware 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 +

+
+

Indicates whether ingress traffic shaping is activated or not.

+

Ignored if inherited is true.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+ +
+
+

inherited

+ +

+ boolean + / required +

+
+

Inherit the settings from the switch or not.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+ +
+
+

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 +

+
+

The flag to allow flooding of unlearned MAC for ingress traffic.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+ +
+
+

enabled

+ +

+ boolean +

+
+

The flag to indicate if source MAC address learning is allowed.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+ +
+
+

limit

+ +

+ integer +

+
+

The maximum number of MAC addresses that can be learned.

+
+
+

limit_policy

+ +

+ string +

+
+

The default switching policy after MAC limit is exceeded.

+

Choices:

+
    +
  • "allow"

  • +
  • "drop"

  • +
+ +
+
+

net_flow

+ +

+ string +

+

added in community.vmware 2.3.0

+
+

Indicate whether or not the virtual machine IP traffic that flows through a vds gets analyzed by sending reports to a NetFlow collector.

+

Choices:

+
    +
  • "true"

  • +
  • "on"

  • +
  • "yes"

  • +
  • "false"

  • +
  • "off"

  • +
  • "no"

  • +
  • "inherited"

  • +
+ +
+
+

network_policy

+ +

+ dictionary +

+
+

Dictionary which configures the different security values for portgroup.

+
+
+

forged_transmits

+ +

+ boolean +

+
+

Indicates whether forged transmits are allowed. Ignored if inherited is true.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+ +
+
+

inherited

+ +

+ boolean + / required +

+
+

Inherit the settings from the switch or not.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+ +
+
+

mac_changes

+ +

+ boolean +

+
+

Indicates whether mac changes are allowed. Ignored if inherited is true.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+ +
+
+

promiscuous

+ +

+ boolean +

+
+

Indicates whether promiscuous mode is allowed. Ignored if inherited is true.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+ +
+
+

num_ports

+ +

+ integer +

+
+

The number of ports the portgroup should contain.

+
+
+

out_traffic_shaping

+ +

+ dictionary +

+

added in community.vmware 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 +

+
+

Indicates whether egress traffic shaping is activated or not.

+

Ignored if inherited is true.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+ +
+
+

inherited

+ +

+ boolean + / required +

+
+

Inherit the settings from the switch or not.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+ +
+
+

peak_bandwidth

+ +

+ integer +

+
+

The maximum number of bytes to allow in a burst.

+

Ignored if inherited is true.

+
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

port_allocation

+ +

+ string +

+
+

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.

+

Choices:

+
    +
  • "elastic"

  • +
  • "fixed"

  • +
+ +
+
+

port_binding

+ +

+ string + / required +

+
+

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.

+

Choices:

+
    +
  • "static"

  • +
  • "ephemeral"

  • +
+ +
+
+

port_policy

+ +

+ dictionary +

+
+

Dictionary which configures the advanced policy settings for the portgroup.

+

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}

+
+
+

block_override

+ +

+ boolean +

+
+

Indicates if the block policy can be changed per port.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

ipfix_override

+ +

+ boolean +

+
+

Indicates if the ipfix policy can be changed per port.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

live_port_move

+ +

+ boolean +

+
+

Indicates if a live port can be moved in or out of the portgroup.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+
+

mac_management_override

+ +

aliases: security_override

+

+ boolean +

+
+

Indicates if the security policy can be changed per port.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

network_rp_override

+ +

+ boolean +

+
+

Indicates if the network resource pool can be changed per port.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

port_config_reset_at_disconnect

+ +

+ boolean +

+
+

Indicates if the configuration of a port is reset automatically after disconnect.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

shaping_override

+ +

+ boolean +

+
+

Indicates if the shaping policy can be changed per port.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

traffic_filter_override

+ +

+ boolean +

+
+

Indicates if the traffic filter can be changed per port.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+ +

uplink_teaming_override

+ +

+ boolean +

+
+

Indicates if the uplink teaming policy can be changed per port.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

vendor_config_override

+ +

+ boolean +

+
+

Indicates if the vendor config can be changed per port.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

vlan_override

+ +

+ boolean +

+
+

Indicates if the vlan can be changed per port.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

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 +

+
+

Determines if the portgroup should be present or not.

+

Choices:

+
    +
  • "present"

  • +
  • "absent"

  • +
+ +
+
+

switch_name

+ +

+ string + / required +

+
+

The name of the distributed vSwitch the port group should be created on.

+
+
+

teaming_policy

+ +

+ dictionary +

+
+

Dictionary which configures the different teaming values for portgroup.

+

Default: {"load_balance_policy": "loadbalance_srcid", "notify_switches": true, "rolling_order": false}

+
+ +

active_uplinks

+ +

+ list + / elements=string +

+
+

List of active uplinks used for load balancing.

+
+
+

inbound_policy

+ +

+ boolean +

+
+

Indicate whether or not the teaming policy is applied to inbound frames as well.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+ +
+
+

load_balance_policy

+ +

+ string +

+
+

Network adapter teaming policy.

+

loadbalance_loadbased is available from version 2.6 and onwards.

+

Choices:

+
    +
  • "loadbalance_ip"

  • +
  • "loadbalance_srcmac"

  • +
  • "loadbalance_srcid" ← (default)

  • +
  • "loadbalance_loadbased"

  • +
  • "failover_explicit"

  • +
+ +
+
+

notify_switches

+ +

+ boolean +

+
+

Indicate whether or not to notify the physical switch if a link fails.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

rolling_order

+ +

+ boolean +

+
+

Indicate whether or not to use a rolling policy when restoring links.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+ +

standby_uplinks

+ +

+ list + / elements=string +

+
+

List of standby uplinks used for failover.

+
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

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 +

+
+

Indicates whether this is for a private VLAN or not.

+

Mutually exclusive with vlan_trunk parameter.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

vlan_trunk

+ +

+ boolean +

+
+

Indicates whether this is a VLAN trunk or not.

+

Mutually exclusive with vlan_private parameter.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -1152,6 +1115,7 @@ Examples .. code-block:: yaml + - name: Create vlan portgroup community.vmware.vmware_dvs_portgroup: hostname: '{{ vcenter_hostname }}' @@ -1239,12 +1203,21 @@ Examples -Status ------- + Authors ~~~~~~~ - Joseph Callen (@jcpowermac) -- Philippe Dellaert (@pdellaert) +- Philippe Dellaert (@pdellaert) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_dvswitch_info_module.rst b/docs/community.vmware.vmware_dvswitch_info_module.rst index 5508d115c..a641d628d 100644 --- a/docs/community.vmware.vmware_dvswitch_info_module.rst +++ b/docs/community.vmware.vmware_dvswitch_info_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_dvswitch_info_module: -************************************* -community.vmware.vmware_dvswitch_info -************************************* +community.vmware.vmware_dvswitch_info module -- Gathers info dvswitch configurations +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Gathers info dvswitch configurations** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_dvswitch_info`. .. contents:: @@ -16,246 +17,241 @@ community.vmware.vmware_dvswitch_info 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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 +

+
+

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

+

Choices:

+
    +
  • "summary" ← (default)

  • +
  • "vsphere"

  • +
+ +
+
+
+
+

switch_name

+ +

aliases: switch, dvswitch

+

+ string +

+
+

Name of a dvswitch to look for.

+

If switch_name not specified gather all dvswitch information.

+
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -263,6 +259,7 @@ Examples .. code-block:: yaml + - name: Gather all registered dvswitch community.vmware.vmware_dvswitch_info: hostname: "{{ vcenter_hostname }}" @@ -306,44 +303,55 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +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 ------- + + + + + + + + + + + + + +

Key

Description

+
+

distributed_virtual_switches

+ +

+ list + / elements=string +

+
+

list of dictionary of dvswitch and their information

+

Returned: always

+

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": null}, "privateVlan": [], "properties": {"administratorContact": {"contact": null, "name": null}, "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"}}}}, "uuid": "50 30 99 9c a7 60 8a 4f-05 9f e7 b5 da df 8f 17"}]

+
+ + Authors ~~~~~~~ - sky-joker (@sky-joker) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_dvswitch_lacp_module.rst b/docs/community.vmware.vmware_dvswitch_lacp_module.rst index 16b0353c2..96fdf865d 100644 --- a/docs/community.vmware.vmware_dvswitch_lacp_module.rst +++ b/docs/community.vmware.vmware_dvswitch_lacp_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_dvswitch_lacp_module: -************************************* -community.vmware.vmware_dvswitch_lacp -************************************* +community.vmware.vmware_dvswitch_lacp module -- Manage LACP configuration on a Distributed Switch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Manage LACP configuration on a Distributed Switch** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_dvswitch_lacp`. .. contents:: @@ -16,308 +17,298 @@ community.vmware.vmware_dvswitch_lacp 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

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 +

+
+

Can only be used if lacp_support is set to enhanced.

+

Default: []

+
+ +

load_balancing_mode

+ +

+ string +

+
+

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.

+

Default: "srcDestIpTcpUdpPortVlan"

+
+ +

mode

+ +

+ string +

+
+

The negotiating state of the uplinks/ports.

+

Choices:

+
    +
  • "active"

  • +
  • "passive"

  • +
+ +
+ +

name

+ +

+ string +

+
+

Name of the LAG.

+
+ +

uplink_number

+ +

+ integer +

+
+

Number of uplinks.

+

Can 1 to 30.

+
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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 +

+
+

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).

+

Choices:

+
    +
  • "basic" ← (default)

  • +
  • "enhanced"

  • +
+ +
+
+
+

switch

+ +

aliases: dvswitch

+

+ string + / required +

+
+

The name of the Distributed Switch to manage.

+
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + 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. - +- 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 @@ -325,6 +316,7 @@ Examples .. code-block:: yaml + - name: Enable enhanced mode on a Distributed Switch community.vmware.vmware_dvswitch_lacp: hostname: '{{ inventory_hostname }}' @@ -362,44 +354,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +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 ------- + + + + + + + + + + + + + +

Key

Description

+
+

result

+ +

+ string +

+
+

information about performed operation

+

Returned: always

+

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': [], 'result': 'lacp lags changed', 'support_mode': 'enhanced'}"

+
+ + Authors ~~~~~~~ - Christian Kotte (@ckotte) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_dvswitch_module.rst b/docs/community.vmware.vmware_dvswitch_module.rst index 9c00d39c7..4c52bd59d 100644 --- a/docs/community.vmware.vmware_dvswitch_module.rst +++ b/docs/community.vmware.vmware_dvswitch_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_dvswitch_module: -******************************** -community.vmware.vmware_dvswitch -******************************** +community.vmware.vmware_dvswitch module -- Create or remove a Distributed Switch +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Create or remove a Distributed Switch** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_dvswitch`. .. contents:: @@ -16,758 +17,718 @@ community.vmware.vmware_dvswitch 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

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

+ +

aliases: datacenter

+

+ 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.

+
+
+

description

+ +

+ string +

+
+

Description of the Distributed Switch.

+
+
+

discovery_operation

+ +

+ string +

+
+

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.

+

Choices:

+
    +
  • "both"

  • +
  • "advertise"

  • +
  • "listen" ← (default)

  • +
+ +
+
+
+

discovery_proto

+ +

aliases: discovery_protocol

+

+ string +

+
+

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.

+

Choices:

+
    +
  • "cdp" ← (default)

  • +
  • "lldp"

  • +
  • "disabled"

  • +
+ +
+
+

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 +

+
+

Dictionary which configures Health Check for the Distributed Switch.

+

Default: {"teaming_failover": false, "teaming_failover_interval": 0, "vlan_mtu": false, "vlan_mtu_interval": 0}

+
+
+

teaming_failover

+ +

+ boolean +

+
+

Teaming and failover health check.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

teaming_failover_interval

+ +

+ integer +

+
+

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.

+

Default: 0

+
+
+

vlan_mtu

+ +

+ boolean +

+
+

VLAN and MTU health check.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

vlan_mtu_interval

+ +

+ integer +

+
+

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.

+

Default: 0

+
+
+

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 +

+
+

The switch maximum transmission unit.

+

Required parameter for state both present and absent, before Ansible 2.6 version.

+

Required only if state is set to present, for Ansible 2.6 and onwards.

+

Accepts value between 1280 to 9000 (both inclusive).

+

Default: 1500

+
+
+

multicast_filtering_mode

+ +

+ string +

+
+

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.

+

Choices:

+
    +
  • "basic" ← (default)

  • +
  • "snooping"

  • +
+ +
+
+

net_flow

+ +

+ dictionary +

+

added in community.vmware 2.7.0

+
+

Dictionary which configures the Net Flow for the Distributed Switch.

+

Default: {"active_flow_timeout": 60, "collector_port": 0, "idle_flow_timeout": 15, "internal_flows_only": false, "observation_domain_id": 0, "sampling_rate": 4096}

+
+
+

active_flow_timeout

+ +

+ integer +

+
+

The time, in seconds, to wait before sending information after the flow is initiated.

+

Default: 60

+
+
+

collector_ip

+ +

+ string +

+
+

The IP Address (IPv4 or IPv6) of the NetFlow collector.

+
+
+

collector_port

+ +

+ integer +

+
+

The Port of the NetFlow collector.

+

Default: 0

+
+
+

idle_flow_timeout

+ +

+ integer +

+
+

The time, in seconds, to wait before sending information after the flow is initiated.

+

Default: 15

+
+
+

internal_flows_only

+ +

+ boolean +

+
+

If True, data on network activity between vms on the same host will be collected only.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

observation_domain_id

+ +

+ integer +

+
+

Identifies the information related to the switch.

+

Default: 0

+
+
+

sampling_rate

+ +

+ integer +

+
+

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.

+

Default: 4096

+
+
+

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 +

+
+

Indicates whether forged transmits are allowed.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

mac_changes

+ +

+ boolean +

+
+

Indicates whether mac changes are allowed.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

promiscuous

+ +

+ boolean +

+
+

Indicates whether promiscuous mode is allowed.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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 +

+
+

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.

+

Choices:

+
    +
  • "present" ← (default)

  • +
  • "absent"

  • +
+ +
+
+
+
+

switch_name

+ +

aliases: switch, dvswitch

+

+ string + / required +

+
+

The name of the distribute vSwitch to create or remove.

+
+
+
+

switch_version

+ +

aliases: 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.

+
+ +

uplink_prefix

+ +

+ string +

+
+

The prefix used for the naming of the uplinks.

+

Only valid if the Distributed Switch will be created. Not used if the Distributed Switch is already present.

+

Uplinks are created as Uplink 1, Uplink 2, etc. pp. by default.

+

Default: "Uplink "

+
+ +

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

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -775,6 +736,7 @@ Examples .. code-block:: yaml + - name: Create dvSwitch community.vmware.vmware_dvswitch: hostname: '{{ vcenter_hostname }}' @@ -832,41 +794,41 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +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 ------- + + + + + + + + + + + + + +

Key

Description

+
+

result

+ +

+ string +

+
+

information about performed operation

+

Returned: always

+

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, 'mtu': 9000, 'multicast_filtering_mode': 'basic', 'net_flow_active_flow_timeout': 60, 'net_flow_collector_ip': '192.168.10.50', 'net_flow_collector_port': 50034, 'net_flow_idle_flow_timeout': 15, 'net_flow_internal_flows_only': False, 'net_flow_observation_domain_id': 0, 'net_flow_sampling_rate': 4096, 'result': 'DVS already configured properly', 'uplink_quantity': 2, 'uplinks': ['Uplink_1', 'Uplink_2'], 'version': '6.6.0'}"

+
+ + Authors @@ -875,3 +837,13 @@ Authors - Joseph Callen (@jcpowermac) - Abhijeet Kasurde (@Akasurde) - Christian Kotte (@ckotte) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_dvswitch_nioc_module.rst b/docs/community.vmware.vmware_dvswitch_nioc_module.rst index afef793a6..01e224610 100644 --- a/docs/community.vmware.vmware_dvswitch_nioc_module.rst +++ b/docs/community.vmware.vmware_dvswitch_nioc_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_dvswitch_nioc_module: -************************************* -community.vmware.vmware_dvswitch_nioc -************************************* +community.vmware.vmware_dvswitch_nioc module -- Manage distributed switch Network IO Control +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Manage distributed switch Network IO Control** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_dvswitch_nioc`. .. contents:: @@ -16,343 +17,333 @@ community.vmware.vmware_dvswitch_nioc 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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 +

+
+

List of dicts containing.

+

Default: []

+
+
+

limit

+ +

+ integer +

+
+

The maximum allowed usage for a traffic class belonging to this resource pool per host physical NIC.

+

Default: -1

+
+
+

name

+ +

+ string + / required +

+
+

Resource name.

+

Choices:

+
    +
  • "faultTolerance"

  • +
  • "hbr"

  • +
  • "iSCSI"

  • +
  • "management"

  • +
  • "nfs"

  • +
  • "vdp"

  • +
  • "virtualMachine"

  • +
  • "vmotion"

  • +
  • "vsan"

  • +
  • "backupNfc"

  • +
  • "nvmetcp"

  • +
+ +
+
+

reservation

+ +

+ integer +

+
+

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.

+

Default: 0

+
+
+

shares

+ +

+ integer +

+
+

The number of shares allocated.

+

Ignored unless shares_level is "custom".

+
+
+

shares_level

+ +

+ string +

+
+

The allocation level

+

The level is a simplified view of shares.

+

Levels map to a pre-determined set of numeric values for shares.

+

Choices:

+
    +
  • "low"

  • +
  • "normal"

  • +
  • "high"

  • +
  • "custom"

  • +
+ +
+
+

state

+ +

+ string +

+
+

Enable or disable NIOC on the distributed switch.

+

Choices:

+
    +
  • "present" ← (default)

  • +
  • "absent"

  • +
+ +
+
+
+

switch

+ +

aliases: dvswitch

+

+ string + / required +

+
+

The name of the distributed switch.

+
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

version

+ +

+ string +

+
+

Network IO control version.

+

Choices:

+
    +
  • "version2"

  • +
  • "version3"

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -360,6 +351,7 @@ Examples .. code-block:: yaml + - name: Enable NIOC community.vmware.vmware_dvswitch_nioc: hostname: '{{ vcenter_hostname }}' @@ -391,59 +383,69 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +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 ------- + + + + + + + + + + + + + + + + + +

Key

Description

+
+

dvswitch_nioc_status

+ +

+ string +

+
+

result of the changes

+

Returned: success

+
+
+

resources_changed

+ +

+ list + / elements=string +

+
+

list of resources which were changed

+

Returned: success

+

Sample: ["vmotion", "vsan"]

+
+ + Authors ~~~~~~~ - Joseph Andreatta (@vmwjoseph) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_dvswitch_pvlans_module.rst b/docs/community.vmware.vmware_dvswitch_pvlans_module.rst index b85e818ae..0efcb29e8 100644 --- a/docs/community.vmware.vmware_dvswitch_pvlans_module.rst +++ b/docs/community.vmware.vmware_dvswitch_pvlans_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_dvswitch_pvlans_module: -*************************************** -community.vmware.vmware_dvswitch_pvlans -*************************************** +community.vmware.vmware_dvswitch_pvlans module -- Manage Private VLAN configuration of a Distributed Switch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Manage Private VLAN configuration of a Distributed Switch** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_dvswitch_pvlans`. .. contents:: @@ -16,220 +17,214 @@ community.vmware.vmware_dvswitch_pvlans 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

primary_pvlans

+ +

+ list + / elements=dictionary +

+
+

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.

+

Default: []

+
+
+

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 +

+
+

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.

+

Default: []

+
+
+
+

switch

+ +

aliases: dvswitch

+

+ string + / required +

+
+

The name of the Distributed Switch.

+
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -237,6 +232,7 @@ Examples .. code-block:: yaml + - name: Create PVLANs on a Distributed Switch community.vmware.vmware_dvswitch_pvlans: hostname: '{{ inventory_hostname }}' @@ -280,44 +276,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +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 ------- + + + + + + + + + + + + + +

Key

Description

+
+

result

+ +

+ string +

+
+

information about performed operation

+

Returned: always

+

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'}"

+
+ + Authors ~~~~~~~ - Christian Kotte (@ckotte) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_dvswitch_uplink_pg_module.rst b/docs/community.vmware.vmware_dvswitch_uplink_pg_module.rst index c3c4f506a..fb227f9d7 100644 --- a/docs/community.vmware.vmware_dvswitch_uplink_pg_module.rst +++ b/docs/community.vmware.vmware_dvswitch_uplink_pg_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_dvswitch_uplink_pg_module: -****************************************** -community.vmware.vmware_dvswitch_uplink_pg -****************************************** +community.vmware.vmware_dvswitch_uplink_pg module -- Manage uplink portproup configuration of a Distributed Switch +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Manage uplink portproup configuration of a Distributed Switch** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_dvswitch_uplink_pg`. .. contents:: @@ -16,459 +17,454 @@ community.vmware.vmware_dvswitch_uplink_pg Synopsis -------- + - This module can be used to configure the uplink portgroup of a Distributed Switch. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- advanced - -
- dictionary -
-
- Default:
{"block_override": true, "netflow_override": false, "port_config_reset_at_disconnect": true, "traffic_filter_override": false, "vendor_config_override": false, "vlan_override": false}
-
-
Dictionary which configures the advanced policy settings for the uplink portgroup.
-

aliases: port_policy
-
-
- block_override - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Indicates if the block policy can be changed per port.
-
-
- netflow_override - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Indicates if the NetFlow policy 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.
-
-
- traffic_filter_override - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Indicates if the traffic filter 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.
-
-
- block_all_ports - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Indicates if all ports are blocked on the uplink portgroup.
-
-
- description - -
- string -
-
- -
The description of the uplink portgroup.
-
-
- 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.
-
-
- lacp - -
- dictionary -
-
- Default:
{"mode": "passive", "status": "disabled"}
-
-
Dictionary which configures the LACP settings for the uplink portgroup.
-
The options are only used if the LACP support mode is set to 'basic'.
-
-
- mode - -
- string -
-
-
    Choices: -
  • active
  • -
  • passive ←
  • -
-
-
The negotiating state of the uplinks/ports.
-
-
- status - -
- string -
-
-
    Choices: -
  • enabled
  • -
  • disabled ←
  • -
-
-
Indicates if LACP is enabled.
-
-
- name - -
- string -
-
- -
The name of the uplink portgroup.
-
The current name will be used if not specified.
-
-
- netflow_enabled - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Indicates if NetFlow is enabled on the uplink portgroup.
-
-
- 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.
-
-
- 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.
-
-
- vlan_trunk_range - -
- list - / elements=string -
-
- Default:
["0-4094"]
-
-
The VLAN trunk range that should be configured with the uplink portgroup.
-
This can be a combination of multiple ranges and numbers, example: [ 2-3967, 4049-4092 ].
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+
+

advanced

+ +

aliases: port_policy

+

+ dictionary +

+
+

Dictionary which configures the advanced policy settings for the uplink portgroup.

+

Default: {"block_override": true, "netflow_override": false, "port_config_reset_at_disconnect": true, "traffic_filter_override": false, "vendor_config_override": false, "vlan_override": false}

+
+
+
+

block_override

+ +

+ boolean +

+
+

Indicates if the block policy can be changed per port.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+
+

netflow_override

+ +

+ boolean +

+
+

Indicates if the NetFlow policy can be changed per port.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+
+

port_config_reset_at_disconnect

+ +

+ boolean +

+
+

Indicates if the configuration of a port is reset automatically after disconnect.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+
+

traffic_filter_override

+ +

+ boolean +

+
+

Indicates if the traffic filter can be changed per port.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+
+

vendor_config_override

+ +

+ boolean +

+
+

Indicates if the vendor config can be changed per port.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+
+

vlan_override

+ +

+ boolean +

+
+

Indicates if the vlan can be changed per port.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

block_all_ports

+ +

+ boolean +

+
+

Indicates if all ports are blocked on the uplink portgroup.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

description

+ +

+ string +

+
+

The description of the uplink portgroup.

+
+
+

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.

+
+
+

lacp

+ +

+ dictionary +

+
+

Dictionary which configures the LACP settings for the uplink portgroup.

+

The options are only used if the LACP support mode is set to 'basic'.

+

Default: {"mode": "passive", "status": "disabled"}

+
+
+

mode

+ +

+ string +

+
+

The negotiating state of the uplinks/ports.

+

Choices:

+
    +
  • "active"

  • +
  • "passive" ← (default)

  • +
+ +
+
+

status

+ +

+ string +

+
+

Indicates if LACP is enabled.

+

Choices:

+
    +
  • "enabled"

  • +
  • "disabled" ← (default)

  • +
+ +
+
+

name

+ +

+ string +

+
+

The name of the uplink portgroup.

+

The current name will be used if not specified.

+
+
+

netflow_enabled

+ +

+ boolean +

+
+

Indicates if NetFlow is enabled on the uplink portgroup.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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.

+
+
+
+

switch

+ +

aliases: dvswitch

+

+ string + / required +

+
+

The name of the Distributed Switch.

+
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

vlan_trunk_range

+ +

+ list + / elements=string +

+
+

The VLAN trunk range that should be configured with the uplink portgroup.

+

This can be a combination of multiple ranges and numbers, example: [ 2-3967, 4049-4092 ].

+

Default: ["0-4094"]

+
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -476,6 +472,7 @@ Examples .. code-block:: yaml + - name: Configure Uplink portgroup community.vmware.vmware_dvswitch_uplink_pg: hostname: '{{ inventory_hostname }}' @@ -509,44 +506,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- result - -
- string -
-
always -
information about performed operation
-
-
Sample:
-
{'adv_block_ports': True, 'adv_netflow': False, 'adv_reset_at_disconnect': True, 'adv_traffic_filtering': False, 'adv_vendor_conf': False, 'adv_vlan': False, 'block_all_ports': False, 'changed': False, 'description': None, 'dvswitch': 'dvSwitch', 'lacp_status': 'disabled', 'lacp_status_previous': 'enabled', 'name': 'dvSwitch-DVUplinks', 'netflow_enabled': False, 'result': 'Uplink portgroup already configured properly', 'vlan_trunk_range': ['2-3967', '4049-4092']}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

result

+ +

+ string +

+
+

information about performed operation

+

Returned: always

+

Sample: "{'adv_block_ports': True, 'adv_netflow': False, 'adv_reset_at_disconnect': True, 'adv_traffic_filtering': False, 'adv_vendor_conf': False, 'adv_vlan': False, 'block_all_ports': False, 'changed': False, 'description': None, 'dvswitch': 'dvSwitch', 'lacp_status': 'disabled', 'lacp_status_previous': 'enabled', 'name': 'dvSwitch-DVUplinks', 'netflow_enabled': False, 'result': 'Uplink portgroup already configured properly', 'vlan_trunk_range': ['2-3967', '4049-4092']}"

+
+ + Authors ~~~~~~~ - Christian Kotte (@ckotte) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_evc_mode_module.rst b/docs/community.vmware.vmware_evc_mode_module.rst index c36ac105c..2374178fb 100644 --- a/docs/community.vmware.vmware_evc_mode_module.rst +++ b/docs/community.vmware.vmware_evc_mode_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_evc_mode_module: -******************************** -community.vmware.vmware_evc_mode -******************************** +community.vmware.vmware_evc_mode module -- Enable/Disable EVC mode on vCenter ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Enable/Disable EVC mode on vCenter** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_evc_mode`. .. contents:: @@ -16,228 +17,223 @@ community.vmware.vmware_evc_mode 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+
+

cluster_name

+ +

aliases: cluster

+

+ string + / required +

+
+

The name of the cluster to enable or disable EVC mode on.

+
+
+
+

datacenter_name

+ +

aliases: datacenter

+

+ string + / required +

+
+

The name of the datacenter the cluster belongs to that you want to enable or disable EVC mode on.

+
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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 +

+
+

Add or remove EVC mode.

+

Choices:

+
    +
  • "absent"

  • +
  • "present" ← (default)

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -245,7 +241,8 @@ Examples .. code-block:: yaml - - name: Enable EVC Mode + + - name: Enable EVC Mode community.vmware.vmware_evc_mode: hostname: "{{ groups['vcsa'][0] }}" username: "{{ vcenter_username }}" @@ -270,44 +267,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +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 ------- + + + + + + + + + + + + + +

Key

Description

+
+

result

+ +

+ string +

+
+

information about performed operation

+

Returned: always

+

Sample: "EVC Mode for 'intel-broadwell' has been enabled."

+
+ + Authors ~~~~~~~ - Michael Tipton (@castawayegr) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_export_ovf_module.rst b/docs/community.vmware.vmware_export_ovf_module.rst index 988b545f2..65789c1d2 100644 --- a/docs/community.vmware.vmware_export_ovf_module.rst +++ b/docs/community.vmware.vmware_export_ovf_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_export_ovf_module: -********************************** -community.vmware.vmware_export_ovf -********************************** +community.vmware.vmware_export_ovf module -- Exports a VMware virtual machine to an OVF file, device files and a manifest file +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Exports a VMware virtual machine to an OVF file, device files and a manifest file** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_export_ovf`. .. contents:: @@ -16,326 +17,311 @@ community.vmware.vmware_export_ovf 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

datacenter

+ +

+ string +

+
+

Datacenter name of the virtual machine to export.

+

This parameter is case sensitive.

+

Default: "ha-datacenter"

+
+
+

download_timeout

+ +

+ integer +

+
+

The user defined timeout in second of exporting file.

+

If the vmdk file is too large, you can increase the value.

+

Default: 30

+
+
+

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 community.vmware 2.0.0

+
+

All extra configuration options are exported for a virtual machine.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

export_with_images

+ +

+ boolean +

+
+

Export an ISO image of the media mounted on the CD/DVD Drive within the virtual machine.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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

+ +

aliases: admin, user

+

+ 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.

+
+
+

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 +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -343,6 +329,7 @@ Examples .. code-block:: yaml + - community.vmware.vmware_export_ovf: hostname: '{{ vcenter_hostname }}' username: '{{ vcenter_username }}' @@ -354,44 +341,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +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 ------- + + + + + + + + + + + + + +

Key

Description

+
+

instance

+ +

+ dictionary +

+
+

list of the exported files, if exported from vCenter server, device file is not named with vm name

+

Returned: always

+

Sample: "None"

+
+ + Authors ~~~~~~~ -- Diane Wang (@Tomorrow9) +- Diane Wang (@Tomorrow9) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_first_class_disk_module.rst b/docs/community.vmware.vmware_first_class_disk_module.rst index 744d3d606..c81ad1bbc 100644 --- a/docs/community.vmware.vmware_first_class_disk_module.rst +++ b/docs/community.vmware.vmware_first_class_disk_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_first_class_disk_module: -**************************************** -community.vmware.vmware_first_class_disk -**************************************** +community.vmware.vmware_first_class_disk module -- Manage VMware vSphere First Class Disks +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Manage VMware vSphere First Class Disks** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_first_class_disk`. .. contents:: @@ -16,246 +17,237 @@ community.vmware.vmware_first_class_disk Synopsis -------- + - This module can be used to manage (create, delete, resize) VMware vSphere First Class Disks. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- datacenter_name - -
- string -
-
- -
The name of the datacenter.
-
-
- datastore_name - -
- string - / required -
-
- -
Name of datastore or datastore cluster to be used for the disk.
-
-
- disk_name - -
- string - / required -
-
- -
The name of the disk.
-
-
- 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.
-
-
- size - -
- string -
-
- -
Disk storage size, an integer plus a unit.
-
There is no space allowed in between size number and unit.
-
Allowed units are MB, GB and TB.
-
Examples:
-
size: 2048MB
-
size: 10GB
-
size: 1TB
-
-
- state - -
- string -
-
-
    Choices: -
  • present ←
  • -
  • absent
  • -
-
-
If the disk should be present or absent.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

datacenter_name

+ +

+ string +

+
+

The name of the datacenter.

+
+
+

datastore_name

+ +

+ string + / required +

+
+

Name of datastore or datastore cluster to be used for the disk.

+
+
+

disk_name

+ +

+ string + / required +

+
+

The name of the disk.

+
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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.

+
+
+

size

+ +

+ string +

+
+

Disk storage size, an integer plus a unit.

+

There is no space allowed in between size number and unit.

+

Allowed units are MB, GB and TB.

+

Examples:

+

size: 2048MB

+

size: 10GB

+

size: 1TB

+
+
+

state

+ +

+ string +

+
+

If the disk should be present or absent.

+

Choices:

+
    +
  • "present" ← (default)

  • +
  • "absent"

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -263,6 +255,7 @@ Examples .. code-block:: yaml + - name: Create Disk community.vmware.vmware_first_class_disk: hostname: '{{ vcenter_hostname }}' @@ -286,49 +279,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- first_class_disk - -
- dictionary -
-
changed -
First-class disk returned when created, deleted or changed
-
-
Sample:
-
{ - "name": "1GBDisk" - "datastore_name": "DS0" - "size_mb": "1024" - "state": "present" - }
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

first_class_disk

+ +

+ dictionary +

+
+

First-class disk returned when created, deleted or changed

+

Returned: changed

+

Sample: "{\n \"name\": \"1GBDisk\"\n \"datastore_name\": \"DS0\"\n \"size_mb\": \"1024\"\n \"state\": \"present\"\n}\n"

+
+ + Authors ~~~~~~~ - Mario Lenz (@mariolenz) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_folder_info_module.rst b/docs/community.vmware.vmware_folder_info_module.rst index a647ddc5e..c6fb10ec1 100644 --- a/docs/community.vmware.vmware_folder_info_module.rst +++ b/docs/community.vmware.vmware_folder_info_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_folder_info_module: -*********************************** -community.vmware.vmware_folder_info -*********************************** +community.vmware.vmware_folder_info module -- Provides information about folders in a datacenter +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Provides information about folders in a datacenter** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_folder_info`. .. contents:: @@ -16,177 +17,175 @@ community.vmware.vmware_folder_info 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+
+

datacenter

+ +

aliases: datacenter_name

+

+ string + / required +

+
+

Name of the datacenter.

+
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + 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. - +- \ :literal:`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 @@ -194,6 +193,7 @@ Examples .. code-block:: yaml + - name: Provide information about vCenter folders community.vmware.vmware_folder_info: hostname: '{{ vcenter_hostname }}' @@ -217,61 +217,70 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +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 ------- + + + + + + + + + + + + + + + + + +

Key

Description

+
+

flat_folder_info

+ +

+ list + / elements=string +

+
+

list of dict about folders in flat structure

+

Returned: success

+

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 +

+
+

dict about folders

+

Returned: success

+

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": {}}}}}}}

+
+ + Authors ~~~~~~~ - David Hewitt (@davidmhewitt) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_guest_boot_info_module.rst b/docs/community.vmware.vmware_guest_boot_info_module.rst index 989517008..f53ec5268 100644 --- a/docs/community.vmware.vmware_guest_boot_info_module.rst +++ b/docs/community.vmware.vmware_guest_boot_info_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_guest_boot_info_module: -*************************************** -community.vmware.vmware_guest_boot_info -*************************************** +community.vmware.vmware_guest_boot_info module -- Gather info about boot options for the given virtual machine +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Gather info about boot options for the given virtual machine** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_guest_boot_info`. .. contents:: @@ -16,245 +17,238 @@ community.vmware.vmware_guest_boot_info 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

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 +

+
+

If multiple virtual machines matching the name, use the first or last found.

+

Choices:

+
    +
  • "first" ← (default)

  • +
  • "last"

  • +
+ +
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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 +

+
+

Whether to use the VMware instance UUID rather than the BIOS UUID.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

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 +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -262,6 +256,7 @@ 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 }}" @@ -280,44 +275,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +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 ------- + + + + + + + + + + + + + +

Key

Description

+
+

vm_boot_info

+ +

+ dictionary +

+
+

metadata about boot order of virtual machine

+

Returned: always

+

Sample: {"current_boot_delay": 2000, "current_boot_firmware": "bios", "current_boot_order": ["floppy", "disk", "ethernet", "cdrom"], "current_boot_retry_delay": 22300, "current_boot_retry_enabled": true, "current_enter_bios_setup": true, "current_secure_boot_enabled": false}

+
+ + Authors ~~~~~~~ - Abhijeet Kasurde (@Akasurde) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_guest_boot_manager_module.rst b/docs/community.vmware.vmware_guest_boot_manager_module.rst index bd2f644a9..68d451afc 100644 --- a/docs/community.vmware.vmware_guest_boot_manager_module.rst +++ b/docs/community.vmware.vmware_guest_boot_manager_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_guest_boot_manager_module: -****************************************** -community.vmware.vmware_guest_boot_manager -****************************************** +community.vmware.vmware_guest_boot_manager module -- Manage boot options for the given virtual machine +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Manage boot options for the given virtual machine** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_guest_boot_manager`. .. contents:: @@ -16,388 +17,373 @@ community.vmware.vmware_guest_boot_manager 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

boot_delay

+ +

+ integer +

+
+

Delay in milliseconds before starting the boot sequence.

+
+
+

boot_firmware

+ +

+ string +

+
+

Choose which firmware should be used to boot the virtual machine.

+

Choices:

+
    +
  • "bios"

  • +
  • "efi"

  • +
+ +
+
+

boot_hdd_name

+ +

+ string +

+

added in community.vmware 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 +

+
+

List of the boot devices.

+

Default: []

+
+
+

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 +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+ +
+
+

enter_bios_setup

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+ +
+
+

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 +

+
+

If multiple virtual machines matching the name, use the first or last found.

+

Choices:

+
    +
  • "first" ← (default)

  • +
  • "last"

  • +
+ +
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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 +

+
+

Choose if EFI secure boot should be enabled. EFI secure boot can only be enabled with boot_firmware = efi

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+ +
+
+

use_instance_uuid

+ +

+ boolean +

+
+

Whether to use the VMware instance UUID rather than the BIOS UUID.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

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 +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -405,6 +391,7 @@ Examples .. code-block:: yaml + - name: Change virtual machine's boot order and related parameters community.vmware.vmware_guest_boot_manager: hostname: "{{ vcenter_hostname }}" @@ -447,44 +434,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +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 ------- + + + + + + + + + + + + + +

Key

Description

+
+

vm_boot_status

+ +

+ dictionary +

+
+

metadata about boot order of virtual machine

+

Returned: always

+

Sample: {"current_boot_delay": 2000, "current_boot_firmware": "bios", "current_boot_order": ["floppy", "disk", "ethernet", "cdrom"], "current_boot_retry_delay": 22300, "current_boot_retry_enabled": true, "current_enter_bios_setup": true, "current_secure_boot_enabled": false, "previous_boot_delay": 10, "previous_boot_firmware": "efi", "previous_boot_order": ["ethernet", "cdrom", "floppy", "disk"], "previous_boot_retry_delay": 10000, "previous_boot_retry_enabled": true, "previous_enter_bios_setup": false, "previous_secure_boot_enabled": true}

+
+ + Authors ~~~~~~~ -- Abhijeet Kasurde (@Akasurde) +- Abhijeet Kasurde (@Akasurde) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_guest_controller_module.rst b/docs/community.vmware.vmware_guest_controller_module.rst index f5162b7f9..fa5610edd 100644 --- a/docs/community.vmware.vmware_guest_controller_module.rst +++ b/docs/community.vmware.vmware_guest_controller_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_guest_controller_module: -**************************************** -community.vmware.vmware_guest_controller -**************************************** +community.vmware.vmware_guest_controller module -- Manage disk or USB controllers related to virtual machine in given vCenter infrastructure +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Manage disk or USB controllers related to virtual machine in given vCenter infrastructure** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_guest_controller`. .. contents:: @@ -16,424 +17,409 @@ community.vmware.vmware_guest_controller 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

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 +

+
+

Bus sharing type for SCSI controller.

+

Choices:

+
    +
  • "noSharing" ← (default)

  • +
  • "physicalSharing"

  • +
  • "virtualSharing"

  • +
+ +
+
+

controller_number

+ +

+ integer +

+
+

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.

+

Choices:

+
    +
  • 0

  • +
  • 1

  • +
  • 2

  • +
  • 3

  • +
+ +
+
+

state

+ +

+ string + / required +

+
+

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.

+

Choices:

+
    +
  • "present"

  • +
  • "absent"

  • +
+ +
+
+

type

+ +

+ string + / required +

+
+

Type of disk or USB controller.

+

From vSphere 6.5 and virtual machine with hardware version 13, nvme controller starts to be supported.

+

Choices:

+
    +
  • "buslogic"

  • +
  • "lsilogic"

  • +
  • "lsilogicsas"

  • +
  • "paravirtual"

  • +
  • "sata"

  • +
  • "nvme"

  • +
  • "usb2"

  • +
  • "usb3"

  • +
+ +
+
+

datacenter

+ +

+ string +

+
+

The datacenter name to which virtual machine belongs to.

+

Default: "ha-datacenter"

+
+
+

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 +

+
+

Whether to collect existing disk and USB controllers facts only.

+

When this parameter is set to true, controllers parameter will be ignored.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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 +

+
+

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.

+

Default: 10

+
+
+

use_instance_uuid

+ +

+ boolean +

+
+

Whether to use the VMware instance UUID rather than the BIOS UUID.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

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 +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -441,6 +427,7 @@ 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 }}" @@ -479,44 +466,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +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 ------- + + + + + + + + + + + + + +

Key

Description

+
+

disk_controller_status

+ +

+ dictionary +

+
+

metadata about the virtual machine's existing disk controllers or after adding or removing operation

+

Returned: always

+

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_bus_sharing": "noSharing", "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}, "1": {"controller_bus_sharing": "physicalSharing", "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}}, "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}}}

+
+ + Authors ~~~~~~~ -- Diane Wang (@Tomorrow9) +- Diane Wang (@Tomorrow9) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_guest_cross_vc_clone_module.rst b/docs/community.vmware.vmware_guest_cross_vc_clone_module.rst index f501d06ec..243c08b2c 100644 --- a/docs/community.vmware.vmware_guest_cross_vc_clone_module.rst +++ b/docs/community.vmware.vmware_guest_cross_vc_clone_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_guest_cross_vc_clone_module: -******************************************** -community.vmware.vmware_guest_cross_vc_clone -******************************************** +community.vmware.vmware_guest_cross_vc_clone module -- Cross-vCenter VM/template clone +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Cross-vCenter VM/template clone** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_guest_cross_vc_clone`. .. contents:: @@ -16,454 +17,427 @@ community.vmware.vmware_guest_cross_vc_clone 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

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 +

+
+

The port to establish connection in the destination VCenter.

+

Default: 443

+
+
+

destination_vcenter_username

+ +

+ string + / required +

+
+

The username of the destination VCenter.

+
+
+

destination_vcenter_validate_certs

+ +

+ boolean +

+
+

Parameter to indicate if certification validation needs to be done on destination VCenter.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

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 +

+
+

Specifies whether or not the new virtual machine should be marked as a template.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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 +

+
+

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.

+

Choices:

+
    +
  • "present" ← (default)

  • +
  • "poweredon"

  • +
+ +
+
+

timeout

+ +

+ integer +

+

added in community.vmware 3.5.0

+
+

The timeout in seconds. When the timeout is reached, the module will fail.

+

Default: 3600

+
+
+

use_instance_uuid

+ +

+ boolean +

+
+

Whether to use the VMware instance UUID rather than the BIOS UUID.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

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 +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -471,6 +445,7 @@ Examples .. code-block:: yaml + # Clone template - name: clone a template across VC community.vmware.vmware_guest_cross_vc_clone: @@ -523,44 +498,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +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 ------- + + + + + + + + + + + + + +

Key

Description

+
+

vm_info

+ +

+ dictionary +

+
+

metadata about the virtual machine

+

Returned: always

+

Sample: {"datastore": "", "host": "", "power_on": "", "vcenter": "", "vm_folder": "", "vm_name": ""}

+
+ + Authors ~~~~~~~ - Anusha Hegde (@anusha94) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_guest_custom_attribute_defs_module.rst b/docs/community.vmware.vmware_guest_custom_attribute_defs_module.rst index 3fa560e1c..ff56da7a0 100644 --- a/docs/community.vmware.vmware_guest_custom_attribute_defs_module.rst +++ b/docs/community.vmware.vmware_guest_custom_attribute_defs_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_guest_custom_attribute_defs_module: -*************************************************** -community.vmware.vmware_guest_custom_attribute_defs -*************************************************** +community.vmware.vmware_guest_custom_attribute_defs module -- Manage custom attributes definitions for virtual machine from VMware +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Manage custom attributes definitions for virtual machine from VMware** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_guest_custom_attribute_defs`. .. contents:: @@ -16,198 +17,195 @@ community.vmware.vmware_guest_custom_attribute_defs 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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 +

+
+

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.

+

Choices:

+
    +
  • "present" ← (default)

  • +
  • "absent"

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -215,6 +213,7 @@ Examples .. code-block:: yaml + - name: Add VMware Attribute Definition community.vmware.vmware_guest_custom_attribute_defs: hostname: "{{ vcenter_hostname }}" @@ -237,41 +236,42 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +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 ------- + + + + + + + + + + + + + +

Key

Description

+
+

custom_attribute_defs

+ +

+ list + / elements=string +

+
+

list of all current attribute definitions

+

Returned: always

+

Sample: ["sample_5", "sample_4"]

+
+ + Authors @@ -279,3 +279,13 @@ Authors - Jimmy Conner (@cigamit) - Abhijeet Kasurde (@Akasurde) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_guest_custom_attributes_module.rst b/docs/community.vmware.vmware_guest_custom_attributes_module.rst index 33423baa9..c69b8d97c 100644 --- a/docs/community.vmware.vmware_guest_custom_attributes_module.rst +++ b/docs/community.vmware.vmware_guest_custom_attributes_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_guest_custom_attributes_module: -*********************************************** -community.vmware.vmware_guest_custom_attributes -*********************************************** +community.vmware.vmware_guest_custom_attributes module -- Manage custom attributes from VMware for the given virtual machine +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Manage custom attributes from VMware for the given virtual machine** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_guest_custom_attributes`. .. contents:: @@ -16,331 +17,314 @@ community.vmware.vmware_guest_custom_attributes Synopsis -------- + - This module can be used to add, remove and update custom attributes for the given virtual machine. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- attributes - -
- list - / elements=dictionary -
-
- Default:
[]
-
-
A list of name and value of custom attributes that needs to be manage.
-
Value of custom attribute is not required and will be ignored, if state is set to absent.
-
-
- name - -
- string - / required -
-
- -
Name of the attribute.
-
-
- value - -
- string -
-
- Default:
""
-
-
Value of the attribute.
-
-
- datacenter - -
- string -
-
- -
Datacenter name where the virtual machine is located in.
-
-
- folder - -
- string -
-
- -
Absolute path to find an existing guest.
-
This is required parameter, if name is supplied and multiple virtual machines with same name are found.
-
-
- 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 work with.
-
This is required parameter, if 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 ←
  • -
  • absent
  • -
-
-
The action to take.
-
If set to present, then custom attribute is added or updated.
-
If set to absent, then custom attribute value is removed.
-
-
- 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 parameter, if 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

attributes

+ +

+ list + / elements=dictionary +

+
+

A list of name and value of custom attributes that needs to be manage.

+

Value of custom attribute is not required and will be ignored, if state is set to absent.

+

Default: []

+
+
+

name

+ +

+ string + / required +

+
+

Name of the attribute.

+
+
+

value

+ +

+ string +

+
+

Value of the attribute.

+

Default: ""

+
+
+

datacenter

+ +

+ string +

+
+

Datacenter name where the virtual machine is located in.

+
+
+

folder

+ +

+ string +

+
+

Absolute path to find an existing guest.

+

This is required parameter, if name is supplied and multiple virtual machines with same name are found.

+
+
+

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 work with.

+

This is required parameter, if uuid or moid is not supplied.

+
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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 +

+
+

The action to take.

+

If set to present, then custom attribute is added or updated.

+

If set to absent, then custom attribute value is removed.

+

Choices:

+
    +
  • "present" ← (default)

  • +
  • "absent"

  • +
+ +
+
+

use_instance_uuid

+ +

+ boolean +

+
+

Whether to use the VMware instance UUID rather than the BIOS UUID.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

uuid

+ +

+ string +

+
+

UUID of the virtual machine to manage if known. This is VMware's unique identifier.

+

This is required parameter, if name or moid is not supplied.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -348,6 +332,7 @@ Examples .. code-block:: yaml + - name: Add virtual machine custom attributes community.vmware.vmware_guest_custom_attributes: hostname: "{{ vcenter_hostname }}" @@ -402,41 +387,41 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- custom_attributes - -
- dictionary -
-
always -
metadata about the virtual machine attributes
-
-
Sample:
-
{'mycustom': 'my_custom_value', 'mycustom_2': 'my_custom_value_2', 'sample_1': 'sample_1_value', 'sample_2': 'sample_2_value', 'sample_3': 'sample_3_value'}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

custom_attributes

+ +

+ dictionary +

+
+

metadata about the virtual machine attributes

+

Returned: always

+

Sample: {"mycustom": "my_custom_value", "mycustom_2": "my_custom_value_2", "sample_1": "sample_1_value", "sample_2": "sample_2_value", "sample_3": "sample_3_value"}

+
+ + Authors @@ -444,3 +429,13 @@ Authors - Jimmy Conner (@cigamit) - Abhijeet Kasurde (@Akasurde) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_guest_customization_info_module.rst b/docs/community.vmware.vmware_guest_customization_info_module.rst index c0a6f54a3..f70b1eec4 100644 --- a/docs/community.vmware.vmware_guest_customization_info_module.rst +++ b/docs/community.vmware.vmware_guest_customization_info_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_guest_customization_info_module: -************************************************ -community.vmware.vmware_guest_customization_info -************************************************ +community.vmware.vmware_guest_customization_info module -- Gather info about VM customization specifications +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Gather info about VM customization specifications** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_guest_customization_info`. .. contents:: @@ -16,175 +17,172 @@ community.vmware.vmware_guest_customization_info Synopsis -------- + - This module can be used to gather information about customization specifications. - All parameters and VMware object names are case sensitive. + + + + 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.
-
-
- spec_name - -
- string -
-
- -
Name of customization specification to find.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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.

+
+
+

spec_name

+ +

+ string +

+
+

Name of customization specification to find.

+
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -192,6 +190,7 @@ Examples .. code-block:: yaml + - name: Gather info about all customization specification community.vmware.vmware_guest_customization_info: hostname: "{{ vcenter_hostname }}" @@ -211,44 +210,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- custom_spec_info - -
- dictionary -
-
always -
metadata about the customization specification
-
-
Sample:
-
{'assignip-eee0d684-44b7-457c-8c55-2585590b0d99': {'change_version': '1523438001', 'description': 'sample description', 'dns_server_list': [], 'dns_suffix_list': [], 'domain': 'None', 'hostname': 'sample1', 'hw_clock_utc': None, 'last_updated_time': '2018-04-11T09:13:21+00:00', 'name': 'sample', 'nic_setting_map': [{'dns_domain': None, 'gateway': [], 'ip_address': '192.168.10.10', 'net_bios': None, 'nic_dns_server_list': [], 'primary_wins': None, 'secondry_wins': None, 'subnet_mask': '255.255.255.0'}], 'time_zone': None, 'type': 'Linux'}}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

custom_spec_info

+ +

+ dictionary +

+
+

metadata about the customization specification

+

Returned: always

+

Sample: {"assignip-eee0d684-44b7-457c-8c55-2585590b0d99": {"change_version": "1523438001", "description": "sample description", "dns_server_list": [], "dns_suffix_list": [], "domain": "None", "hostname": "sample1", "hw_clock_utc": null, "last_updated_time": "2018-04-11T09:13:21+00:00", "name": "sample", "nic_setting_map": [{"dns_domain": null, "gateway": [], "ip_address": "192.168.10.10", "net_bios": null, "nic_dns_server_list": [], "primary_wins": null, "secondry_wins": null, "subnet_mask": "255.255.255.0"}], "time_zone": null, "type": "Linux"}}

+
+ + Authors ~~~~~~~ - Abhijeet Kasurde (@Akasurde) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_guest_disk_info_module.rst b/docs/community.vmware.vmware_guest_disk_info_module.rst index ed49d9742..bb873db06 100644 --- a/docs/community.vmware.vmware_guest_disk_info_module.rst +++ b/docs/community.vmware.vmware_guest_disk_info_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_guest_disk_info_module: -*************************************** -community.vmware.vmware_guest_disk_info -*************************************** +community.vmware.vmware_guest_disk_info module -- Gather info about disks of given virtual machine +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Gather info about disks of given virtual machine** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_guest_disk_info`. .. contents:: @@ -16,270 +17,259 @@ community.vmware.vmware_guest_disk_info Synopsis -------- + - This module can be used to gather information about disks belonging to given virtual machine. - All parameters and VMware object names are case sensitive. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- datacenter - -
- string - / required -
-
- -
The datacenter name to which virtual machine belongs to.
-
-
- folder - -
- string -
-
- -
Destination folder, absolute or relative path to find an existing guest.
-
This is required parameter, only if multiple VMs are found with same name.
-
The folder should include the datacenter. ESX's datacenter is ha-datacenter
-
Examples:
-
folder: /ha-datacenter/vm
-
folder: ha-datacenter/vm
-
folder: /datacenter1/vm
-
folder: datacenter1/vm
-
folder: /datacenter1/vm/folder1
-
folder: datacenter1/vm/folder1
-
folder: /folder1/datacenter1/vm
-
folder: folder1/datacenter1/vm
-
folder: /folder1/datacenter1/vm/folder2
-
-
- 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 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.
-
-
- 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 information if known, this is VMware's unique identifier.
-
This is 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

datacenter

+ +

+ string + / required +

+
+

The datacenter name to which virtual machine belongs to.

+
+
+

folder

+ +

+ string +

+
+

Destination folder, absolute or relative path to find an existing guest.

+

This is required parameter, only if multiple VMs are found with same name.

+

The folder should include the datacenter. ESX's datacenter is ha-datacenter

+

Examples:

+

folder: /ha-datacenter/vm

+

folder: ha-datacenter/vm

+

folder: /datacenter1/vm

+

folder: datacenter1/vm

+

folder: /datacenter1/vm/folder1

+

folder: datacenter1/vm/folder1

+

folder: /folder1/datacenter1/vm

+

folder: folder1/datacenter1/vm

+

folder: /folder1/datacenter1/vm/folder2

+
+
+

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 required parameter, if parameter uuid or moid is not supplied.

+
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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 +

+
+

Whether to use the VMware instance UUID rather than the BIOS UUID.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

uuid

+ +

+ string +

+
+

UUID of the instance to gather information if known, this is VMware's unique identifier.

+

This is required parameter, if parameter name or moid is not supplied.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -287,6 +277,7 @@ Examples .. code-block:: yaml + - name: Gather disk info from virtual machine using UUID community.vmware.vmware_guest_disk_info: hostname: "{{ vcenter_hostname }}" @@ -319,44 +310,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- guest_disk_info - -
- dictionary -
-
always -
metadata about the virtual machine's disks
-
-
Sample:
-
{'0': {'backing_datastore': 'datastore2', 'backing_disk_mode': 'persistent', 'backing_diskmode': 'persistent', 'backing_eagerlyscrub': False, 'backing_filename': '[datastore2] VM_225/VM_225.vmdk', 'backing_thinprovisioned': False, 'backing_type': 'FlatVer2', 'backing_writethrough': False, 'backing_uuid': '200C3A00-f82a-97af-02ff-62a595f0020a', 'capacity_in_bytes': 10485760, 'capacity_in_kb': 10240, 'controller_bus_number': 0, 'controller_key': 1000, 'controller_type': 'paravirtual', 'key': 2000, 'label': 'Hard disk 1', 'summary': '10,240 KB', 'unit_number': 0}, '1': {'backing_datastore': 'datastore3', 'backing_devicename': 'vml.012345678901234567890123456789012345678901234567890123', 'backing_disk_mode': 'independent_persistent', 'backing_diskmode': 'independent_persistent', 'backing_filename': '[datastore3] VM_226/VM_226.vmdk', 'backing_lunuuid': '012345678901234567890123456789012345678901234567890123', 'backing_type': 'RawDiskMappingVer1', 'backing_uuid': None, 'capacity_in_bytes': 15728640, 'capacity_in_kb': 15360, 'controller_bus_number': 0, 'controller_key': 1000, 'controller_type': 'paravirtual', 'key': 2001, 'label': 'Hard disk 3', 'summary': '15,360 KB', 'unit_number': 1}}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

guest_disk_info

+ +

+ dictionary +

+
+

metadata about the virtual machine's disks

+

Returned: always

+

Sample: {"0": {"backing_datastore": "datastore2", "backing_disk_mode": "persistent", "backing_diskmode": "persistent", "backing_eagerlyscrub": false, "backing_filename": "[datastore2] VM_225/VM_225.vmdk", "backing_thinprovisioned": false, "backing_type": "FlatVer2", "backing_uuid": "200C3A00-f82a-97af-02ff-62a595f0020a", "backing_writethrough": false, "capacity_in_bytes": 10485760, "capacity_in_kb": 10240, "controller_bus_number": 0, "controller_key": 1000, "controller_type": "paravirtual", "key": 2000, "label": "Hard disk 1", "summary": "10,240 KB", "unit_number": 0}, "1": {"backing_datastore": "datastore3", "backing_devicename": "vml.012345678901234567890123456789012345678901234567890123", "backing_disk_mode": "independent_persistent", "backing_diskmode": "independent_persistent", "backing_filename": "[datastore3] VM_226/VM_226.vmdk", "backing_lunuuid": "012345678901234567890123456789012345678901234567890123", "backing_type": "RawDiskMappingVer1", "backing_uuid": null, "capacity_in_bytes": 15728640, "capacity_in_kb": 15360, "controller_bus_number": 0, "controller_key": 1000, "controller_type": "paravirtual", "key": 2001, "label": "Hard disk 3", "summary": "15,360 KB", "unit_number": 1}}

+
+ + Authors ~~~~~~~ -- Abhijeet Kasurde (@Akasurde) +- Abhijeet Kasurde (@Akasurde) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_guest_disk_module.rst b/docs/community.vmware.vmware_guest_disk_module.rst index fd020db09..98fc18f6a 100644 --- a/docs/community.vmware.vmware_guest_disk_module.rst +++ b/docs/community.vmware.vmware_guest_disk_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_guest_disk_module: -********************************** -community.vmware.vmware_guest_disk -********************************** +community.vmware.vmware_guest_disk module -- Manage disks related to virtual machine in given vCenter infrastructure +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Manage disks related to virtual machine in given vCenter infrastructure** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_guest_disk`. .. contents:: @@ -16,6 +17,7 @@ community.vmware.vmware_guest_disk Synopsis -------- + - This module can be used to add, remove and update disks belonging to given virtual machine. - All parameters and VMware object names are case sensitive. - This module is destructive in nature, please read documentation carefully before proceeding. @@ -24,888 +26,844 @@ Synopsis + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- datacenter - -
- string - / required -
-
- -
The datacenter name to which virtual machine belongs to.
-
-
- disk - -
- list - / elements=dictionary -
-
- Default:
[]
-
-
A list of disks to add or remove.
-
The virtual disk related information is provided using this list.
-
All values and parameters are case sensitive.
-
-
- autoselect_datastore - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Select the less used datastore. Specify only if datastore is not specified.
-
Not applicable when disk type is set to vpmemdisk.
-
-
- bus_sharing - -
- string -
-
-
    Choices: -
  • noSharing ←
  • -
  • physicalSharing
  • -
  • virtualSharing
  • -
-
-
Only functions with Paravirtual SCSI Controller.
-
Allows for the sharing of the scsi bus between two virtual machines.
-
-
- cluster_disk - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
This value allows for the sharing of an RDM between two machines.
-
The primary machine holding the RDM uses the default false.
-
The secondary machine holding the RDM uses true.
-
-
- compatibility_mode - -
- string -
-
-
    Choices: -
  • physicalMode
  • -
  • virtualMode
  • -
-
-
Compatibility mode for raw devices. Required when disk type type is set to rdm.
-
-
- controller_number - -
- integer -
-
-
    Choices: -
  • 0
  • -
  • 1
  • -
  • 2
  • -
  • 3
  • -
-
-
This parameter is used with controller_type for specifying controller bus number.
-
For ide controller type, valid value is 0 or 1.
-
-
- controller_type - -
- string -
-
-
    Choices: -
  • buslogic
  • -
  • lsilogic
  • -
  • lsilogicsas
  • -
  • paravirtual
  • -
  • sata
  • -
  • nvme
  • -
  • ide
  • -
-
-
This parameter is added for managing disks attaching other types of controllers, e.g., SATA or NVMe.
-
If either controller_type or scsi_type is not specified, then use paravirtual type.
-
-
- datastore - -
- string -
-
- -
Name of datastore or datastore cluster to be used for the disk.
-
Not applicable when disk type is set to vpmemdisk.
-
-
- destroy - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
If state is absent, make sure the disk file is deleted from the datastore. Added in version 2.10.
-
-
- disk_mode - -
- string -
-
-
    Choices: -
  • persistent
  • -
  • independent_persistent
  • -
  • independent_nonpersistent
  • -
-
-
Type of disk mode. If not specified then use persistent mode for new disk.
-
If set to 'persistent' mode, changes are immediately and permanently written to the virtual disk.
-
If set to 'independent_persistent' mode, same as persistent, but not affected by snapshots.
-
If set to 'independent_nonpersistent' mode, changes to virtual disk are made to a redo log and discarded at power off, but not affected by snapshots.
-
Not applicable when disk type is set to vpmemdisk.
-
-
- filename - -
- string -
-
- -
Existing disk image to be used. Filename must already exist on the datastore.
-
Specify filename string in [datastore_name] path/to/file.vmdk format. Added in version 2.10.
-
Not applicable when disk type is set to vpmemdisk.
-
-
- iolimit - -
- dictionary -
-
- -
Section specifies the shares and limit for storage I/O resource.
-
Not applicable when disk type is set to vpmemdisk.
-
-
- limit - -
- integer -
-
- -
Section specifies values for limit where the utilization of a virtual machine will not exceed, even if there are available resources.
-
-
- shares - -
- dictionary -
-
- -
Specifies different types of shares user can add for the given disk.
-
-
- level - -
- string -
-
-
    Choices: -
  • low
  • -
  • normal
  • -
  • high
  • -
  • custom
  • -
-
-
Specifies different level for the shares section.
-
-
- level_value - -
- integer -
-
- -
Custom value when level is set as custom.
-
-
- rdm_path - -
- string -
-
- -
Path of LUN for Raw Device Mapping required for disk type rdm.
-
Only valid if type is set to rdm.
-
-
- scsi_controller - -
- integer -
-
-
    Choices: -
  • 0
  • -
  • 1
  • -
  • 2
  • -
  • 3
  • -
-
-
SCSI controller number. Only 4 SCSI controllers are allowed per VM.
-
Care should be taken while specifying 'scsi_controller' is 0 and 'unit_number' as 0 as this disk may contain OS.
-
-
- scsi_type - -
- string -
-
-
    Choices: -
  • buslogic
  • -
  • lsilogic
  • -
  • lsilogicsas
  • -
  • paravirtual
  • -
-
-
Type of SCSI controller. This value is required only for the first occurrence of SCSI Controller.
-
This value is ignored, if SCSI Controller is already present or state is absent.
-
-
- shares - -
- dictionary -
-
- -
Section for iolimit section tells about what are all different types of shares user can add for disk.
-
Not applicable when disk type is set to vpmemdisk.
-
-
- level - -
- string -
-
-
    Choices: -
  • low
  • -
  • normal
  • -
  • high
  • -
  • custom
  • -
-
-
Tells about different level for the shares section.
-
-
- level_value - -
- integer -
-
- -
Custom value when level is set as custom.
-
-
- sharing - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
The sharing mode of the virtual disk.
-
Setting sharing means that multiple virtual machines can write to the virtual disk.
-
Sharing can only be set if type is set to eagerzeroedthick or rdm.
-
-
- size - -
- string -
-
- -
Disk storage size.
-
If size specified then unit must be specified. There is no space allowed in between size number and unit.
-
Only first occurrence in disk element will be considered, even if there are multiple size* parameters available.
-
-
- 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.
-
-
- state - -
- string -
-
-
    Choices: -
  • present ←
  • -
  • absent
  • -
-
-
State of disk.
-
If set to 'absent', disk will be removed permanently from virtual machine configuration and from VMware storage.
-
If set to 'present', disk will be added if not present at given Controller and Unit Number.
-
or disk exists with different size, disk size is increased, reducing disk size is not allowed.
-
-
- type - -
- string -
-
-
    Choices: -
  • thin
  • -
  • eagerzeroedthick
  • -
  • thick
  • -
  • rdm
  • -
  • vpmemdisk
  • -
-
-
The type of disk, if not specified then use thick type for new disk, no eagerzero.
-
The disk type rdm is added in version 1.13.0.
-
The disk type vpmemdisk is added in version 2.7.0.
-
-
- unit_number - -
- integer - / required -
-
- -
Disk Unit Number.
-
Valid value range from 0 to 15, except 7 for SCSI Controller.
-
Valid value range from 0 to 64, except 7 for Paravirtual SCSI Controller on Virtual Hardware version 14 or higher.
-
Valid value range from 0 to 29 for SATA controller.
-
Valid value range from 0 to 14 for NVME controller.
-
Valid value range from 0 to 1 for IDE controller.
-
-
- 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
-
-
- 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.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

datacenter

+ +

+ string + / required +

+
+

The datacenter name to which virtual machine belongs to.

+
+
+

disk

+ +

+ list + / elements=dictionary +

+
+

A list of disks to add or remove.

+

The virtual disk related information is provided using this list.

+

All values and parameters are case sensitive.

+

Default: []

+
+
+

autoselect_datastore

+ +

+ boolean +

+
+

Select the less used datastore. Specify only if datastore is not specified.

+

Not applicable when disk type is set to vpmemdisk.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+ +
+
+

bus_sharing

+ +

+ string +

+
+

Only functions with Paravirtual SCSI Controller.

+

Allows for the sharing of the scsi bus between two virtual machines.

+

Choices:

+
    +
  • "noSharing" ← (default)

  • +
  • "physicalSharing"

  • +
  • "virtualSharing"

  • +
+ +
+
+

cluster_disk

+ +

+ boolean +

+
+

This value allows for the sharing of an RDM between two machines.

+

The primary machine holding the RDM uses the default false.

+

The secondary machine holding the RDM uses true.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

compatibility_mode

+ +

+ string +

+
+

Compatibility mode for raw devices. Required when disk type type is set to rdm.

+

Choices:

+
    +
  • "physicalMode"

  • +
  • "virtualMode"

  • +
+ +
+
+

controller_number

+ +

+ integer +

+
+

This parameter is used with controller_type for specifying controller bus number.

+

For ide controller type, valid value is 0 or 1.

+

Choices:

+
    +
  • 0

  • +
  • 1

  • +
  • 2

  • +
  • 3

  • +
+ +
+
+

controller_type

+ +

+ string +

+
+

This parameter is added for managing disks attaching other types of controllers, e.g., SATA or NVMe.

+

If either controller_type or scsi_type is not specified, then use paravirtual type.

+

Choices:

+
    +
  • "buslogic"

  • +
  • "lsilogic"

  • +
  • "lsilogicsas"

  • +
  • "paravirtual"

  • +
  • "sata"

  • +
  • "nvme"

  • +
  • "ide"

  • +
+ +
+
+

datastore

+ +

+ string +

+
+

Name of datastore or datastore cluster to be used for the disk.

+

Not applicable when disk type is set to vpmemdisk.

+
+
+

destroy

+ +

+ boolean +

+
+

If state is absent, make sure the disk file is deleted from the datastore. Added in version 2.10.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

disk_mode

+ +

+ string +

+
+

Type of disk mode. If not specified then use persistent mode for new disk.

+

If set to 'persistent' mode, changes are immediately and permanently written to the virtual disk.

+

If set to 'independent_persistent' mode, same as persistent, but not affected by snapshots.

+

If set to 'independent_nonpersistent' mode, changes to virtual disk are made to a redo log and discarded at power off, but not affected by snapshots.

+

Not applicable when disk type is set to vpmemdisk.

+

Choices:

+
    +
  • "persistent"

  • +
  • "independent_persistent"

  • +
  • "independent_nonpersistent"

  • +
+ +
+
+

filename

+ +

+ string +

+
+

Existing disk image to be used. Filename must already exist on the datastore.

+

Specify filename string in [datastore_name] path/to/file.vmdk format. Added in version 2.10.

+

Not applicable when disk type is set to vpmemdisk.

+
+
+

iolimit

+ +

+ dictionary +

+
+

Section specifies the shares and limit for storage I/O resource.

+

Not applicable when disk type is set to vpmemdisk.

+
+
+

limit

+ +

+ integer +

+
+

Section specifies values for limit where the utilization of a virtual machine will not exceed, even if there are available resources.

+
+
+

shares

+ +

+ dictionary +

+
+

Specifies different types of shares user can add for the given disk.

+
+
+

level

+ +

+ string +

+
+

Specifies different level for the shares section.

+

Choices:

+
    +
  • "low"

  • +
  • "normal"

  • +
  • "high"

  • +
  • "custom"

  • +
+ +
+
+

level_value

+ +

+ integer +

+
+

Custom value when level is set as custom.

+
+
+

rdm_path

+ +

+ string +

+
+

Path of LUN for Raw Device Mapping required for disk type rdm.

+

Only valid if type is set to rdm.

+
+
+

scsi_controller

+ +

+ integer +

+
+

SCSI controller number. Only 4 SCSI controllers are allowed per VM.

+

Care should be taken while specifying 'scsi_controller' is 0 and 'unit_number' as 0 as this disk may contain OS.

+

Choices:

+
    +
  • 0

  • +
  • 1

  • +
  • 2

  • +
  • 3

  • +
+ +
+
+

scsi_type

+ +

+ string +

+
+

Type of SCSI controller. This value is required only for the first occurrence of SCSI Controller.

+

This value is ignored, if SCSI Controller is already present or state is absent.

+

Choices:

+
    +
  • "buslogic"

  • +
  • "lsilogic"

  • +
  • "lsilogicsas"

  • +
  • "paravirtual"

  • +
+ +
+
+

shares

+ +

+ dictionary +

+
+

Section for iolimit section tells about what are all different types of shares user can add for disk.

+

Not applicable when disk type is set to vpmemdisk.

+
+
+

level

+ +

+ string +

+
+

Tells about different level for the shares section.

+

Choices:

+
    +
  • "low"

  • +
  • "normal"

  • +
  • "high"

  • +
  • "custom"

  • +
+ +
+
+

level_value

+ +

+ integer +

+
+

Custom value when level is set as custom.

+
+
+

sharing

+ +

+ boolean +

+
+

The sharing mode of the virtual disk.

+

Setting sharing means that multiple virtual machines can write to the virtual disk.

+

Sharing can only be set if type is set to eagerzeroedthick or rdm.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

size

+ +

+ string +

+
+

Disk storage size.

+

If size specified then unit must be specified. There is no space allowed in between size number and unit.

+

Only first occurrence in disk element will be considered, even if there are multiple size* parameters available.

+
+
+

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.

+
+
+

state

+ +

+ string +

+
+

State of disk.

+

If set to 'absent', disk will be removed permanently from virtual machine configuration and from VMware storage.

+

If set to 'present', disk will be added if not present at given Controller and Unit Number.

+

or disk exists with different size, disk size is increased, reducing disk size is not allowed.

+

Choices:

+
    +
  • "present" ← (default)

  • +
  • "absent"

  • +
+ +
+
+

type

+ +

+ string +

+
+

The type of disk, if not specified then use thick type for new disk, no eagerzero.

+

The disk type rdm is added in version 1.13.0.

+

The disk type vpmemdisk is added in version 2.7.0.

+

Choices:

+
    +
  • "thin"

  • +
  • "eagerzeroedthick"

  • +
  • "thick"

  • +
  • "rdm"

  • +
  • "vpmemdisk"

  • +
+ +
+
+

unit_number

+ +

+ integer + / required +

+
+

Disk Unit Number.

+

Valid value range from 0 to 15, except 7 for SCSI Controller.

+

Valid value range from 0 to 64, except 7 for Paravirtual SCSI Controller on Virtual Hardware version 14 or higher.

+

Valid value range from 0 to 29 for SATA controller.

+

Valid value range from 0 to 14 for NVME controller.

+

Valid value range from 0 to 1 for IDE controller.

+
+
+

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

+
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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 +

+
+

Whether to use the VMware instance UUID rather than the BIOS UUID.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

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 +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -913,6 +871,7 @@ Examples .. code-block:: yaml + - name: Add disks to virtual machine using UUID community.vmware.vmware_guest_disk: hostname: "{{ vcenter_hostname }}" @@ -1150,61 +1109,69 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- disk_changes - -
- dictionary -
-
always -
result of each task, key is the 0-based index with the same sequence in which the tasks were defined
-
-
Sample:
-
{'0': 'Disk deleted.', '1': 'Disk created.'}
-
-
- disk_data - -
- dictionary -
-
always -
metadata about the virtual machine's disks after managing them
-
-
Sample:
-
{'0': {'backing_datastore': 'datastore2', 'backing_disk_mode': 'persistent', 'backing_eagerlyscrub': False, 'backing_filename': '[datastore2] VM_225/VM_225.vmdk', 'backing_thinprovisioned': False, 'backing_writethrough': False, 'backing_uuid': '421e4592-c069-924d-ce20-7e7533fab926', 'capacity_in_bytes': 10485760, 'capacity_in_kb': 10240, 'controller_key': 1000, 'key': 2000, 'label': 'Hard disk 1', 'summary': '10,240 KB', 'unit_number': 0}}
-
-

- - -Status ------- + + + + + + + + + + + + + + + + + +

Key

Description

+
+

disk_changes

+ +

+ dictionary +

+
+

result of each task, key is the 0-based index with the same sequence in which the tasks were defined

+

Returned: always

+

Sample: {"0": "Disk deleted.", "1": "Disk created."}

+
+
+

disk_data

+ +

+ dictionary +

+
+

metadata about the virtual machine's disks after managing them

+

Returned: always

+

Sample: {"0": {"backing_datastore": "datastore2", "backing_disk_mode": "persistent", "backing_eagerlyscrub": false, "backing_filename": "[datastore2] VM_225/VM_225.vmdk", "backing_thinprovisioned": false, "backing_uuid": "421e4592-c069-924d-ce20-7e7533fab926", "backing_writethrough": false, "capacity_in_bytes": 10485760, "capacity_in_kb": 10240, "controller_key": 1000, "key": 2000, "label": "Hard disk 1", "summary": "10,240 KB", "unit_number": 0}}

+
+ + Authors ~~~~~~~ -- Abhijeet Kasurde (@Akasurde) +- Abhijeet Kasurde (@Akasurde) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_guest_file_operation_module.rst b/docs/community.vmware.vmware_guest_file_operation_module.rst index 6d7754034..53b175314 100644 --- a/docs/community.vmware.vmware_guest_file_operation_module.rst +++ b/docs/community.vmware.vmware_guest_file_operation_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_guest_file_operation_module: -******************************************** -community.vmware.vmware_guest_file_operation -******************************************** +community.vmware.vmware_guest_file_operation module -- Files operation in a VMware guest operating system without network ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Files operation in a VMware guest operating system without network** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_guest_file_operation`. .. contents:: @@ -16,541 +17,506 @@ community.vmware.vmware_guest_file_operation Synopsis -------- + - Module to copy a file to a VM, fetch a file from a VM and create or delete a directory in the guest OS. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- cluster - -
- string -
-
- -
The cluster hosting the virtual machine.
-
If set, it will help to speed up virtual machine search.
-
-
- copy - -
- dictionary -
-
- -
Copy file to vm without requiring network.
-
-
- dest - -
- string - / required -
-
- -
File destination, path must be exist.
-
-
- overwrite - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Overwrite or not.
-
-
- src - -
- string - / required -
-
- -
File source absolute or relative.
-
-
- datacenter - -
- string -
-
- -
The datacenter hosting the virtual machine.
-
If set, it will help to speed up virtual machine search.
-
-
- directory - -
- dictionary -
-
- -
Create or delete a directory.
-
Can be used to create temp directory inside guest using mktemp operation.
-
mktemp sets variable dir in the result with the name of the new directory.
-
mktemp operation option is added in version 2.8.
-
-
- operation - -
- string - / required -
-
-
    Choices: -
  • create
  • -
  • delete
  • -
  • mktemp
  • -
-
-
Operation to perform.
-
-
- path - -
- string -
-
- -
Directory path.
-
Required for create or remove.
-
-
- prefix - -
- string -
-
- -
Temporary directory prefix.
-
Required for mktemp.
-
-
- recurse - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Not required.
-
-
- suffix - -
- string -
-
- -
Temporary directory suffix.
-
Required for mktemp.
-
-
- fetch - -
- dictionary -
-
- -
Get file from virtual machine without requiring network.
-
-
- dest - -
- string - / required -
-
- -
File destination on localhost, path must be exist.
-
-
- src - -
- string - / required -
-
- -
The file on the remote system to fetch.
-
This must be a file, not a directory.
-
-
- folder - -
- string -
-
- -
Destination folder, absolute path to find an existing guest or create the new guest.
-
The folder should include the datacenter. ESX's datacenter is ha-datacenter
-
Used only if vm_id_type is inventory_path.
-
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
-
folder: vm/folder2
-
folder: 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.
-
-
- 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.
-
-
- timeout - -
- integer -
-
added in 3.1.0
-
- Default:
100
-
-
Timeout seconds for fetching or copying a file.
-
-
- 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.
-
-
- vm_id - -
- string - / required -
-
- -
Name of the virtual machine to work with.
-
-
- vm_id_type - -
- string -
-
-
    Choices: -
  • uuid
  • -
  • instance_uuid
  • -
  • dns_name
  • -
  • inventory_path
  • -
  • vm_name ←
  • -
-
-
The VMware identification method by which the virtual machine will be identified.
-
-
- vm_password - -
- string - / required -
-
- -
The password used to login-in to the virtual machine.
-
-
- vm_username - -
- string - / required -
-
- -
The user to login in to the virtual machine.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

cluster

+ +

+ string +

+
+

The cluster hosting the virtual machine.

+

If set, it will help to speed up virtual machine search.

+
+
+

copy

+ +

+ dictionary +

+
+

Copy file to vm without requiring network.

+
+
+

dest

+ +

+ string + / required +

+
+

File destination, path must be exist.

+
+
+

overwrite

+ +

+ boolean +

+
+

Overwrite or not.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

src

+ +

+ string + / required +

+
+

File source absolute or relative.

+
+
+

datacenter

+ +

+ string +

+
+

The datacenter hosting the virtual machine.

+

If set, it will help to speed up virtual machine search.

+
+
+

directory

+ +

+ dictionary +

+
+

Create or delete a directory.

+

Can be used to create temp directory inside guest using mktemp operation.

+

mktemp sets variable dir in the result with the name of the new directory.

+

mktemp operation option is added in version 2.8.

+
+
+

operation

+ +

+ string + / required +

+
+

Operation to perform.

+

Choices:

+
    +
  • "create"

  • +
  • "delete"

  • +
  • "mktemp"

  • +
+ +
+
+

path

+ +

+ string +

+
+

Directory path.

+

Required for create or remove.

+
+
+

prefix

+ +

+ string +

+
+

Temporary directory prefix.

+

Required for mktemp.

+
+
+

recurse

+ +

+ boolean +

+
+

Not required.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

suffix

+ +

+ string +

+
+

Temporary directory suffix.

+

Required for mktemp.

+
+
+

fetch

+ +

+ dictionary +

+
+

Get file from virtual machine without requiring network.

+
+
+

dest

+ +

+ string + / required +

+
+

File destination on localhost, path must be exist.

+
+
+

src

+ +

+ string + / required +

+
+

The file on the remote system to fetch.

+

This must be a file, not a directory.

+
+
+

folder

+ +

+ string +

+
+

Destination folder, absolute path to find an existing guest or create the new guest.

+

The folder should include the datacenter. ESX's datacenter is ha-datacenter

+

Used only if vm_id_type is inventory_path.

+

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

+

folder: vm/folder2

+

folder: 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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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.

+
+
+

timeout

+ +

+ integer +

+

added in community.vmware 3.1.0

+
+

Timeout seconds for fetching or copying a file.

+

Default: 100

+
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

vm_id

+ +

+ string + / required +

+
+

Name of the virtual machine to work with.

+
+
+

vm_id_type

+ +

+ string +

+
+

The VMware identification method by which the virtual machine will be identified.

+

Choices:

+
    +
  • "uuid"

  • +
  • "instance_uuid"

  • +
  • "dns_name"

  • +
  • "inventory_path"

  • +
  • "vm_name" ← (default)

  • +
+ +
+
+

vm_password

+ +

+ string + / required +

+
+

The password used to login-in to the virtual machine.

+
+
+

vm_username

+ +

+ string + / required +

+
+

The user to login in to the virtual machine.

+
+ + Notes ----- -.. note:: - - Only the first match against vm_id is used, even if there are multiple matches - - All modules requires API write access and hence is not supported on a free ESXi license. - +- Only the first match against vm\_id is used, even if there are multiple matches +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -558,6 +524,7 @@ Examples .. code-block:: yaml + - name: Create directory inside a vm community.vmware.vmware_guest_file_operation: hostname: "{{ vcenter_hostname }}" @@ -621,11 +588,20 @@ Examples -Status ------- + Authors ~~~~~~~ - Stéphane Travassac (@stravassac) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_guest_find_module.rst b/docs/community.vmware.vmware_guest_find_module.rst index 533e3eb2b..9c297a92b 100644 --- a/docs/community.vmware.vmware_guest_find_module.rst +++ b/docs/community.vmware.vmware_guest_find_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_guest_find_module: -********************************** -community.vmware.vmware_guest_find -********************************** +community.vmware.vmware_guest_find module -- Find the folder path(s) for a virtual machine by name or UUID +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Find the folder path(s) for a virtual machine by name or UUID** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_guest_find`. .. contents:: @@ -16,210 +17,205 @@ community.vmware.vmware_guest_find Synopsis -------- + - Find the folder path(s) for a virtual machine by name or UUID + + + + 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.
-
-
- name - -
- string -
-
- -
Name of the VM to work with.
-
This is required if uuid parameter 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.
-
-
- 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 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

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 +

+
+

Name of the VM to work with.

+

This is required if uuid parameter is not supplied.

+
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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 +

+
+

Whether to use the VMware instance UUID rather than the BIOS UUID.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

uuid

+ +

+ string +

+
+

UUID of the instance to manage if known, this is VMware's BIOS UUID by default.

+

This is required if name parameter is not supplied.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -227,6 +223,7 @@ Examples .. code-block:: yaml + - name: Find Guest's Folder using name community.vmware.vmware_guest_find: hostname: "{{ vcenter_hostname }}" @@ -247,44 +244,55 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- folders - -
- list -
-
on success -
List of folders for user specified virtual machine
-
-
Sample:
-
['/DC0/vm']
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

folders

+ +

+ list + / elements=string +

+
+

List of folders for user specified virtual machine

+

Returned: on success

+

Sample: ["/DC0/vm"]

+
+ + Authors ~~~~~~~ -- Abhijeet Kasurde (@Akasurde) +- Abhijeet Kasurde (@Akasurde) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_guest_info_module.rst b/docs/community.vmware.vmware_guest_info_module.rst index 6f61ef5de..7d335cac2 100644 --- a/docs/community.vmware.vmware_guest_info_module.rst +++ b/docs/community.vmware.vmware_guest_info_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_guest_info_module: -********************************** -community.vmware.vmware_guest_info -********************************** +community.vmware.vmware_guest_info module -- Gather info about a single VM +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Gather info about a single VM** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_guest_info`. .. contents:: @@ -16,379 +17,366 @@ community.vmware.vmware_guest_info Synopsis -------- + - Gather information about a single VM on a VMware ESX cluster. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- datacenter - -
- string - / required -
-
- -
Destination datacenter for the deploy operation
-
-
- folder - -
- string -
-
- -
Destination folder, absolute or relative path to find an existing guest.
-
This is required if name is supplied.
-
The folder should include the datacenter. ESX's datacenter is ha-datacenter
-
Examples:
-
folder: /ha-datacenter/vm
-
folder: ha-datacenter/vm
-
folder: /datacenter1/vm
-
folder: datacenter1/vm
-
folder: /datacenter1/vm/folder1
-
folder: datacenter1/vm/folder1
-
folder: /folder1/datacenter1/vm
-
folder: folder1/datacenter1/vm
-
folder: /folder1/datacenter1/vm/folder2
-
-
- 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 is not supplied.
-
-
- name_match - -
- string -
-
-
    Choices: -
  • first ←
  • -
  • last
  • -
-
-
If multiple VMs 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.
-
-
- 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: [
-
"config.hardware.memoryMB",
-
"config.hardware.numCPU",
-
"guest.disk",
-
"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
-
-
- tag_details - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
If set true, detail information about 'tags' returned.
-
Without this flag, the 'tags' returns a list of tag names.
-
With this flag, the 'tags' returns a list of dict about tag information with additional details like category name, category id, and tag id.
-
This parameter is added to maintain backward compatability.
-
-
- tags - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Whether to show tags or not.
-
If set true, shows tags information. Returns a list of tag names.
-
If set false, hides tags information.
-
vSphere Automation SDK is required.
-
-
- 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 unique identifier.
-
This is required if 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

datacenter

+ +

+ string + / required +

+
+

Destination datacenter for the deploy operation

+
+
+

folder

+ +

+ string +

+
+

Destination folder, absolute or relative path to find an existing guest.

+

This is required if name is supplied.

+

The folder should include the datacenter. ESX's datacenter is ha-datacenter

+

Examples:

+

folder: /ha-datacenter/vm

+

folder: ha-datacenter/vm

+

folder: /datacenter1/vm

+

folder: datacenter1/vm

+

folder: /datacenter1/vm/folder1

+

folder: datacenter1/vm/folder1

+

folder: /folder1/datacenter1/vm

+

folder: folder1/datacenter1/vm

+

folder: /folder1/datacenter1/vm/folder2

+
+
+

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 is not supplied.

+
+
+

name_match

+ +

+ string +

+
+

If multiple VMs matching the name, use the first or last found

+

Choices:

+
    +
  • "first" ← (default)

  • +
  • "last"

  • +
+ +
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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: [

+

"config.hardware.memoryMB",

+

"config.hardware.numCPU",

+

"guest.disk",

+

"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 +

+
+

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

+

Choices:

+
    +
  • "summary" ← (default)

  • +
  • "vsphere"

  • +
+ +
+
+

tag_details

+ +

+ boolean +

+
+

If set true, detail information about 'tags' returned.

+

Without this flag, the 'tags' returns a list of tag names.

+

With this flag, the 'tags' returns a list of dict about tag information with additional details like category name, category id, and tag id.

+

This parameter is added to maintain backward compatability.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

tags

+ +

+ boolean +

+
+

Whether to show tags or not.

+

If set true, shows tags information. Returns a list of tag names.

+

If set false, hides tags information.

+

vSphere Automation SDK is required.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

use_instance_uuid

+ +

+ boolean +

+
+

Whether to use the VMware instance UUID rather than the BIOS UUID.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

uuid

+ +

+ string +

+
+

UUID of the instance to manage if known, this is VMware's unique identifier.

+

This is required if name or moid is not supplied.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -396,6 +384,7 @@ Examples .. code-block:: yaml + - name: Gather info from standalone ESXi server having datacenter as 'ha-datacenter' community.vmware.vmware_guest_info: hostname: "{{ vcenter_hostname }}" @@ -456,44 +445,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- instance - -
- dictionary -
-
always -
metadata about the virtual machine
-
-
Sample:
-
{'advanced_settings': {}, 'annotation': '', 'current_snapshot': None, 'customvalues': {}, 'guest_consolidation_needed': False, 'guest_question': None, 'guest_tools_status': 'guestToolsNotRunning', 'guest_tools_version': '10247', 'hw_cores_per_socket': 1, 'hw_datastores': ['ds_226_3'], 'hw_esxi_host': '10.76.33.226', 'hw_eth0': {'addresstype': 'assigned', 'ipaddresses': None, 'label': 'Network adapter 1', 'macaddress': '00:50:56:87:a5:9a', 'macaddress_dash': '00-50-56-87-a5-9a', 'portgroup_key': None, 'portgroup_portkey': None, 'summary': 'VM Network'}, 'hw_files': ['[ds_226_3] ubuntu_t/ubuntu_t.vmx', '[ds_226_3] ubuntu_t/ubuntu_t.nvram', '[ds_226_3] ubuntu_t/ubuntu_t.vmsd', '[ds_226_3] ubuntu_t/vmware.log', '[ds_226_3] u0001/u0001.vmdk'], 'hw_folder': '/DC0/vm/Discovered virtual machine', 'hw_guest_full_name': None, 'hw_guest_ha_state': None, 'hw_guest_id': None, 'hw_interfaces': ['eth0'], 'hw_is_template': False, 'hw_memtotal_mb': 1024, 'hw_name': 'ubuntu_t', 'hw_power_status': 'poweredOff', 'hw_processor_count': 1, 'hw_product_uuid': '4207072c-edd8-3bd5-64dc-903fd3a0db04', 'hw_version': 'vmx-13', 'instance_uuid': '5007769d-add3-1e12-f1fe-225ae2a07caf', 'ipv4': None, 'ipv6': None, 'module_hw': True, 'snapshots': [], 'tags': ['backup'], 'vnc': {}, 'moid': 'vm-42', 'vimref': 'vim.VirtualMachine:vm-42'}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

instance

+ +

+ dictionary +

+
+

metadata about the virtual machine

+

Returned: always

+

Sample: {"advanced_settings": {}, "annotation": "", "current_snapshot": null, "customvalues": {}, "guest_consolidation_needed": false, "guest_question": null, "guest_tools_status": "guestToolsNotRunning", "guest_tools_version": "10247", "hw_cores_per_socket": 1, "hw_datastores": ["ds_226_3"], "hw_esxi_host": "10.76.33.226", "hw_eth0": {"addresstype": "assigned", "ipaddresses": null, "label": "Network adapter 1", "macaddress": "00:50:56:87:a5:9a", "macaddress_dash": "00-50-56-87-a5-9a", "portgroup_key": null, "portgroup_portkey": null, "summary": "VM Network"}, "hw_files": ["[ds_226_3] ubuntu_t/ubuntu_t.vmx", "[ds_226_3] ubuntu_t/ubuntu_t.nvram", "[ds_226_3] ubuntu_t/ubuntu_t.vmsd", "[ds_226_3] ubuntu_t/vmware.log", "[ds_226_3] u0001/u0001.vmdk"], "hw_folder": "/DC0/vm/Discovered virtual machine", "hw_guest_full_name": null, "hw_guest_ha_state": null, "hw_guest_id": null, "hw_interfaces": ["eth0"], "hw_is_template": false, "hw_memtotal_mb": 1024, "hw_name": "ubuntu_t", "hw_power_status": "poweredOff", "hw_processor_count": 1, "hw_product_uuid": "4207072c-edd8-3bd5-64dc-903fd3a0db04", "hw_version": "vmx-13", "instance_uuid": "5007769d-add3-1e12-f1fe-225ae2a07caf", "ipv4": null, "ipv6": null, "module_hw": true, "moid": "vm-42", "snapshots": [], "tags": ["backup"], "vimref": "vim.VirtualMachine:vm-42", "vnc": {}}

+
+ + Authors ~~~~~~~ -- Loic Blot (@nerzhul) +- Loic Blot (@nerzhul) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_guest_instant_clone_module.rst b/docs/community.vmware.vmware_guest_instant_clone_module.rst index 0bef2af61..541888428 100644 --- a/docs/community.vmware.vmware_guest_instant_clone_module.rst +++ b/docs/community.vmware.vmware_guest_instant_clone_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_guest_instant_clone_module: -******************************************* -community.vmware.vmware_guest_instant_clone -******************************************* +community.vmware.vmware_guest_instant_clone module -- Instant Clone VM +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Instant Clone VM** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_guest_instant_clone`. .. contents:: @@ -16,522 +17,485 @@ community.vmware.vmware_guest_instant_clone Synopsis -------- + - This module can be used for Creating a powered-on Instant Clone of a virtual machine. - All variables and VMware object names are case sensitive. -- :ref:`community.vmware.vmware_guest ` module is needed for creating a VM with poweredon state which would be used as a parent VM. -- :ref:`community.vmware.vmware_guest_powerstate ` module is also needed to poweroff the instant cloned module. -- The powered off VM would in turn be deleted by again using :ref:`community.vmware.vmware_guest ` module. -- Thus :ref:`community.vmware.vmware_guest ` module is necessary for removing Instant Cloned VM when VMs being created in testing environment. -- Also GuestOS Customization has now been added with guestinfo_vars parameter. +- \ `community.vmware.vmware\_guest `__\ module is needed for creating a VM with poweredon state which would be used as a parent VM. +- \ `community.vmware.vmware\_guest\_powerstate `__\ module is also needed to poweroff the instant cloned module. +- The powered off VM would in turn be deleted by again using \ `community.vmware.vmware\_guest `__\ module. +- Thus \ `community.vmware.vmware\_guest `__\ module is necessary for removing Instant Cloned VM when VMs being created in testing environment. +- Also GuestOS Customization has now been added with guestinfo\_vars parameter. - The Parent VM must have The Guest customization Engine for instant Clone to customize Guest OS. - Only Linux Os in Parent VM enable support for native vSphere Guest Customization for Instant Clone in vSphere 7. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- datacenter - -
- string - / required -
-
- -
Name of the datacenter, where VM to be deployed.
-
-
- datastore - -
- string - / required -
-
- -
The name of the datastore or the datastore cluster.
-
If datastore cluster name is specified, module will find the Storage DRS recommended datastore in that cluster.
-
-
- folder - -
- string -
-
- -
Destination folder, absolute path to deploy the cloned vm.
-
This parameter is case sensitive.
-
Examples:
-
folder: ha-datacenter/vm
-
folder: /datacenter1/vm
-
-
- guestinfo_vars - -
- list - / elements=dictionary -
-
- -
Provides GuestOS Customization functionality in instant cloned VM.
-
A list of key value pairs that will be passed to the destination VM.
-
These pairs should be used to provide user-defined customization to differentiate the destination VM from the source VM.
-
-
- dns - -
- string -
-
- -
dns is used to set the dns in Instant Cloned Guest Operating System..
-
-
- domain - -
- string -
-
- -
domain is used to set A fully qualified domain name (FQDN) or complete domain name for Instant Cloned Guest operating System.
-
-
- gateway - -
- string -
-
- -
netmask is used to set the netmask in Instant Cloned Guest Operating System.
-
-
- hostname - -
- string -
-
- -
hostname is used to obtain the DNS(Domain Name System) name and set the Guest system's hostname.
-
-
- ipaddress - -
- string -
-
- -
ipaddress is used to set the ipaddress in Instant Cloned Guest Operating System.
-
-
- netmask - -
- string -
-
- -
netmask is used to set the netmask in Instant Cloned Guest Operating System.
-
-
- host - -
- string - / required -
-
- -
Name of the ESX Host in datacenter in which to place cloned VM.
-
The host has to be a member of the cluster that contains the resource pool.
-
Required with resource_pool to find resource pool details. This will be used as additional information when there are resource pools with same name.
-

aliases: esxi_hostname
-
-
- 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 vm instance to manage if known, this is a unique identifier only within a single vCenter instance.
-
This is required if parent_vm or uuid is not supplied.
-
-
- name - -
- string - / required -
-
- -
Name of the Cloned virtual machine.
-

aliases: vm_name
-
-
- parent_vm - -
- string -
-
- -
Name of the parent 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.
-
-
- resource_pool - -
- string -
-
- -
Name of the resource pool in datacenter in which to place deployed VM.
-
Required if cluster is not specified.
-
For default or non-unique resource pool names, specify host and cluster.
-
Resources is the default name of resource pool.
-
-
- 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 instance to clone from, this is VMware's unique identifier.
-
This is a required parameter, if parameter parent_vm 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.
-
-
- vm_password - -
- string -
-
- -
The password used to login-in to the virtual machine.
-
Only required when using guest customization feature.
-
-
- vm_username - -
- string -
-
- -
The user to login-in to the virtual machine.
-
Only required when using guest customization feature.
-
-
- wait_vm_tools - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Whether waiting until vm tools start after rebooting an instant clone vm.
-
-
- wait_vm_tools_timeout - -
- integer -
-
- Default:
300
-
-
Define a timeout (in seconds) for the wait_vm_tools parameter.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

datacenter

+ +

+ string + / required +

+
+

Name of the datacenter, where VM to be deployed.

+
+
+

datastore

+ +

+ string + / required +

+
+

The name of the datastore or the datastore cluster.

+

If datastore cluster name is specified, module will find the Storage DRS recommended datastore in that cluster.

+
+
+

folder

+ +

+ string +

+
+

Destination folder, absolute path to deploy the cloned vm.

+

This parameter is case sensitive.

+

Examples:

+

folder: ha-datacenter/vm

+

folder: /datacenter1/vm

+
+
+

guestinfo_vars

+ +

+ list + / elements=dictionary +

+
+

Provides GuestOS Customization functionality in instant cloned VM.

+

A list of key value pairs that will be passed to the destination VM.

+

These pairs should be used to provide user-defined customization to differentiate the destination VM from the source VM.

+
+
+

dns

+ +

+ string +

+
+

dns is used to set the dns in Instant Cloned Guest Operating System..

+
+
+

domain

+ +

+ string +

+
+

domain is used to set A fully qualified domain name (FQDN) or complete domain name for Instant Cloned Guest operating System.

+
+
+

gateway

+ +

+ string +

+
+

netmask is used to set the netmask in Instant Cloned Guest Operating System.

+
+
+

hostname

+ +

+ string +

+
+

hostname is used to obtain the DNS(Domain Name System) name and set the Guest system's hostname.

+
+
+

ipaddress

+ +

+ string +

+
+

ipaddress is used to set the ipaddress in Instant Cloned Guest Operating System.

+
+
+

netmask

+ +

+ string +

+
+

netmask is used to set the netmask in Instant Cloned Guest Operating System.

+
+
+
+

host

+ +

aliases: esxi_hostname

+

+ string + / required +

+
+

Name of the ESX Host in datacenter in which to place cloned VM.

+

The host has to be a member of the cluster that contains the resource pool.

+

Required with resource_pool to find resource pool details. This will be used as additional information when there are resource pools with same 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.

+
+
+

moid

+ +

+ string +

+
+

Managed Object ID of the vm instance to manage if known, this is a unique identifier only within a single vCenter instance.

+

This is required if parent_vm or uuid is not supplied.

+
+
+
+

name

+ +

aliases: vm_name

+

+ string + / required +

+
+

Name of the Cloned virtual machine.

+
+
+

parent_vm

+ +

+ string +

+
+

Name of the parent virtual machine.

+

This is a required parameter, if parameter uuid or moid is not supplied.

+
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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 +

+
+

Name of the resource pool in datacenter in which to place deployed VM.

+

Required if cluster is not specified.

+

For default or non-unique resource pool names, specify host and cluster.

+

Resources is the default name of resource pool.

+
+
+

use_instance_uuid

+ +

+ boolean +

+
+

Whether to use the VMware instance UUID rather than the BIOS UUID.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

uuid

+ +

+ string +

+
+

UUID of the vm instance to clone from, this is VMware's unique identifier.

+

This is a required parameter, if parameter parent_vm or moid is not supplied.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

vm_password

+ +

+ string +

+
+

The password used to login-in to the virtual machine.

+

Only required when using guest customization feature.

+
+
+

vm_username

+ +

+ string +

+
+

The user to login-in to the virtual machine.

+

Only required when using guest customization feature.

+
+
+

wait_vm_tools

+ +

+ boolean +

+
+

Whether waiting until vm tools start after rebooting an instant clone vm.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

wait_vm_tools_timeout

+ +

+ integer +

+
+

Define a timeout (in seconds) for the wait_vm_tools parameter.

+

Default: 300

+
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -539,6 +503,7 @@ Examples .. code-block:: yaml + - name: Instant Clone a VM community.vmware.vmware_guest_instant_clone: hostname: "{{ vcenter_hostname }}" @@ -640,45 +605,56 @@ Examples + + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- vm_info - -
- dictionary -
-
always -
metadata about the virtual machine
-
added instance_uuid from version 1.12.0
-
-
Sample:
-
{'vm_name': '', 'vcenter': '', 'host': '', 'datastore': '', 'vm_folder': '', 'instance_uuid': ''}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

vm_info

+ +

+ dictionary +

+
+

metadata about the virtual machine

+

added instance_uuid from version 1.12.0

+

Returned: always

+

Sample: {"datastore": "", "host": "", "instance_uuid": "", "vcenter": "", "vm_folder": "", "vm_name": ""}

+
+ + Authors ~~~~~~~ - Anant Chopra (@Anant99-sys) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_guest_module.rst b/docs/community.vmware.vmware_guest_module.rst index d533b181b..ca64298b1 100644 --- a/docs/community.vmware.vmware_guest_module.rst +++ b/docs/community.vmware.vmware_guest_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_guest_module: -***************************** -community.vmware.vmware_guest -***************************** +community.vmware.vmware_guest module -- Manages virtual machines in vCenter ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Manages virtual machines in vCenter** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_guest`. .. contents:: @@ -16,2418 +17,2255 @@ community.vmware.vmware_guest 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".
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

advanced_settings

+ +

+ list + / elements=dictionary +

+
+

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.

+

Default: []

+
+
+
+

annotation

+ +

aliases: notes

+

+ string +

+
+

A note or annotation to include in the virtual machine.

+
+
+

cdrom

+ +

+ any +

+
+

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.

+

Default: []

+
+
+

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 +

+
+

Specify convert disk type while cloning template or virtual machine.

+

Choices:

+
    +
  • "thin"

  • +
  • "thick"

  • +
  • "eagerzeroedthick"

  • +
+ +
+
+

customization

+ +

+ dictionary +

+
+

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.

+

Default: {}

+
+
+

autologon

+ +

+ boolean +

+
+

Auto logon after virtual machine customization.

+

Specific to Windows customization.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+ +
+
+

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 +

+
+

If set to true, do OS customization on the specified virtual machine directly.

+

Common for Linux and Windows customization.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+ +
+
+

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 +

+
+

Specifies whether the hardware clock is in UTC or local time.

+

Specific to Linux customization.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+ +
+
+

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 community.vmware 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.

+

Windows.

+
+
+

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 +

+
+

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.

+

Default: []

+
+
+

datacenter

+ +

+ string +

+
+

Destination datacenter for the deploy operation.

+

This parameter is case sensitive.

+

Default: "ha-datacenter"

+
+
+

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 +

+
+

Whether to delete Virtual machine from inventory or delete from disk.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

disk

+ +

+ list + / elements=dictionary +

+
+

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.

+

Default: []

+
+
+

autoselect_datastore

+ +

+ boolean +

+
+

Select the less used datastore.

+

disk.datastore and disk.autoselect_datastore will not be used if datastore is specified outside this disk configuration.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+ +
+
+

controller_number

+ +

+ integer +

+
+

Disk controller bus number.

+

The maximum number of same type controller is 4 per VM.

+

Choices:

+
    +
  • 0

  • +
  • 1

  • +
  • 2

  • +
  • 3

  • +
+ +
+
+

controller_type

+ +

+ string +

+
+

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.

+

Choices:

+
    +
  • "buslogic"

  • +
  • "lsilogic"

  • +
  • "lsilogicsas"

  • +
  • "paravirtual"

  • +
  • "sata"

  • +
  • "nvme"

  • +
+ +
+
+

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 +

+
+

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.

+

Choices:

+
    +
  • "persistent"

  • +
  • "independent_persistent"

  • +
  • "independent_nonpersistent"

  • +
+ +
+
+

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 +

+
+

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.

+

Choices:

+
    +
  • "thin"

  • +
  • "thick"

  • +
  • "eagerzeroedthick"

  • +
+ +
+
+

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".

+
+
+

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 +

+
+

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.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

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.

+

Valid values are referenced here: https://code.vmware.com/apis/358/doc/vim.vm.GuestOsDescriptor.GuestOsIdentifier.html +

+
+
+

hardware

+ +

+ dictionary +

+
+

Manage virtual machine's hardware attributes.

+

All parameters case sensitive.

+

Default: {}

+
+
+

boot_firmware

+ +

+ string +

+
+

Choose which firmware should be used to boot the virtual machine.

+

Choices:

+
    +
  • "bios"

  • +
  • "efi"

  • +
+ +
+
+

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 community.vmware 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 community.vmware 3.2.0

+
+

The allocation level of CPU resources for the virtual machine.

+

Valid Values are low, normal, high and custom.

+

Choices:

+
    +
  • "low"

  • +
  • "normal"

  • +
  • "high"

  • +
  • "custom"

  • +
+ +
+
+

hotadd_cpu

+ +

+ boolean +

+
+

Allow virtual CPUs to be added while the virtual machine is running.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+ +
+
+

hotadd_memory

+ +

+ boolean +

+
+

Allow memory to be added while the virtual machine is running.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+ +
+
+

hotremove_cpu

+ +

+ boolean +

+
+

Allow virtual CPUs to be removed while the virtual machine is running.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+ +
+
+

iommu

+ +

+ boolean +

+
+

Flag to specify if I/O MMU is enabled for this virtual machine.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+ +
+
+

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

+ +

aliases: memory_reservation

+

+ integer +

+
+

The amount of memory resource that is guaranteed available to the virtual machine.

+
+
+

mem_shares

+ +

+ integer +

+

added in community.vmware 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 community.vmware 3.2.0

+
+

The allocation level of memory resources for the virtual machine.

+

Valid Values are low, normal, high and custom.

+

Choices:

+
    +
  • "low"

  • +
  • "normal"

  • +
  • "high"

  • +
  • "custom"

  • +
+ +
+
+

memory_mb

+ +

+ integer +

+
+

Amount of memory in MB.

+
+
+

memory_reservation_lock

+ +

+ boolean +

+
+

If set true, memory resource reservation for the virtual machine.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+ +
+
+

nested_virt

+ +

+ boolean +

+
+

Enable nested virtualization.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+ +
+
+

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 +

+
+

Valid values are buslogic, lsilogic, lsilogicsas and paravirtual.

+

paravirtual is default.

+

Choices:

+
    +
  • "buslogic"

  • +
  • "lsilogic"

  • +
  • "lsilogicsas"

  • +
  • "paravirtual"

  • +
+ +
+
+

secure_boot

+ +

+ boolean +

+
+

Whether to enable or disable (U)EFI secure boot.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+ +
+
+

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 +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+ +
+
+

vpmc_enabled

+ +

+ boolean +

+

added in community.vmware 3.2.0

+
+

Enable virtual CPU Performance Counters.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+ +
+
+

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 +

+
+

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.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

linked_clone

+ +

+ boolean +

+
+

Whether to create a linked clone from the snapshot specified.

+

If specified, then snapshot_src is required parameter.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

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 +

+
+

If multiple virtual machines matching the name, use the first or last found.

+

Choices:

+
    +
  • "first" ← (default)

  • +
  • "last"

  • +
+ +
+
+

networks

+ +

+ list + / elements=dictionary +

+
+

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).

+

Default: []

+
+
+

connected

+ +

+ boolean +

+
+

Indicates whether the NIC is currently connected.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+ +
+
+

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 +

+
+

Specifies whether or not to connect the device when the virtual machine starts.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+ +
+
+

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 +

+
+

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.

+

Default: {}

+
+
+

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 +

+
+

Virtual NVDIMM device size in MB.

+

Default: 1024

+
+
+

state

+ +

+ string +

+
+

Valid value is present or absent.

+

If set to absent, then the NVDIMM device with specified label will be removed.

+

Choices:

+
    +
  • "present"

  • +
  • "absent"

  • +
+ +
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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 +

+
+

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.

+

Choices:

+
    +
  • "absent"

  • +
  • "poweredon"

  • +
  • "powered-on"

  • +
  • "poweredoff"

  • +
  • "powered-off"

  • +
  • "present" ← (default)

  • +
  • "rebootguest"

  • +
  • "reboot-guest"

  • +
  • "restarted"

  • +
  • "suspended"

  • +
  • "shutdownguest"

  • +
  • "shutdown-guest"

  • +
+ +
+
+

state_change_timeout

+ +

+ integer +

+
+

If the state is set to shutdownguest, by default the module will return immediately after sending the shutdown signal.

+

If this argument is set to a positive integer, the module will instead wait for the virtual machine to reach the poweredoff state.

+

The value sets a timeout in seconds for the module to wait for the state change.

+

Default: 0

+
+
+
+

template

+ +

aliases: template_src

+

+ 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.

+
+
+

use_instance_uuid

+ +

+ boolean +

+
+

Whether to use the VMware instance UUID rather than the BIOS UUID.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

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 +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

vapp_properties

+ +

+ list + / elements=dictionary +

+
+

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

+

Default: []

+
+
+

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 +

+
+

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.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

wait_for_customization_timeout

+ +

+ integer +

+
+

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.

+

Default: 3600

+
+
+

wait_for_ip_address

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

wait_for_ip_address_timeout

+ +

+ integer +

+
+

Define a timeout (in seconds) for the wait_for_ip_address parameter.

+

Default: 300

+
+ + 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. - +- Please make sure that the user used for \ `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 \ :literal:`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 @@ -2435,6 +2273,7 @@ Examples .. code-block:: yaml + - name: Create a virtual machine on given ESXi hostname community.vmware.vmware_guest: hostname: "{{ vcenter_hostname }}" @@ -2718,46 +2557,56 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- instance - -
- dictionary -
-
always -
metadata about the new virtual machine
-
-
Sample:
-
None
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

instance

+ +

+ dictionary +

+
+

metadata about the new virtual machine

+

Returned: always

+

Sample: "None"

+
+ + Authors ~~~~~~~ -- Loic Blot (@nerzhul) -- Philippe Dellaert (@pdellaert) -- Abhijeet Kasurde (@Akasurde) +- Loic Blot (@nerzhul) +- Philippe Dellaert (@pdellaert) +- Abhijeet Kasurde (@Akasurde) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_guest_move_module.rst b/docs/community.vmware.vmware_guest_move_module.rst index 33d3eb5bc..6dfcde71a 100644 --- a/docs/community.vmware.vmware_guest_move_module.rst +++ b/docs/community.vmware.vmware_guest_move_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_guest_move_module: -********************************** -community.vmware.vmware_guest_move -********************************** +community.vmware.vmware_guest_move module -- Moves virtual machines in vCenter +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Moves virtual machines in vCenter** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_guest_move`. .. contents:: @@ -16,289 +17,278 @@ community.vmware.vmware_guest_move Synopsis -------- + - This module can be used to move virtual machines between folders. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- datacenter - -
- string - / required -
-
- -
Destination datacenter for the move operation
-
-
- dest_folder - -
- string - / required -
-
- -
Absolute path to move an existing guest
-
The dest_folder should include the datacenter. ESX's datacenter is ha-datacenter.
-
This parameter is case sensitive.
-
Examples:
-
dest_folder: /ha-datacenter/vm
-
dest_folder: ha-datacenter/vm
-
dest_folder: /datacenter1/vm
-
dest_folder: datacenter1/vm
-
dest_folder: /datacenter1/vm/folder1
-
dest_folder: datacenter1/vm/folder1
-
dest_folder: /folder1/datacenter1/vm
-
dest_folder: folder1/datacenter1/vm
-
dest_folder: /folder1/datacenter1/vm/folder2
-
-
- 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 existing virtual machine to move.
-
This is required if uuid or moid 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 virtual machine to manage if known, this is VMware's unique identifier.
-
This is required if 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

datacenter

+ +

+ string + / required +

+
+

Destination datacenter for the move operation

+
+
+

dest_folder

+ +

+ string + / required +

+
+

Absolute path to move an existing guest

+

The dest_folder should include the datacenter. ESX's datacenter is ha-datacenter.

+

This parameter is case sensitive.

+

Examples:

+

dest_folder: /ha-datacenter/vm

+

dest_folder: ha-datacenter/vm

+

dest_folder: /datacenter1/vm

+

dest_folder: datacenter1/vm

+

dest_folder: /datacenter1/vm/folder1

+

dest_folder: datacenter1/vm/folder1

+

dest_folder: /folder1/datacenter1/vm

+

dest_folder: folder1/datacenter1/vm

+

dest_folder: /folder1/datacenter1/vm/folder2

+
+
+

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 existing virtual machine to move.

+

This is required if uuid or moid is not supplied.

+
+
+

name_match

+ +

+ string +

+
+

If multiple virtual machines matching the name, use the first or last found.

+

Choices:

+
    +
  • "first" ← (default)

  • +
  • "last"

  • +
+ +
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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 +

+
+

Whether to use the VMware instance UUID rather than the BIOS UUID.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

uuid

+ +

+ string +

+
+

UUID of the virtual machine to manage if known, this is VMware's unique identifier.

+

This is required if name or moid is not supplied.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -306,6 +296,7 @@ Examples .. code-block:: yaml + - name: Move Virtual Machine community.vmware.vmware_guest_move: hostname: "{{ vcenter_hostname }}" @@ -350,44 +341,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- instance - -
- dictionary -
-
always -
metadata about the virtual machine
-
-
Sample:
-
{'annotation': None, 'current_snapshot': None, 'customvalues': {}, 'guest_consolidation_needed': False, 'guest_question': None, 'guest_tools_status': None, 'guest_tools_version': '0', 'hw_cores_per_socket': 1, 'hw_datastores': ['LocalDS_0'], 'hw_esxi_host': 'DC0_H0', 'hw_eth0': {'addresstype': 'generated', 'ipaddresses': None, 'label': 'ethernet-0', 'macaddress': '00:0c:29:6b:34:2c', 'macaddress_dash': '00-0c-29-6b-34-2c', 'summary': 'DVSwitch: 43cdd1db-1ef7-4016-9bbe-d96395616199'}, 'hw_files': ['[LocalDS_0] DC0_H0_VM0/DC0_H0_VM0.vmx'], 'hw_folder': '/F0/DC0/vm/F0', 'hw_guest_full_name': None, 'hw_guest_ha_state': None, 'hw_guest_id': 'otherGuest', 'hw_interfaces': ['eth0'], 'hw_is_template': False, 'hw_memtotal_mb': 32, 'hw_name': 'DC0_H0_VM0', 'hw_power_status': 'poweredOn', 'hw_processor_count': 1, 'hw_product_uuid': '581c2808-64fb-45ee-871f-6a745525cb29', 'instance_uuid': '8bcb0b6e-3a7d-4513-bf6a-051d15344352', 'ipv4': None, 'ipv6': None, 'module_hw': True, 'snapshots': []}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

instance

+ +

+ dictionary +

+
+

metadata about the virtual machine

+

Returned: always

+

Sample: {"annotation": null, "current_snapshot": null, "customvalues": {}, "guest_consolidation_needed": false, "guest_question": null, "guest_tools_status": null, "guest_tools_version": "0", "hw_cores_per_socket": 1, "hw_datastores": ["LocalDS_0"], "hw_esxi_host": "DC0_H0", "hw_eth0": {"addresstype": "generated", "ipaddresses": null, "label": "ethernet-0", "macaddress": "00:0c:29:6b:34:2c", "macaddress_dash": "00-0c-29-6b-34-2c", "summary": "DVSwitch: 43cdd1db-1ef7-4016-9bbe-d96395616199"}, "hw_files": ["[LocalDS_0] DC0_H0_VM0/DC0_H0_VM0.vmx"], "hw_folder": "/F0/DC0/vm/F0", "hw_guest_full_name": null, "hw_guest_ha_state": null, "hw_guest_id": "otherGuest", "hw_interfaces": ["eth0"], "hw_is_template": false, "hw_memtotal_mb": 32, "hw_name": "DC0_H0_VM0", "hw_power_status": "poweredOn", "hw_processor_count": 1, "hw_product_uuid": "581c2808-64fb-45ee-871f-6a745525cb29", "instance_uuid": "8bcb0b6e-3a7d-4513-bf6a-051d15344352", "ipv4": null, "ipv6": null, "module_hw": true, "snapshots": []}

+
+ + Authors ~~~~~~~ - Jose Angel Munoz (@imjoseangel) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_guest_network_module.rst b/docs/community.vmware.vmware_guest_network_module.rst index ccc3efbb1..496f30484 100644 --- a/docs/community.vmware.vmware_guest_network_module.rst +++ b/docs/community.vmware.vmware_guest_network_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_guest_network_module: -************************************* -community.vmware.vmware_guest_network -************************************* +community.vmware.vmware_guest_network module -- Manage network adapters of specified virtual machine in given vCenter infrastructure +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Manage network adapters of specified virtual machine in given vCenter infrastructure** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_guest_network`. .. contents:: @@ -16,610 +17,578 @@ community.vmware.vmware_guest_network Synopsis -------- + - This module is used to add, reconfigure, remove network adapter of given virtual machine. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- allow_guest_os_mtu_change - -
- boolean -
-
added in 2.3.0
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Allows the guest OS to change the MTU on a SR-IOV network adapter.
-
This option is only compatible for SR-IOV network adapters.
-
-
- cluster - -
- string -
-
- -
Name of cluster where VM belongs to.
-
-
- connected - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
If NIC should be connected to the network.
-
-
- datacenter - -
- string -
-
- Default:
"ha-datacenter"
-
-
Datacenter the VM belongs to.
-
-
- device_type - -
- string -
-
- Default:
"vmxnet3"
-
-
Type of virtual network device.
-
Valid choices are - e1000, e1000e, pcnet32, vmxnet2, vmxnet3 (default), sriov, pvrdma.
-
-
- directpath_io - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Enable Universal Pass-through (UPT).
-
Only compatible with the vmxnet3 device type.
-
-
- esxi_hostname - -
- string -
-
- -
The hostname of the ESXi host where the VM belongs to.
-
-
- folder - -
- string -
-
- -
Folder location of given VM, this is only required when there's multiple VM's with the same name.
-
-
- force - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Force adapter creation even if an existing adapter is attached to the same network.
-
-
- gather_network_info - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Return information about current guest network adapters.
-

aliases: gather_network_facts
-
-
- guest_control - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Enables guest control over whether the connectable device is connected.
-
-
- 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.
-
-
- label - -
- string -
-
- -
Label of the NIC that should be altered. mac_address or label should be set to get the corresponding device to reconfigure.
-
Alter the name of the network adapter.
-
-
- mac_address - -
- string -
-
- -
MAC address of the NIC that should be altered, if a MAC address is not supplied a new nic will be created.
-
Required when state=absent.
-
-
- moid - -
- string -
-
- -
Managed Object ID of the instance to manage if known, this is a unique identifier only within a single vCenter instance.
-
Required if uuid or name is not supplied.
-
-
- name - -
- string -
-
- -
Name of virtual machine
-
Required if uuid or moid is not supplied.
-
-
- network_name - -
- string -
-
- -
Name of network in vSphere.
-
-
- 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
-
-
- physical_function_backing - -
- string -
-
added in 2.3.0
-
- -
If set, specifies the PCI ID of the physical function to use as backing for a SR-IOV network adapter.
-
This option is only compatible for SR-IOV network adapters.
-
-
- 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.
-
-
- pvrdma_device_protocol - -
- string -
-
added in 3.3.0
-
- -
The PVRDMA device protocol used. Valid choices are - rocev1, rocev2.
-
This parameter is only used on the VM with hardware version >=14 and <= 19.
-
-
- start_connected - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
If NIC should be connected to network on startup.
-
-
- state - -
- string -
-
-
    Choices: -
  • present ←
  • -
  • absent
  • -
-
-
NIC state.
-
When state=present, a nic will be added if a mac address or label does not previously exists or is unset.
-
When state=absent, the mac_address parameter has to be set.
-
-
- switch - -
- string -
-
- -
Name of the (dv)switch for destination network, this is only required for dvswitches.
-
-
- 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 -
-
- -
vm uuid
-
Required if 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.
-
-
- virtual_function_backing - -
- string -
-
added in 2.3.0
-
- -
If set, specifies the PCI ID of the physical function to use as backing for a SR-IOV network adapter.
-
This option is only compatible for SR-IOV network adapters.
-
-
- vlan_id - -
- integer -
-
- -
VLAN id associated with the network.
-
-
- wake_onlan - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Enable wake on LAN.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

allow_guest_os_mtu_change

+ +

+ boolean +

+

added in community.vmware 2.3.0

+
+

Allows the guest OS to change the MTU on a SR-IOV network adapter.

+

This option is only compatible for SR-IOV network adapters.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

cluster

+ +

+ string +

+
+

Name of cluster where VM belongs to.

+
+
+

connected

+ +

+ boolean +

+
+

If NIC should be connected to the network.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

datacenter

+ +

+ string +

+
+

Datacenter the VM belongs to.

+

Default: "ha-datacenter"

+
+
+

device_type

+ +

+ string +

+
+

Type of virtual network device.

+

Valid choices are - e1000, e1000e, pcnet32, vmxnet2, vmxnet3 (default), sriov, pvrdma.

+

Default: "vmxnet3"

+
+
+

directpath_io

+ +

+ boolean +

+
+

Enable Universal Pass-through (UPT).

+

Only compatible with the vmxnet3 device type.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

esxi_hostname

+ +

+ string +

+
+

The hostname of the ESXi host where the VM belongs to.

+
+
+

folder

+ +

+ string +

+
+

Folder location of given VM, this is only required when there's multiple VM's with the same name.

+
+
+

force

+ +

+ boolean +

+
+

Force adapter creation even if an existing adapter is attached to the same network.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+
+

gather_network_info

+ +

aliases: gather_network_facts

+

+ boolean +

+
+

Return information about current guest network adapters.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

guest_control

+ +

+ boolean +

+
+

Enables guest control over whether the connectable device is connected.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

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.

+
+
+

label

+ +

+ string +

+
+

Label of the NIC that should be altered. mac_address or label should be set to get the corresponding device to reconfigure.

+

Alter the name of the network adapter.

+
+
+

mac_address

+ +

+ string +

+
+

MAC address of the NIC that should be altered, if a MAC address is not supplied a new nic will be created.

+

Required when state=absent.

+
+
+

moid

+ +

+ string +

+
+

Managed Object ID of the instance to manage if known, this is a unique identifier only within a single vCenter instance.

+

Required if uuid or name is not supplied.

+
+
+

name

+ +

+ string +

+
+

Name of virtual machine

+

Required if uuid or moid is not supplied.

+
+
+

network_name

+ +

+ string +

+
+

Name of network in vSphere.

+
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

physical_function_backing

+ +

+ string +

+

added in community.vmware 2.3.0

+
+

If set, specifies the PCI ID of the physical function to use as backing for a SR-IOV network adapter.

+

This option is only compatible for SR-IOV network adapters.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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.

+
+
+

pvrdma_device_protocol

+ +

+ string +

+

added in community.vmware 3.3.0

+
+

The PVRDMA device protocol used. Valid choices are - rocev1, rocev2.

+

This parameter is only used on the VM with hardware version >=14 and <= 19.

+
+
+

start_connected

+ +

+ boolean +

+
+

If NIC should be connected to network on startup.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

state

+ +

+ string +

+
+

NIC state.

+

When state=present, a nic will be added if a mac address or label does not previously exists or is unset.

+

When state=absent, the mac_address parameter has to be set.

+

Choices:

+
    +
  • "present" ← (default)

  • +
  • "absent"

  • +
+ +
+
+

switch

+ +

+ string +

+
+

Name of the (dv)switch for destination network, this is only required for dvswitches.

+
+
+

use_instance_uuid

+ +

+ boolean +

+
+

Whether to use the VMware instance UUID rather than the BIOS UUID.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

uuid

+ +

+ string +

+
+

vm uuid

+

Required if name or moid is not supplied.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

virtual_function_backing

+ +

+ string +

+

added in community.vmware 2.3.0

+
+

If set, specifies the PCI ID of the physical function to use as backing for a SR-IOV network adapter.

+

This option is only compatible for SR-IOV network adapters.

+
+
+

vlan_id

+ +

+ integer +

+
+

VLAN id associated with the network.

+
+
+

wake_onlan

+ +

+ boolean +

+
+

Enable wake on LAN.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+ + Notes ----- -.. note:: - - For backwards compatibility network_data is returned when using the gather_network_info parameter - - All modules requires API write access and hence is not supported on a free ESXi license. - +- For backwards compatibility network\_data is returned when using the gather\_network\_info parameter +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -627,6 +596,7 @@ Examples .. code-block:: yaml + - name: change network for 00:50:56:11:22:33 on vm01.domain.fake community.vmware.vmware_guest_network: hostname: "{{ vcenter_hostname }}" @@ -676,61 +646,70 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- network_data - -
- dictionary -
-
when using gather_network_info parameter -
For backwards compatibility, metadata about the virtual machine network adapters
-
-
Sample:
-
{'network_data': {'0': {'mac_addr': '00:50:56:AA:AA:AA', 'mac_address': '00:50:56:AA:AA:AA', 'allow_guest_ctl': True, 'connected': True, 'device_type': 'vmxnet3', 'label': 'Network adapter 2', 'name': 'admin-net', 'network_name': 'admin-net', 'start_connected': True, 'switch': 'vSwitch0', 'unit_number': 8, 'vlan_id': 10, 'wake_onlan': False}, '1': {'mac_addr': '00:50:56:BB:BB:BB', 'mac_address': '00:50:56:BB:BB:BB', 'allow_guest_ctl': True, 'connected': True, 'device_type': 'vmxnet3', 'label': 'Network adapter 1', 'name': 'guest-net', 'network_name': 'guest-net', 'start_connected': True, 'switch': 'vSwitch0', 'unit_number': 7, 'vlan_id': 10, 'wake_onlan': True}}}
-
-
- network_info - -
- list -
-
always -
metadata about the virtual machine network adapters
-
-
Sample:
-
{'network_info': [{'mac_address': '00:50:56:AA:AA:AA', 'allow_guest_ctl': True, 'connected': True, 'device_type': 'vmxnet3', 'label': 'Network adapter 2', 'network_name': 'admin-net', 'start_connected': True, 'switch': 'vSwitch0', 'unit_number': 8, 'vlan_id': 10, 'wake_onlan': False}, {'mac_address': '00:50:56:BB:BB:BB', 'allow_guest_ctl': True, 'connected': True, 'device_type': 'vmxnet3', 'label': 'Network adapter 1', 'network_name': 'guest-net', 'start_connected': True, 'switch': 'vSwitch0', 'unit_number': 7, 'vlan_id': 10, 'wake_onlan': True}]}
-
-

- - -Status ------- + + + + + + + + + + + + + + + + + +

Key

Description

+
+

network_data

+ +

+ dictionary +

+
+

For backwards compatibility, metadata about the virtual machine network adapters

+

Returned: when using gather_network_info parameter

+

Sample: {"network_data": {"0": {"allow_guest_ctl": true, "connected": true, "device_type": "vmxnet3", "label": "Network adapter 2", "mac_addr": "00:50:56:AA:AA:AA", "mac_address": "00:50:56:AA:AA:AA", "name": "admin-net", "network_name": "admin-net", "start_connected": true, "switch": "vSwitch0", "unit_number": 8, "vlan_id": 10, "wake_onlan": false}, "1": {"allow_guest_ctl": true, "connected": true, "device_type": "vmxnet3", "label": "Network adapter 1", "mac_addr": "00:50:56:BB:BB:BB", "mac_address": "00:50:56:BB:BB:BB", "name": "guest-net", "network_name": "guest-net", "start_connected": true, "switch": "vSwitch0", "unit_number": 7, "vlan_id": 10, "wake_onlan": true}}}

+
+
+

network_info

+ +

+ list + / elements=string +

+
+

metadata about the virtual machine network adapters

+

Returned: always

+

Sample: {"network_info": [{"allow_guest_ctl": true, "connected": true, "device_type": "vmxnet3", "label": "Network adapter 2", "mac_address": "00:50:56:AA:AA:AA", "network_name": "admin-net", "start_connected": true, "switch": "vSwitch0", "unit_number": 8, "vlan_id": 10, "wake_onlan": false}, {"allow_guest_ctl": true, "connected": true, "device_type": "vmxnet3", "label": "Network adapter 1", "mac_address": "00:50:56:BB:BB:BB", "network_name": "guest-net", "start_connected": true, "switch": "vSwitch0", "unit_number": 7, "vlan_id": 10, "wake_onlan": true}]}

+
+ + Authors ~~~~~~~ -- Diane Wang (@Tomorrow9) +- Diane Wang (@Tomorrow9) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_guest_powerstate_module.rst b/docs/community.vmware.vmware_guest_powerstate_module.rst index e8e79b59a..3b8a15342 100644 --- a/docs/community.vmware.vmware_guest_powerstate_module.rst +++ b/docs/community.vmware.vmware_guest_powerstate_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_guest_powerstate_module: -**************************************** -community.vmware.vmware_guest_powerstate -**************************************** +community.vmware.vmware_guest_powerstate module -- Manages power states of virtual machines in vCenter +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Manages power states of virtual machines in vCenter** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_guest_powerstate`. .. contents:: @@ -16,471 +17,446 @@ community.vmware.vmware_guest_powerstate Synopsis -------- + - Power on / Power off / Restart a virtual machine. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- answer - -
- list - / elements=dictionary -
-
- -
A list of questions to answer, should one or more arise while waiting for the task to complete.
-
Some common uses are to allow a cdrom to be changed even if locked, or to answer the question as to whether a VM was copied or moved.
-
The answer can be used if state is powered-on.
-
-
- question - -
- string - / required -
-
- -
The message id, for example msg.uuid.altered.
-
-
- response - -
- string - / required -
-
- -
The choice key, for example button.uuid.copiedTheVM.
-
-
- datacenter - -
- string -
-
- Default:
"ha-datacenter"
-
-
The datacenter where the VM you'd like to operate the power.
-
This parameter is case sensitive.
-
-
- folder - -
- string -
-
- -
Destination folder, absolute or relative path to find an existing guest.
-
The folder should include the datacenter. ESX's datacenter is ha-datacenter
-
Examples:
-
folder: /ha-datacenter/vm
-
folder: ha-datacenter/vm
-
folder: /datacenter1/vm
-
folder: datacenter1/vm
-
folder: /datacenter1/vm/folder1
-
folder: datacenter1/vm/folder1
-
folder: /folder1/datacenter1/vm
-
folder: folder1/datacenter1/vm
-
folder: /folder1/datacenter1/vm/folder2
-
-
- force - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Ignore warnings and complete the actions.
-
This parameter is useful while forcing virtual machine state.
-
-
- 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 work with.
-
Virtual machine names in vCenter are not necessarily unique, which may be problematic, see name_match.
-
-
- 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.
-
-
- schedule_task_description - -
- string -
-
- -
Description of schedule task.
-
Valid only if scheduled_at is specified.
-
-
- schedule_task_enabled - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Flag to indicate whether the scheduled task is enabled or disabled.
-
-
- schedule_task_name - -
- string -
-
- -
Name of schedule task.
-
Valid only if scheduled_at is specified.
-
-
- scheduled_at - -
- string -
-
- -
Date and time in string format at which specified task needs to be performed.
-
The required format for date and time - 'dd/mm/yyyy hh:mm'.
-
Scheduling task requires vCenter server. A standalone ESXi server does not support this option.
-
-
- state - -
- string -
-
-
    Choices: -
  • powered-off
  • -
  • powered-on
  • -
  • reboot-guest
  • -
  • restarted
  • -
  • shutdown-guest
  • -
  • suspended
  • -
  • present ←
  • -
-
-
Set the state of the virtual machine.
-
-
- state_change_timeout - -
- integer -
-
- Default:
0
-
-
If the state is set to shutdown-guest, by default the module will return immediately after sending the shutdown signal.
-
If this argument is set to a positive integer, the module will instead wait for the VM to reach the poweredoff state.
-
The value sets a timeout in seconds for the module to wait for the state change.
-
-
- 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 unique identifier.
-
This is required if 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

answer

+ +

+ list + / elements=dictionary +

+
+

A list of questions to answer, should one or more arise while waiting for the task to complete.

+

Some common uses are to allow a cdrom to be changed even if locked, or to answer the question as to whether a VM was copied or moved.

+

The answer can be used if state is powered-on.

+
+
+

question

+ +

+ string + / required +

+
+

The message id, for example msg.uuid.altered.

+
+
+

response

+ +

+ string + / required +

+
+

The choice key, for example button.uuid.copiedTheVM.

+
+
+

datacenter

+ +

+ string +

+
+

The datacenter where the VM you'd like to operate the power.

+

This parameter is case sensitive.

+

Default: "ha-datacenter"

+
+
+

folder

+ +

+ string +

+
+

Destination folder, absolute or relative path to find an existing guest.

+

The folder should include the datacenter. ESX's datacenter is ha-datacenter

+

Examples:

+

folder: /ha-datacenter/vm

+

folder: ha-datacenter/vm

+

folder: /datacenter1/vm

+

folder: datacenter1/vm

+

folder: /datacenter1/vm/folder1

+

folder: datacenter1/vm/folder1

+

folder: /folder1/datacenter1/vm

+

folder: folder1/datacenter1/vm

+

folder: /folder1/datacenter1/vm/folder2

+
+
+

force

+ +

+ boolean +

+
+

Ignore warnings and complete the actions.

+

This parameter is useful while forcing virtual machine state.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

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 work with.

+

Virtual machine names in vCenter are not necessarily unique, which may be problematic, see name_match.

+
+
+

name_match

+ +

+ string +

+
+

If multiple virtual machines matching the name, use the first or last found.

+

Choices:

+
    +
  • "first" ← (default)

  • +
  • "last"

  • +
+ +
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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.

+
+
+

schedule_task_description

+ +

+ string +

+
+

Description of schedule task.

+

Valid only if scheduled_at is specified.

+
+
+

schedule_task_enabled

+ +

+ boolean +

+
+

Flag to indicate whether the scheduled task is enabled or disabled.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

schedule_task_name

+ +

+ string +

+
+

Name of schedule task.

+

Valid only if scheduled_at is specified.

+
+
+

scheduled_at

+ +

+ string +

+
+

Date and time in string format at which specified task needs to be performed.

+

The required format for date and time - 'dd/mm/yyyy hh:mm'.

+

Scheduling task requires vCenter server. A standalone ESXi server does not support this option.

+
+
+

state

+ +

+ string +

+
+

Set the state of the virtual machine.

+

Choices:

+
    +
  • "powered-off"

  • +
  • "powered-on"

  • +
  • "reboot-guest"

  • +
  • "restarted"

  • +
  • "shutdown-guest"

  • +
  • "suspended"

  • +
  • "present" ← (default)

  • +
+ +
+
+

state_change_timeout

+ +

+ integer +

+
+

If the state is set to shutdown-guest, by default the module will return immediately after sending the shutdown signal.

+

If this argument is set to a positive integer, the module will instead wait for the VM to reach the poweredoff state.

+

The value sets a timeout in seconds for the module to wait for the state change.

+

Default: 0

+
+
+

use_instance_uuid

+ +

+ boolean +

+
+

Whether to use the VMware instance UUID rather than the BIOS UUID.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

uuid

+ +

+ string +

+
+

UUID of the instance to manage if known, this is VMware's unique identifier.

+

This is required if name or moid is not supplied.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -488,6 +464,7 @@ Examples .. code-block:: yaml + - name: Set the state of a virtual machine to poweroff community.vmware.vmware_guest_powerstate: hostname: "{{ vcenter_hostname }}" @@ -564,11 +541,20 @@ Examples -Status ------- + Authors ~~~~~~~ -- Abhijeet Kasurde (@Akasurde) +- Abhijeet Kasurde (@Akasurde) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_guest_register_operation_module.rst b/docs/community.vmware.vmware_guest_register_operation_module.rst index bb572dd0d..e79fd2dab 100644 --- a/docs/community.vmware.vmware_guest_register_operation_module.rst +++ b/docs/community.vmware.vmware_guest_register_operation_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_guest_register_operation_module: -************************************************ -community.vmware.vmware_guest_register_operation -************************************************ +community.vmware.vmware_guest_register_operation module -- VM inventory registration operation +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**VM inventory registration operation** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_guest_register_operation`. .. contents:: @@ -16,338 +17,321 @@ community.vmware.vmware_guest_register_operation Synopsis -------- + - This module can register or unregister VMs to the inventory. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- cluster - -
- string -
-
- -
Specify a cluster name to register VM.
-
-
- datacenter - -
- string -
-
- Default:
"ha-datacenter"
-
-
Destination datacenter for the register/unregister operation.
-
This parameter is case sensitive.
-
-
- esxi_hostname - -
- string -
-
- -
The ESXi hostname where the virtual machine will run.
-
This parameter is case sensitive.
-
-
- folder - -
- string -
-
- -
Description folder, absolute path of the target folder.
-
The folder should include the datacenter. ESX's datacenter is ha-datacenter.
-
This parameter is case sensitive.
-
Examples:
-
folder: /ha-datacenter/vm
-
folder: ha-datacenter/vm
-
folder: /datacenter1/vm
-
folder: datacenter1/vm
-
folder: /datacenter1/vm/folder1
-
folder: datacenter1/vm/folder1
-
-
- 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 - / required -
-
- -
Specify VM name to be registered in the inventory.
-
-
- 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
-
-
- path - -
- string -
-
- -
Specify the path of vmx file.
-
Examples:
-
[datastore1] vm/vm.vmx
-
[datastore1] vm/vm.vmtx
-
-
- 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 -
-
- -
Specify a resource pool name to register VM.
-
This parameter is case sensitive.
-
Resource pool should be child of the selected host parent.
-
-
- state - -
- string -
-
-
    Choices: -
  • present ←
  • -
  • absent
  • -
-
-
Specify the state the virtual machine should be in.
-
if set to present, register VM in inventory.
-
if set to absent, unregister VM from inventory.
-
-
- template - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Whether to register VM as a template.
-
-
- 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.
-
If virtual machine does not exists, then this parameter is ignored.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

cluster

+ +

+ string +

+
+

Specify a cluster name to register VM.

+
+
+

datacenter

+ +

+ string +

+
+

Destination datacenter for the register/unregister operation.

+

This parameter is case sensitive.

+

Default: "ha-datacenter"

+
+
+

esxi_hostname

+ +

+ string +

+
+

The ESXi hostname where the virtual machine will run.

+

This parameter is case sensitive.

+
+
+

folder

+ +

+ string +

+
+

Description folder, absolute path of the target folder.

+

The folder should include the datacenter. ESX's datacenter is ha-datacenter.

+

This parameter is case sensitive.

+

Examples:

+

folder: /ha-datacenter/vm

+

folder: ha-datacenter/vm

+

folder: /datacenter1/vm

+

folder: datacenter1/vm

+

folder: /datacenter1/vm/folder1

+

folder: datacenter1/vm/folder1

+
+
+

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 + / required +

+
+

Specify VM name to be registered in the inventory.

+
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

path

+ +

+ string +

+
+

Specify the path of vmx file.

+

Examples:

+

[datastore1] vm/vm.vmx

+

[datastore1] vm/vm.vmtx

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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 +

+
+

Specify a resource pool name to register VM.

+

This parameter is case sensitive.

+

Resource pool should be child of the selected host parent.

+
+
+

state

+ +

+ string +

+
+

Specify the state the virtual machine should be in.

+

if set to present, register VM in inventory.

+

if set to absent, unregister VM from inventory.

+

Choices:

+
    +
  • "present" ← (default)

  • +
  • "absent"

  • +
+ +
+
+

template

+ +

+ boolean +

+
+

Whether to register VM as a template.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

uuid

+ +

+ string +

+
+

UUID of the virtual machine to manage if known, this is VMware's unique identifier.

+

If virtual machine does not exists, then this parameter is ignored.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -355,6 +339,7 @@ Examples .. code-block:: yaml + - name: Register VM to inventory community.vmware.vmware_guest_register_operation: hostname: "{{ vcenter_hostname }}" @@ -407,11 +392,20 @@ Examples -Status ------- + Authors ~~~~~~~ - sky-joker (@sky-joker) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_guest_screenshot_module.rst b/docs/community.vmware.vmware_guest_screenshot_module.rst index 0d4039eb9..bc8c1e43c 100644 --- a/docs/community.vmware.vmware_guest_screenshot_module.rst +++ b/docs/community.vmware.vmware_guest_screenshot_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_guest_screenshot_module: -**************************************** -community.vmware.vmware_guest_screenshot -**************************************** +community.vmware.vmware_guest_screenshot module -- Create a screenshot of the Virtual Machine console. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Create a screenshot of the Virtual Machine console.** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_guest_screenshot`. .. contents:: @@ -16,300 +17,283 @@ community.vmware.vmware_guest_screenshot Synopsis -------- + - This module is used to take screenshot of the given virtual machine when virtual machine is powered on. - All parameters and VMware object names are case sensitive. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- cluster - -
- string -
-
- -
The name of cluster where the virtual machine is running.
-
This is a required parameter, if esxi_hostname is not set.
-
esxi_hostname and cluster are mutually exclusive parameters.
-
-
- datacenter - -
- string -
-
- -
The datacenter name to which virtual machine belongs to.
-
-
- esxi_hostname - -
- string -
-
- -
The ESXi hostname where the virtual machine is running.
-
This is a required parameter, if cluster is not set.
-
esxi_hostname and cluster are mutually exclusive parameters.
-
-
- 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. ESXi server's datacenter is ha-datacenter.
-
Examples:
-
folder: /ha-datacenter/vm
-
folder: ha-datacenter/vm
-
folder: /datacenter1/vm
-
folder: datacenter1/vm
-
folder: /datacenter1/vm/folder1
-
folder: datacenter1/vm/folder1
-
folder: /folder1/datacenter1/vm
-
folder: folder1/datacenter1/vm
-
folder: /folder1/datacenter1/vm/folder2
-
-
- 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.
-
-
- local_path - -
- path -
-
- -
If local_path is not set, the created screenshot file will be kept in the directory of the virtual machine on ESXi host. If local_path is set to a valid path on local machine, then the screenshot file will be downloaded from ESXi host to the local directory.
-
If not download screenshot file to local machine, you can open it through the returned file URL in screenshot facts manually.
-
-
- 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.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

cluster

+ +

+ string +

+
+

The name of cluster where the virtual machine is running.

+

This is a required parameter, if esxi_hostname is not set.

+

esxi_hostname and cluster are mutually exclusive parameters.

+
+
+

datacenter

+ +

+ string +

+
+

The datacenter name to which virtual machine belongs to.

+
+
+

esxi_hostname

+ +

+ string +

+
+

The ESXi hostname where the virtual machine is running.

+

This is a required parameter, if cluster is not set.

+

esxi_hostname and cluster are mutually exclusive parameters.

+
+
+

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. ESXi server's datacenter is ha-datacenter.

+

Examples:

+

folder: /ha-datacenter/vm

+

folder: ha-datacenter/vm

+

folder: /datacenter1/vm

+

folder: datacenter1/vm

+

folder: /datacenter1/vm/folder1

+

folder: datacenter1/vm/folder1

+

folder: /folder1/datacenter1/vm

+

folder: folder1/datacenter1/vm

+

folder: /folder1/datacenter1/vm/folder2

+
+
+

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.

+
+
+

local_path

+ +

+ path +

+
+

If local_path is not set, the created screenshot file will be kept in the directory of the virtual machine on ESXi host. If local_path is set to a valid path on local machine, then the screenshot file will be downloaded from ESXi host to the local directory.

+

If not download screenshot file to local machine, you can open it through the returned file URL in screenshot facts manually.

+
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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

+ +

aliases: admin, user

+

+ 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.

+
+
+

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 +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -317,6 +301,7 @@ Examples .. code-block:: yaml + - name: take a screenshot of the virtual machine console community.vmware.vmware_guest_screenshot: hostname: "{{ vcenter_hostname }}" @@ -343,44 +328,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- screenshot_info - -
- dictionary -
-
always -
display the facts of captured virtual machine screenshot file
-
-
Sample:
-
{'virtual_machine': 'test_vm', 'screenshot_file': '[datastore0] test_vm/test_vm-1.png', 'task_start_time': '2019-05-25T10:35:04.215016Z', 'task_complete_time': '2019-05-25T10:35:04.412622Z', 'result': 'success', 'screenshot_file_url': 'https://test_vcenter/folder/test_vm/test_vm-1.png?dcPath=test-dc&dsName=datastore0', 'download_local_path': '/tmp/', 'download_file_size': 2367}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

screenshot_info

+ +

+ dictionary +

+
+

display the facts of captured virtual machine screenshot file

+

Returned: always

+

Sample: {"download_file_size": 2367, "download_local_path": "/tmp/", "result": "success", "screenshot_file": "[datastore0] test_vm/test_vm-1.png", "screenshot_file_url": "https://test_vcenter/folder/test_vm/test_vm-1.png?dcPath=test-dc&dsName=datastore0", "task_complete_time": "2019-05-25T10:35:04.412622Z", "task_start_time": "2019-05-25T10:35:04.215016Z", "virtual_machine": "test_vm"}

+
+ + Authors ~~~~~~~ -- Diane Wang (@Tomorrow9) +- Diane Wang (@Tomorrow9) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_guest_sendkey_module.rst b/docs/community.vmware.vmware_guest_sendkey_module.rst index 8be423ef2..a3bdaf052 100644 --- a/docs/community.vmware.vmware_guest_sendkey_module.rst +++ b/docs/community.vmware.vmware_guest_sendkey_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_guest_sendkey_module: -************************************* -community.vmware.vmware_guest_sendkey -************************************* +community.vmware.vmware_guest_sendkey module -- Send USB HID codes to the Virtual Machine's keyboard. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Send USB HID codes to the Virtual Machine's keyboard.** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_guest_sendkey`. .. contents:: @@ -16,337 +17,316 @@ community.vmware.vmware_guest_sendkey Synopsis -------- + - This module is used to send keystrokes to given virtual machine. - All parameters and VMware object names are case sensitive. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- cluster - -
- string -
-
- -
The name of cluster where the virtual machine is running.
-
This is a required parameter, if esxi_hostname is not set.
-
esxi_hostname and cluster are mutually exclusive parameters.
-
-
- datacenter - -
- string -
-
- -
The datacenter name to which virtual machine belongs to.
-
-
- esxi_hostname - -
- string -
-
- -
The ESXi hostname where the virtual machine is running.
-
This is a required parameter, if cluster is not set.
-
esxi_hostname and cluster are mutually exclusive parameters.
-
-
- 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. ESXi server's datacenter is ha-datacenter.
-
Examples:
-
folder: /ha-datacenter/vm
-
folder: ha-datacenter/vm
-
folder: /datacenter1/vm
-
folder: datacenter1/vm
-
folder: /datacenter1/vm/folder1
-
folder: datacenter1/vm/folder1
-
folder: /folder1/datacenter1/vm
-
folder: folder1/datacenter1/vm
-
folder: /folder1/datacenter1/vm/folder2
-
-
- 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.
-
-
- keys_send - -
- list - / elements=string -
-
- Default:
[]
-
-
The list of the keys will be sent to the virtual machine.
-
Valid values are ENTER, ESC, BACKSPACE, TAB, SPACE, CAPSLOCK, HOME, DELETE, END, CTRL_ALT_DEL, CTRL_C, CTRL_X and F1 to F12, RIGHTARROW, LEFTARROW, DOWNARROW, UPARROW.
-
If both keys_send and string_send are specified, keys in keys_send list will be sent in front of the string_send.
-
Values HOME and END are added in version 1.17.0.
-
-
- 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:
0
-
-
Sleep time in seconds between two keys or string sent to the virtual machine.
-
API is faster than actual key or string send to virtual machine, this parameter allow to control delay between keys and/or strings.
-
-
- string_send - -
- string -
-
- -
The string will be sent to the virtual machine.
-
This string can contain valid special character, alphabet and digit on the keyboard.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

cluster

+ +

+ string +

+
+

The name of cluster where the virtual machine is running.

+

This is a required parameter, if esxi_hostname is not set.

+

esxi_hostname and cluster are mutually exclusive parameters.

+
+
+

datacenter

+ +

+ string +

+
+

The datacenter name to which virtual machine belongs to.

+
+
+

esxi_hostname

+ +

+ string +

+
+

The ESXi hostname where the virtual machine is running.

+

This is a required parameter, if cluster is not set.

+

esxi_hostname and cluster are mutually exclusive parameters.

+
+
+

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. ESXi server's datacenter is ha-datacenter.

+

Examples:

+

folder: /ha-datacenter/vm

+

folder: ha-datacenter/vm

+

folder: /datacenter1/vm

+

folder: datacenter1/vm

+

folder: /datacenter1/vm/folder1

+

folder: datacenter1/vm/folder1

+

folder: /folder1/datacenter1/vm

+

folder: folder1/datacenter1/vm

+

folder: /folder1/datacenter1/vm/folder2

+
+
+

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.

+
+
+

keys_send

+ +

+ list + / elements=string +

+
+

The list of the keys will be sent to the virtual machine.

+

Valid values are ENTER, ESC, BACKSPACE, TAB, SPACE, CAPSLOCK, HOME, DELETE, END, CTRL_ALT_DEL, CTRL_C, CTRL_X and F1 to F12, RIGHTARROW, LEFTARROW, DOWNARROW, UPARROW.

+

If both keys_send and string_send are specified, keys in keys_send list will be sent in front of the string_send.

+

Values HOME and END are added in version 1.17.0.

+

Default: []

+
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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 +

+
+

Sleep time in seconds between two keys or string sent to the virtual machine.

+

API is faster than actual key or string send to virtual machine, this parameter allow to control delay between keys and/or strings.

+

Default: 0

+
+
+

string_send

+ +

+ string +

+
+

The string will be sent to the virtual machine.

+

This string can contain valid special character, alphabet and digit on the keyboard.

+
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

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 +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -354,6 +334,7 @@ Examples .. code-block:: yaml + - name: Send list of keys to virtual machine community.vmware.vmware_guest_sendkey: hostname: "{{ vcenter_hostname }}" @@ -396,44 +377,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- sendkey_info - -
- dictionary -
-
always -
display the keys and the number of keys sent to the virtual machine
-
-
Sample:
-
{'virtual_machine': 'test_vm', 'keys_send': ['SPACE', 'DOWNARROW', 'DOWNARROW', 'ENTER'], 'string_send': None, 'keys_send_number': 4, 'returned_keys_send_number': 4}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

sendkey_info

+ +

+ dictionary +

+
+

display the keys and the number of keys sent to the virtual machine

+

Returned: always

+

Sample: {"keys_send": ["SPACE", "DOWNARROW", "DOWNARROW", "ENTER"], "keys_send_number": 4, "returned_keys_send_number": 4, "string_send": null, "virtual_machine": "test_vm"}

+
+ + Authors ~~~~~~~ -- Diane Wang (@Tomorrow9) +- Diane Wang (@Tomorrow9) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_guest_serial_port_module.rst b/docs/community.vmware.vmware_guest_serial_port_module.rst index b7ec6b62d..68a5efe7b 100644 --- a/docs/community.vmware.vmware_guest_serial_port_module.rst +++ b/docs/community.vmware.vmware_guest_serial_port_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_guest_serial_port_module: -***************************************** -community.vmware.vmware_guest_serial_port -***************************************** +community.vmware.vmware_guest_serial_port module -- Manage serial ports on an existing VM ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Manage serial ports on an existing VM** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_guest_serial_port`. .. contents:: @@ -16,459 +17,439 @@ community.vmware.vmware_guest_serial_port Synopsis -------- + - This module can be used to manage serial ports on an existing VM + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- backings - -
- list - / elements=dictionary - / required -
-
- -
A list of backings for serial ports.
-
backing_type (str): is required to add or reconfigure or remove an existing serial port.
-
-
- backing_type - -
- string - / required -
-
- -
Backing type is required for the serial ports to be added or reconfigured or removed.
-

aliases: type
-
-
- device_name - -
- string -
-
- -
Serial device absolutely path.
-
Required when backing_type=device.
-
-
- direction - -
- string -
-
-
    Choices: -
  • client ←
  • -
  • server
  • -
-
-
The direction of the connection.
-
Required when backing_type=network.
-
-
- endpoint - -
- string -
-
-
    Choices: -
  • client ←
  • -
  • server
  • -
-
-
When you use serial port pipe backing to connect a virtual machine to another process, you must define the endpoints.
-
Required when backing_type=pipe.
-
-
- file_path - -
- string -
-
- -
File path for the host file used in this backing. Fully qualified path is required, like <datastore_name>/<file_name>.
-
Required when backing_type=file.
-
-
- no_rx_loss - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Enables optimized data transfer over the pipe.
-
Required when backing_type=pipe.
-
-
- pipe_name - -
- string -
-
- -
Pipe name for the host pipe.
-
Required when backing_type=pipe.
-
-
- proxy_uri - -
- string -
-
added in 3.7.0
-
- -
Identifies a vSPC proxy service that provides network access to the service_uri.
-
If you specify a proxy URI, the virtual machine initiates a connection with the proxy service and forwards the serviceURI and direction to the proxy.
-
The Use Virtual Serial Port Concentrator option is automatically enabled when proxy_uri is set.
-
-
- service_uri - -
- string -
-
- -
Identifies the local host or a system on the network, depending on the value of direction.
-
If you use the virtual machine as a server, the URI identifies the host on which the virtual machine runs.
-
In this case, the host name part of the URI should be empty, or it should specify the address of the local host.
-
If you use the virtual machine as a client, the URI identifies the remote system on the network.
-
Required when backing_type=network.
-
-
- state - -
- string -
-
-
    Choices: -
  • present ←
  • -
  • absent
  • -
-
-
state is required to identify whether we are adding, modifying or removing the serial port.
-
If state is set to present, a serial port will be added or modified.
-
If state is set to absent, an existing serial port will be removed.
-
If an existing serial port to modify or remove, backing_type and either of service_uri or pipe_name or device_name or file_path are required.
-
-
- yield_on_poll - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Enables CPU yield behavior.
-
-
- 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.
-
-
- 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 the serial ports, 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

backings

+ +

+ list + / elements=dictionary + / required +

+
+

A list of backings for serial ports.

+

backing_type (str): is required to add or reconfigure or remove an existing serial port.

+
+
+
+

backing_type

+ +

aliases: type

+

+ string + / required +

+
+

Backing type is required for the serial ports to be added or reconfigured or removed.

+
+
+

device_name

+ +

+ string +

+
+

Serial device absolutely path.

+

Required when backing_type=device.

+
+
+

direction

+ +

+ string +

+
+

The direction of the connection.

+

Required when backing_type=network.

+

Choices:

+
    +
  • "client" ← (default)

  • +
  • "server"

  • +
+ +
+
+

endpoint

+ +

+ string +

+
+

When you use serial port pipe backing to connect a virtual machine to another process, you must define the endpoints.

+

Required when backing_type=pipe.

+

Choices:

+
    +
  • "client" ← (default)

  • +
  • "server"

  • +
+ +
+
+

file_path

+ +

+ string +

+
+

File path for the host file used in this backing. Fully qualified path is required, like <datastore_name>/<file_name>.

+

Required when backing_type=file.

+
+
+

no_rx_loss

+ +

+ boolean +

+
+

Enables optimized data transfer over the pipe.

+

Required when backing_type=pipe.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

pipe_name

+ +

+ string +

+
+

Pipe name for the host pipe.

+

Required when backing_type=pipe.

+
+
+

proxy_uri

+ +

+ string +

+

added in community.vmware 3.7.0

+
+

Identifies a vSPC proxy service that provides network access to the service_uri.

+

If you specify a proxy URI, the virtual machine initiates a connection with the proxy service and forwards the serviceURI and direction to the proxy.

+

The Use Virtual Serial Port Concentrator option is automatically enabled when proxy_uri is set.

+
+
+

service_uri

+ +

+ string +

+
+

Identifies the local host or a system on the network, depending on the value of direction.

+

If you use the virtual machine as a server, the URI identifies the host on which the virtual machine runs.

+

In this case, the host name part of the URI should be empty, or it should specify the address of the local host.

+

If you use the virtual machine as a client, the URI identifies the remote system on the network.

+

Required when backing_type=network.

+
+
+

state

+ +

+ string +

+
+

state is required to identify whether we are adding, modifying or removing the serial port.

+

If state is set to present, a serial port will be added or modified.

+

If state is set to absent, an existing serial port will be removed.

+

If an existing serial port to modify or remove, backing_type and either of service_uri or pipe_name or device_name or file_path are required.

+

Choices:

+
    +
  • "present" ← (default)

  • +
  • "absent"

  • +
+ +
+
+

yield_on_poll

+ +

+ boolean +

+
+

Enables CPU yield behavior.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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 +

+
+

Whether to use the VMware instance UUID rather than the BIOS UUID.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

uuid

+ +

+ string +

+
+

UUID of the instance to manage the serial ports, this is VMware's unique identifier.

+

This is a required parameter, if parameter name or moid is not supplied.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -476,6 +457,7 @@ Examples .. code-block:: yaml + # Create serial ports - name: Create multiple serial ports with Backing type - network, pipe, device and file community.vmware.vmware_guest_serial_port: @@ -540,44 +522,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- serial_port_data - -
- dictionary -
-
always -
metadata about the virtual machine's serial ports after managing them
-
-
Sample:
-
[{'backing_type': 'network', 'direction': 'client', 'service_uri': 'tcp://6000'}, {'backing_type': 'pipe', 'direction': 'server', 'pipe_name': 'serial pipe'}]
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

serial_port_data

+ +

+ dictionary +

+
+

metadata about the virtual machine's serial ports after managing them

+

Returned: always

+

Sample: [{"backing_type": "network", "direction": "client", "service_uri": "tcp://6000"}, {"backing_type": "pipe", "direction": "server", "pipe_name": "serial pipe"}]

+
+ + Authors ~~~~~~~ - Anusha Hegde (@anusha94) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_guest_snapshot_info_module.rst b/docs/community.vmware.vmware_guest_snapshot_info_module.rst index 1c8872170..c2a8cc1c1 100644 --- a/docs/community.vmware.vmware_guest_snapshot_info_module.rst +++ b/docs/community.vmware.vmware_guest_snapshot_info_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_guest_snapshot_info_module: -******************************************* -community.vmware.vmware_guest_snapshot_info -******************************************* +community.vmware.vmware_guest_snapshot_info module -- Gather info about virtual machine's snapshots in vCenter +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Gather info about virtual machine's snapshots in vCenter** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_guest_snapshot_info`. .. contents:: @@ -16,270 +17,259 @@ community.vmware.vmware_guest_snapshot_info Synopsis -------- + - This module can be used to gather information about virtual machine's snapshots. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- datacenter - -
- string - / required -
-
- -
Name of the datacenter.
-
-
- folder - -
- string -
-
- -
Destination folder, absolute or relative path to find an existing guest.
-
This is required parameter, if name is supplied.
-
The folder should include the datacenter. ESX's datacenter is ha-datacenter
-
Examples:
-
folder: /ha-datacenter/vm
-
folder: ha-datacenter/vm
-
folder: /datacenter1/vm
-
folder: datacenter1/vm
-
folder: /datacenter1/vm/folder1
-
folder: datacenter1/vm/folder1
-
folder: /folder1/datacenter1/vm
-
folder: folder1/datacenter1/vm
-
folder: /folder1/datacenter1/vm/folder2
-
-
- 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 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.
-
-
- 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.
-
The folder is ignored, if uuid is provided.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

datacenter

+ +

+ string + / required +

+
+

Name of the datacenter.

+
+
+

folder

+ +

+ string +

+
+

Destination folder, absolute or relative path to find an existing guest.

+

This is required parameter, if name is supplied.

+

The folder should include the datacenter. ESX's datacenter is ha-datacenter

+

Examples:

+

folder: /ha-datacenter/vm

+

folder: ha-datacenter/vm

+

folder: /datacenter1/vm

+

folder: datacenter1/vm

+

folder: /datacenter1/vm/folder1

+

folder: datacenter1/vm/folder1

+

folder: /folder1/datacenter1/vm

+

folder: folder1/datacenter1/vm

+

folder: /folder1/datacenter1/vm/folder2

+
+
+

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 is not supplied.

+
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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 +

+
+

Whether to use the VMware instance UUID rather than the BIOS UUID.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

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.

+

The folder is ignored, if uuid is provided.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -287,6 +277,7 @@ Examples .. code-block:: yaml + - name: Gather snapshot information about the virtual machine in the given vCenter community.vmware.vmware_guest_snapshot_info: hostname: "{{ vcenter_hostname }}" @@ -310,44 +301,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- guest_snapshots - -
- dictionary -
-
always -
metadata about the snapshot information
-
-
Sample:
-
{'current_snapshot': {'creation_time': '2018-02-10T14:48:31.999459+00:00', 'description': '', 'id': 28, 'name': 'snap_0003', 'state': 'poweredOff', 'quiesced': False}, 'snapshots': [{'creation_time': '2018-02-10T14:48:31.999459+00:00', 'description': '', 'id': 28, 'name': 'snap_0003', 'state': 'poweredOff', 'quiesced': False}]}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

guest_snapshots

+ +

+ dictionary +

+
+

metadata about the snapshot information

+

Returned: always

+

Sample: {"current_snapshot": {"creation_time": "2018-02-10T14:48:31.999459+00:00", "description": "", "id": 28, "name": "snap_0003", "quiesced": false, "state": "poweredOff"}, "snapshots": [{"creation_time": "2018-02-10T14:48:31.999459+00:00", "description": "", "id": 28, "name": "snap_0003", "quiesced": false, "state": "poweredOff"}]}

+
+ + Authors ~~~~~~~ - Abhijeet Kasurde (@Akasurde) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_guest_snapshot_module.rst b/docs/community.vmware.vmware_guest_snapshot_module.rst index f6dceb2de..0caa07122 100644 --- a/docs/community.vmware.vmware_guest_snapshot_module.rst +++ b/docs/community.vmware.vmware_guest_snapshot_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_guest_snapshot_module: -************************************** -community.vmware.vmware_guest_snapshot -************************************** +community.vmware.vmware_guest_snapshot module -- Manages virtual machines snapshots in vCenter +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Manages virtual machines snapshots in vCenter** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_guest_snapshot`. .. contents:: @@ -16,442 +17,423 @@ community.vmware.vmware_guest_snapshot Synopsis -------- + - This module can be used to create, delete and update snapshot(s) of the given virtual machine. - All parameters and VMware object names are case sensitive. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- datacenter - -
- string - / required -
-
- -
Destination datacenter for the deploy operation.
-
-
- description - -
- string -
-
- Default:
""
-
-
Define an arbitrary description to attach to snapshot.
-
-
- folder - -
- string -
-
- -
Destination folder, absolute or relative path to find an existing guest.
-
This is required parameter, if name is supplied.
-
The folder should include the datacenter. ESX's datacenter is ha-datacenter.
-
Examples:
-
folder: /ha-datacenter/vm
-
folder: ha-datacenter/vm
-
folder: /datacenter1/vm
-
folder: datacenter1/vm
-
folder: /datacenter1/vm/folder1
-
folder: datacenter1/vm/folder1
-
folder: /folder1/datacenter1/vm
-
folder: folder1/datacenter1/vm
-
folder: /folder1/datacenter1/vm/folder2
-
-
- 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.
-
-
- memory_dump - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
If set to true, memory dump of virtual machine is also included in snapshot.
-
Note that memory snapshots take time and resources, this will take longer time to create.
-
If virtual machine does not provide capability to take memory snapshot, then this flag is set to false.
-
-
- 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 work with.
-
This is required parameter, if uuid or moid is not supplied.
-
-
- name_match - -
- string -
-
-
    Choices: -
  • first ←
  • -
  • last
  • -
-
-
If multiple VMs matching the name, use the first or last found.
-
-
- new_description - -
- string -
-
- -
Value to change the description of an existing snapshot to.
-
-
- new_snapshot_name - -
- string -
-
- -
Value to rename the existing snapshot to.
-
-
- 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.
-
-
- quiesce - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
If set to true and virtual machine is powered on, it will quiesce the file system in virtual machine.
-
Note that VMware Tools are required for this flag.
-
If virtual machine is powered off or VMware Tools are not available, then this flag is set to false.
-
If virtual machine does not provide capability to take quiesce snapshot, then this flag is set to false.
-
-
- remove_children - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
If set to true and state is set to absent, then entire snapshot subtree is set for removal.
-
-
- snapshot_name - -
- string -
-
- -
Sets the snapshot name to manage.
-
This param is required only if state is not remove_all
-
-
- state - -
- string -
-
-
    Choices: -
  • present ←
  • -
  • absent
  • -
  • revert
  • -
  • remove_all
  • -
-
-
Manage snapshot(s) attached to a specific virtual machine.
-
If set to present and snapshot absent, then will create a new snapshot with the given name.
-
If set to present and snapshot present, then no changes are made.
-
If set to absent and snapshot present, then snapshot with the given name is removed.
-
If set to absent and snapshot absent, then no changes are made.
-
If set to revert and snapshot present, then virtual machine state is reverted to the given snapshot.
-
If set to revert and snapshot absent, then no changes are made.
-
If set to remove_all and snapshot(s) present, then all snapshot(s) will be removed.
-
If set to remove_all and snapshot(s) absent, then no changes are made.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

datacenter

+ +

+ string + / required +

+
+

Destination datacenter for the deploy operation.

+
+
+

description

+ +

+ string +

+
+

Define an arbitrary description to attach to snapshot.

+

Default: ""

+
+
+

folder

+ +

+ string +

+
+

Destination folder, absolute or relative path to find an existing guest.

+

This is required parameter, if name is supplied.

+

The folder should include the datacenter. ESX's datacenter is ha-datacenter.

+

Examples:

+

folder: /ha-datacenter/vm

+

folder: ha-datacenter/vm

+

folder: /datacenter1/vm

+

folder: datacenter1/vm

+

folder: /datacenter1/vm/folder1

+

folder: datacenter1/vm/folder1

+

folder: /folder1/datacenter1/vm

+

folder: folder1/datacenter1/vm

+

folder: /folder1/datacenter1/vm/folder2

+
+
+

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.

+
+
+

memory_dump

+ +

+ boolean +

+
+

If set to true, memory dump of virtual machine is also included in snapshot.

+

Note that memory snapshots take time and resources, this will take longer time to create.

+

If virtual machine does not provide capability to take memory snapshot, then this flag is set to false.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

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 work with.

+

This is required parameter, if uuid or moid is not supplied.

+
+
+

name_match

+ +

+ string +

+
+

If multiple VMs matching the name, use the first or last found.

+

Choices:

+
    +
  • "first" ← (default)

  • +
  • "last"

  • +
+ +
+
+

new_description

+ +

+ string +

+
+

Value to change the description of an existing snapshot to.

+
+
+

new_snapshot_name

+ +

+ string +

+
+

Value to rename the existing snapshot to.

+
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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.

+
+
+

quiesce

+ +

+ boolean +

+
+

If set to true and virtual machine is powered on, it will quiesce the file system in virtual machine.

+

Note that VMware Tools are required for this flag.

+

If virtual machine is powered off or VMware Tools are not available, then this flag is set to false.

+

If virtual machine does not provide capability to take quiesce snapshot, then this flag is set to false.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

remove_children

+ +

+ boolean +

+
+

If set to true and state is set to absent, then entire snapshot subtree is set for removal.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

snapshot_name

+ +

+ string +

+
+

Sets the snapshot name to manage.

+

This param is required only if state is not remove_all

+
+
+

state

+ +

+ string +

+
+

Manage snapshot(s) attached to a specific virtual machine.

+

If set to present and snapshot absent, then will create a new snapshot with the given name.

+

If set to present and snapshot present, then no changes are made.

+

If set to absent and snapshot present, then snapshot with the given name is removed.

+

If set to absent and snapshot absent, then no changes are made.

+

If set to revert and snapshot present, then virtual machine state is reverted to the given snapshot.

+

If set to revert and snapshot absent, then no changes are made.

+

If set to remove_all and snapshot(s) present, then all snapshot(s) will be removed.

+

If set to remove_all and snapshot(s) absent, then no changes are made.

+

Choices:

+
    +
  • "present" ← (default)

  • +
  • "absent"

  • +
  • "revert"

  • +
  • "remove_all"

  • +
+ +
+
+

use_instance_uuid

+ +

+ boolean +

+
+

Whether to use the VMware instance UUID rather than the BIOS UUID.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

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 +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -459,7 +441,8 @@ Examples .. code-block:: yaml - - name: Create a snapshot + + - name: Create a snapshot community.vmware.vmware_guest_snapshot: hostname: "{{ vcenter_hostname }}" username: "{{ vcenter_username }}" @@ -561,44 +544,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- snapshot_results - -
- dictionary -
-
always -
metadata about the virtual machine snapshots
-
-
Sample:
-
{'current_snapshot': {'creation_time': '2019-04-09T14:40:26.617427+00:00', 'description': 'Snapshot 4 example', 'id': 4, 'name': 'snapshot4', 'state': 'poweredOff'}, 'snapshots': [{'creation_time': '2019-04-09T14:38:24.667543+00:00', 'description': 'Snapshot 3 example', 'id': 3, 'name': 'snapshot3', 'state': 'poweredOff'}, {'creation_time': '2019-04-09T14:40:26.617427+00:00', 'description': 'Snapshot 4 example', 'id': 4, 'name': 'snapshot4', 'state': 'poweredOff'}]}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

snapshot_results

+ +

+ dictionary +

+
+

metadata about the virtual machine snapshots

+

Returned: always

+

Sample: {"current_snapshot": {"creation_time": "2019-04-09T14:40:26.617427+00:00", "description": "Snapshot 4 example", "id": 4, "name": "snapshot4", "state": "poweredOff"}, "snapshots": [{"creation_time": "2019-04-09T14:38:24.667543+00:00", "description": "Snapshot 3 example", "id": 3, "name": "snapshot3", "state": "poweredOff"}, {"creation_time": "2019-04-09T14:40:26.617427+00:00", "description": "Snapshot 4 example", "id": 4, "name": "snapshot4", "state": "poweredOff"}]}

+
+ + Authors ~~~~~~~ -- Loic Blot (@nerzhul) +- Loic Blot (@nerzhul) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_guest_storage_policy_module.rst b/docs/community.vmware.vmware_guest_storage_policy_module.rst index 36bae3f07..008c23c3f 100644 --- a/docs/community.vmware.vmware_guest_storage_policy_module.rst +++ b/docs/community.vmware.vmware_guest_storage_policy_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_guest_storage_policy_module: -******************************************** -community.vmware.vmware_guest_storage_policy -******************************************** +community.vmware.vmware_guest_storage_policy module -- Set VM Home and disk(s) storage policy profiles. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Set VM Home and disk(s) storage policy profiles.** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_guest_storage_policy`. .. contents:: @@ -16,323 +17,304 @@ community.vmware.vmware_guest_storage_policy Synopsis -------- + - This module can be used to enforce storage policy profiles per disk and/or VM Home on a virtual machine. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- disk - -
- list - / elements=dictionary -
-
- -
A list of disks with storage profile policies to enforce.
-
All values and parameters are case sensitive.
-
At least one of disk and vm_home are required parameters.
-
-
- controller_number - -
- integer -
-
- Default:
0
-
-
SCSI controller number.
-
Valid values range from 0 to 3.
-
-
- policy - -
- string - / required -
-
- -
Name of the storage profile policy to enforce for the disk.
-
-
- unit_number - -
- integer - / required -
-
- -
Disk Unit Number.
-
Valid values range from 0 to 15.
-
-
- folder - -
- string -
-
- -
Destination folder, absolute or relative path to find an existing guest.
-
This is a required parameter 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
-
-
- 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.
-
One of name, uuid, or moid are required to define the virtual machine.
-
-
- name - -
- string -
-
- -
Name of the virtual machine.
-
One of name, uuid, or moid are required to define the virtual machine.
-
-
- 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.
-
One of name, uuid, or moid are required to define the virtual machine.
-
-
- 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.
-
-
- vm_home - -
- string -
-
- -
A storage profile policy to set on VM Home.
-
All values and parameters are case sensitive.
-
At least one of disk or vm_home are required parameters.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

disk

+ +

+ list + / elements=dictionary +

+
+

A list of disks with storage profile policies to enforce.

+

All values and parameters are case sensitive.

+

At least one of disk and vm_home are required parameters.

+
+
+

controller_number

+ +

+ integer +

+
+

SCSI controller number.

+

Valid values range from 0 to 3.

+

Default: 0

+
+
+

policy

+ +

+ string + / required +

+
+

Name of the storage profile policy to enforce for the disk.

+
+
+

unit_number

+ +

+ integer + / required +

+
+

Disk Unit Number.

+

Valid values range from 0 to 15.

+
+
+

folder

+ +

+ string +

+
+

Destination folder, absolute or relative path to find an existing guest.

+

This is a required parameter 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

+
+
+

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.

+

One of name, uuid, or moid are required to define the virtual machine.

+
+
+

name

+ +

+ string +

+
+

Name of the virtual machine.

+

One of name, uuid, or moid are required to define the virtual machine.

+
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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

+ +

aliases: admin, user

+

+ 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.

+
+
+

uuid

+ +

+ string +

+
+

UUID of the virtual machine.

+

One of name, uuid, or moid are required to define the virtual machine.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

vm_home

+ +

+ string +

+
+

A storage profile policy to set on VM Home.

+

All values and parameters are case sensitive.

+

At least one of disk or vm_home are required parameters.

+
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -340,6 +322,7 @@ Examples .. code-block:: yaml + - name: Enforce storepol1 policy for disk 0 and 1 on SCSI controller 0 using UUID community.vmware.vmware_guest_storage_policy: hostname: "{{ vcenter_hostname }}" @@ -369,61 +352,69 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- changed_policies - -
- dictionary -
-
always -
Dictionary containing the changed policies of disk (list of dictionaries) and vm_home.
-
-
Sample:
-
{'disk': [{'policy': 'storepol1', 'unit_number': 0}], 'vm_home': 'storepol1'}
-
-
- msg - -
- string -
-
always -
Informational message on the job result.
-
-
Sample:
-
Policies successfully set.
-
-

- - -Status ------- + + + + + + + + + + + + + + + + + +

Key

Description

+
+

changed_policies

+ +

+ dictionary +

+
+

Dictionary containing the changed policies of disk (list of dictionaries) and vm_home.

+

Returned: always

+

Sample: {"disk": [{"policy": "storepol1", "unit_number": 0}], "vm_home": "storepol1"}

+
+
+

msg

+ +

+ string +

+
+

Informational message on the job result.

+

Returned: always

+

Sample: "Policies successfully set."

+
+ + Authors ~~~~~~~ - Tyler Gates (@tgates81) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_guest_tools_info_module.rst b/docs/community.vmware.vmware_guest_tools_info_module.rst index 8fa844f1c..9c93e3a7b 100644 --- a/docs/community.vmware.vmware_guest_tools_info_module.rst +++ b/docs/community.vmware.vmware_guest_tools_info_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_guest_tools_info_module: -**************************************** -community.vmware.vmware_guest_tools_info -**************************************** +community.vmware.vmware_guest_tools_info module -- Gather info about VMware tools installed in VM ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Gather info about VMware tools installed in VM** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_guest_tools_info`. .. contents:: @@ -16,287 +17,276 @@ community.vmware.vmware_guest_tools_info Synopsis -------- + - Gather information about the VMware tools installed in virtual machine. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- datacenter - -
- string -
-
- -
The datacenter name to which virtual machine belongs to.
-
-
- folder - -
- string -
-
- -
Destination folder, absolute or relative path to find an existing guest.
-
This is required if name is supplied.
-
The folder should include the datacenter. ESXi server's datacenter is ha-datacenter.
-
Examples:
-
folder: /ha-datacenter/vm
-
folder: ha-datacenter/vm
-
folder: /datacenter1/vm
-
folder: datacenter1/vm
-
folder: /datacenter1/vm/folder1
-
folder: datacenter1/vm/folder1
-
folder: /folder1/datacenter1/vm
-
folder: folder1/datacenter1/vm
-
folder: /folder1/datacenter1/vm/folder2
-
-
- 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 get VMware tools info.
-
This is required if uuid or moid is not supplied.
-
-
- name_match - -
- string -
-
-
    Choices: -
  • first ←
  • -
  • last
  • -
-
-
If multiple VMs 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 unique identifier.
-
This is required if 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

datacenter

+ +

+ string +

+
+

The datacenter name to which virtual machine belongs to.

+
+
+

folder

+ +

+ string +

+
+

Destination folder, absolute or relative path to find an existing guest.

+

This is required if name is supplied.

+

The folder should include the datacenter. ESXi server's datacenter is ha-datacenter.

+

Examples:

+

folder: /ha-datacenter/vm

+

folder: ha-datacenter/vm

+

folder: /datacenter1/vm

+

folder: datacenter1/vm

+

folder: /datacenter1/vm/folder1

+

folder: datacenter1/vm/folder1

+

folder: /folder1/datacenter1/vm

+

folder: folder1/datacenter1/vm

+

folder: /folder1/datacenter1/vm/folder2

+
+
+

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 get VMware tools info.

+

This is required if uuid or moid is not supplied.

+
+
+

name_match

+ +

+ string +

+
+

If multiple VMs matching the name, use the first or last found.

+

Choices:

+
    +
  • "first" ← (default)

  • +
  • "last"

  • +
+ +
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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 +

+
+

Whether to use the VMware instance UUID rather than the BIOS UUID.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

uuid

+ +

+ string +

+
+

UUID of the instance to manage if known, this is VMware's unique identifier.

+

This is required if name or moid is not supplied.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -304,6 +294,7 @@ Examples .. code-block:: yaml + - name: Gather VMware tools info installed in VM specified by uuid community.vmware.vmware_guest_tools_info: hostname: "{{ vcenter_hostname }}" @@ -326,44 +317,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- vmtools_info - -
- dictionary -
-
always -
metadata about the VMware tools installed in virtual machine
-
-
Sample:
-
{'vm_uuid': None, 'vm_moid': None, 'vm_use_instance_uuid': False, 'vm_guest_fullname': 'Microsoft Windows 10 (64-bit)', 'vm_guest_hostname': 'test', 'vm_guest_id': 'windows9_64Guest', 'vm_hw_version': 'vmx-14', 'vm_ipaddress': '10.10.10.10', 'vm_name': 'test_vm', 'vm_tools_install_status': 'toolsOk', 'vm_tools_install_type': 'guestToolsTypeMSI', 'vm_tools_last_install_count': 0, 'vm_tools_running_status': 'guestToolsRunning', 'vm_tools_upgrade_policy': 'manual', 'vm_tools_version': 10341, 'vm_tools_version_status': 'guestToolsCurrent'}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

vmtools_info

+ +

+ dictionary +

+
+

metadata about the VMware tools installed in virtual machine

+

Returned: always

+

Sample: {"vm_guest_fullname": "Microsoft Windows 10 (64-bit)", "vm_guest_hostname": "test", "vm_guest_id": "windows9_64Guest", "vm_hw_version": "vmx-14", "vm_ipaddress": "10.10.10.10", "vm_moid": null, "vm_name": "test_vm", "vm_tools_install_status": "toolsOk", "vm_tools_install_type": "guestToolsTypeMSI", "vm_tools_last_install_count": 0, "vm_tools_running_status": "guestToolsRunning", "vm_tools_upgrade_policy": "manual", "vm_tools_version": 10341, "vm_tools_version_status": "guestToolsCurrent", "vm_use_instance_uuid": false, "vm_uuid": null}

+
+ + Authors ~~~~~~~ -- Diane Wang (@Tomorrow9) +- Diane Wang (@Tomorrow9) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_guest_tools_upgrade_module.rst b/docs/community.vmware.vmware_guest_tools_upgrade_module.rst index 08e3cd52a..d323a68ca 100644 --- a/docs/community.vmware.vmware_guest_tools_upgrade_module.rst +++ b/docs/community.vmware.vmware_guest_tools_upgrade_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_guest_tools_upgrade_module: -******************************************* -community.vmware.vmware_guest_tools_upgrade -******************************************* +community.vmware.vmware_guest_tools_upgrade module -- Module to upgrade VMTools ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Module to upgrade VMTools** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_guest_tools_upgrade`. .. contents:: @@ -16,292 +17,281 @@ community.vmware.vmware_guest_tools_upgrade Synopsis -------- + - This module upgrades the VMware Tools on Windows and Linux guests and reboots them. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- datacenter - -
- string - / required -
-
- -
Destination datacenter where the virtual machine exists.
-
-
- folder - -
- string -
-
- -
Destination folder, absolute or relative path to find an existing guest.
-
This is required, if name is supplied.
-
The folder should include the datacenter. ESX's datacenter is ha-datacenter
-
Examples:
-
folder: /ha-datacenter/vm
-
folder: ha-datacenter/vm
-
folder: /datacenter1/vm
-
folder: datacenter1/vm
-
folder: /datacenter1/vm/folder1
-
folder: datacenter1/vm/folder1
-
folder: /folder1/datacenter1/vm
-
folder: folder1/datacenter1/vm
-
folder: /folder1/datacenter1/vm/folder2
-
-
- force_upgrade - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
This flag overrides the guest operating system detection and forcibly upgrade VMware tools or open-vm-tools.
-
This is useful when VMware tools is too old and unable to detect the 'guestFamily' value.
-
Using this flag may sometime give unexpected results since module will override the default
-
behaviour of 'guestFamily' detection.
-
-
- 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 work with.
-
This is required if uuid or moid 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.
-
-
- 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 unique identifier.
-
This is required if 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

datacenter

+ +

+ string + / required +

+
+

Destination datacenter where the virtual machine exists.

+
+
+

folder

+ +

+ string +

+
+

Destination folder, absolute or relative path to find an existing guest.

+

This is required, if name is supplied.

+

The folder should include the datacenter. ESX's datacenter is ha-datacenter

+

Examples:

+

folder: /ha-datacenter/vm

+

folder: ha-datacenter/vm

+

folder: /datacenter1/vm

+

folder: datacenter1/vm

+

folder: /datacenter1/vm/folder1

+

folder: datacenter1/vm/folder1

+

folder: /folder1/datacenter1/vm

+

folder: folder1/datacenter1/vm

+

folder: /folder1/datacenter1/vm/folder2

+
+
+

force_upgrade

+ +

+ boolean +

+
+

This flag overrides the guest operating system detection and forcibly upgrade VMware tools or open-vm-tools.

+

This is useful when VMware tools is too old and unable to detect the 'guestFamily' value.

+

Using this flag may sometime give unexpected results since module will override the default

+

behaviour of 'guestFamily' detection.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

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 work with.

+

This is required if uuid or moid is not supplied.

+
+
+

name_match

+ +

+ string +

+
+

If multiple virtual machines matching the name, use the first or last found.

+

Choices:

+
    +
  • "first" ← (default)

  • +
  • "last"

  • +
+ +
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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

+ +

aliases: admin, user

+

+ 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.

+
+
+

uuid

+ +

+ string +

+
+

UUID of the instance to manage if known, this is VMware's unique identifier.

+

This is required if name or moid is not supplied.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - In order to upgrade VMTools, please power on virtual machine before hand - either 'manually' or using module :ref:`community.vmware.vmware_guest_powerstate `. - - All modules requires API write access and hence is not supported on a free ESXi license. - +- In order to upgrade VMTools, please power on virtual machine before hand - either 'manually' or using module \ `community.vmware.vmware\_guest\_powerstate `__\ . +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -309,6 +299,7 @@ Examples .. code-block:: yaml + - name: Get VM UUID vmware_guest_facts: hostname: "{{ vcenter_hostname }}" @@ -341,11 +332,20 @@ Examples -Status ------- + Authors ~~~~~~~ -- Mike Klebolt (@MikeKlebolt) +- Mike Klebolt (@MikeKlebolt) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_guest_tools_wait_module.rst b/docs/community.vmware.vmware_guest_tools_wait_module.rst index 7913fb0ec..7b7c07487 100644 --- a/docs/community.vmware.vmware_guest_tools_wait_module.rst +++ b/docs/community.vmware.vmware_guest_tools_wait_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_guest_tools_wait_module: -**************************************** -community.vmware.vmware_guest_tools_wait -**************************************** +community.vmware.vmware_guest_tools_wait module -- Wait for VMware tools to become available +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Wait for VMware tools to become available** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_guest_tools_wait`. .. contents:: @@ -16,304 +17,291 @@ community.vmware.vmware_guest_tools_wait Synopsis -------- + - This module can be used to wait for VMware tools to become available on the given VM and return facts. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- datacenter - -
- string -
-
- -
Name of the datacenter.
-
The datacenter to search for a virtual machine.
-
-
- folder - -
- string -
-
- -
Destination folder, absolute or relative path to find an existing guest.
-
This is required only, if multiple VMs with same name is found.
-
The folder should include the datacenter. ESX's datacenter is ha-datacenter.
-
Examples:
-
folder: /ha-datacenter/vm
-
folder: ha-datacenter/vm
-
folder: /datacenter1/vm
-
folder: datacenter1/vm
-
folder: /datacenter1/vm/folder1
-
folder: datacenter1/vm/folder1
-
folder: /folder1/datacenter1/vm
-
folder: folder1/datacenter1/vm
-
folder: /folder1/datacenter1/vm/folder2
-
-
- 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 for which to wait until the tools become available.
-
This is required if uuid or moid is not supplied.
-
-
- name_match - -
- string -
-
-
    Choices: -
  • first ←
  • -
  • last
  • -
-
-
If multiple VMs match 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.
-
-
- timeout - -
- integer -
-
- Default:
500
-
-
Max duration of the waiting period (seconds).
-
-
- 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 for which to wait until the tools become available, if known. This is VMware's unique identifier.
-
This is required, if name or moid is not supplied.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

datacenter

+ +

+ string +

+
+

Name of the datacenter.

+

The datacenter to search for a virtual machine.

+
+
+

folder

+ +

+ string +

+
+

Destination folder, absolute or relative path to find an existing guest.

+

This is required only, if multiple VMs with same name is found.

+

The folder should include the datacenter. ESX's datacenter is ha-datacenter.

+

Examples:

+

folder: /ha-datacenter/vm

+

folder: ha-datacenter/vm

+

folder: /datacenter1/vm

+

folder: datacenter1/vm

+

folder: /datacenter1/vm/folder1

+

folder: datacenter1/vm/folder1

+

folder: /folder1/datacenter1/vm

+

folder: folder1/datacenter1/vm

+

folder: /folder1/datacenter1/vm/folder2

+
+
+

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 for which to wait until the tools become available.

+

This is required if uuid or moid is not supplied.

+
+
+

name_match

+ +

+ string +

+
+

If multiple VMs match the name, use the first or last found.

+

Choices:

+
    +
  • "first" ← (default)

  • +
  • "last"

  • +
+ +
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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.

+
+
+

timeout

+ +

+ integer +

+
+

Max duration of the waiting period (seconds).

+

Default: 500

+
+
+

use_instance_uuid

+ +

+ boolean +

+
+

Whether to use the VMware instance UUID rather than the BIOS UUID.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

uuid

+ +

+ string +

+
+

UUID of the VM for which to wait until the tools become available, if known. This is VMware's unique identifier.

+

This is required, if name or moid is not supplied.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -321,6 +309,7 @@ Examples .. code-block:: yaml + - name: Wait for VMware tools to become available by UUID vmware_guest_facts: hostname: "{{ vcenter_hostname }}" @@ -364,44 +353,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- instance - -
- dictionary -
-
always -
metadata about the virtual machine
-
-
Sample:
-
None
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

instance

+ +

+ dictionary +

+
+

metadata about the virtual machine

+

Returned: always

+

Sample: "None"

+
+ + Authors ~~~~~~~ -- Philippe Dellaert (@pdellaert) +- Philippe Dellaert (@pdellaert) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_guest_tpm_module.rst b/docs/community.vmware.vmware_guest_tpm_module.rst index c3adf83bd..f1479fdcb 100644 --- a/docs/community.vmware.vmware_guest_tpm_module.rst +++ b/docs/community.vmware.vmware_guest_tpm_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_guest_tpm_module: -********************************* -community.vmware.vmware_guest_tpm -********************************* +community.vmware.vmware_guest_tpm module -- Add or remove vTPM device for specified VM. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Add or remove vTPM device for specified VM.** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_guest_tpm`. .. contents:: @@ -16,273 +17,262 @@ community.vmware.vmware_guest_tpm Synopsis -------- + - This module is used for adding or removing Virtual Trusted Platform Module(vTPM) device for an existing Virtual Machine. You must create a key provider on vCenter before you can add a vTPM. The ESXi hosts running in your environment must be ESXi 6.7 or later (Windows guest OS), or 7.0 Update 2 (Linux guest OS). + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- datacenter - -
- string - / required -
-
- -
The vCenter datacenter name used to get specified cluster or host.
-
This parameter is case sensitive.
-
-
- folder - -
- string -
-
- -
VM folder, absolute or relative path to find an existing VM.
-
This parameter is not required, only when multiple VMs are found with the same name.
-
The folder should include the datacenter name.
-
Examples:
-
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.
-
This is required 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 ←
  • -
  • absent
  • -
-
-
State of vTPM device.
-
If set to 'absent', vTPM device will be removed from VM.
-
If set to 'present', vTPM device will be added if not present.
-
Virtual machine should be turned off before add or remove vTPM device.
-
Virtual machine should not contain snapshots before add vTPM device.
-
-
- 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 unique identifier.
-
This is required 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

datacenter

+ +

+ string + / required +

+
+

The vCenter datacenter name used to get specified cluster or host.

+

This parameter is case sensitive.

+
+
+

folder

+ +

+ string +

+
+

VM folder, absolute or relative path to find an existing VM.

+

This parameter is not required, only when multiple VMs are found with the same name.

+

The folder should include the datacenter name.

+

Examples:

+

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.

+

This is required if parameter uuid or moid is not supplied.

+
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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 +

+
+

State of vTPM device.

+

If set to 'absent', vTPM device will be removed from VM.

+

If set to 'present', vTPM device will be added if not present.

+

Virtual machine should be turned off before add or remove vTPM device.

+

Virtual machine should not contain snapshots before add vTPM device.

+

Choices:

+
    +
  • "present" ← (default)

  • +
  • "absent"

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

uuid

+ +

+ string +

+
+

UUID of the instance to manage if known, this is VMware's unique identifier.

+

This is required if parameter name or moid is not supplied.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -290,6 +280,7 @@ Examples .. code-block:: yaml + - name: Add vTPM to specified VM community.vmware.vmware_guest_tpm: hostname: "{{ vcenter_hostname }}" @@ -312,44 +303,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- instance - -
- dictionary -
-
always -
metadata about the VM vTPM device
-
-
Sample:
-
None
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

instance

+ +

+ dictionary +

+
+

metadata about the VM vTPM device

+

Returned: always

+

Sample: "None"

+
+ + Authors ~~~~~~~ -- Diane Wang (@Tomorrow9) +- Diane Wang (@Tomorrow9) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_guest_vgpu_info_module.rst b/docs/community.vmware.vmware_guest_vgpu_info_module.rst index 8760ebca6..572b2ef32 100644 --- a/docs/community.vmware.vmware_guest_vgpu_info_module.rst +++ b/docs/community.vmware.vmware_guest_vgpu_info_module.rst @@ -1,14 +1,15 @@ -.. _community.vmware.vmware_guest_vgpu_info_module: -*************************************** -community.vmware.vmware_guest_vgpu_info -*************************************** +community.vmware.vmware_guest_vgpu_info module -- Gather information about vGPU profiles of the specified virtual machine in the given vCenter infrastructure ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Gather information about vGPU profiles of the specified virtual machine in the given vCenter infrastructure** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. -Version added: 3.3.0 +To use it in a playbook, specify: :code:`community.vmware.vmware_guest_vgpu_info`. + +New in community.vmware 3.3.0 .. contents:: :local: @@ -17,271 +18,260 @@ Version added: 3.3.0 Synopsis -------- + - This module is used to gather metadata about vGPU profiles of the given virtual machine. - All parameters and VMware object names are case sensitive. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- datacenter - -
- string -
-
- Default:
"ha-datacenter"
-
-
The datacenter name to which virtual machine belongs to.
-
This parameter is case sensitive.
-
-
- 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. ESXi server's datacenter is ha-datacenter.
-
Examples:
-
folder: /ha-datacenter/vm
-
folder: ha-datacenter/vm
-
folder: /datacenter1/vm
-
folder: datacenter1/vm
-
folder: /datacenter1/vm/folder1
-
folder: datacenter1/vm/folder1
-
folder: /folder1/datacenter1/vm
-
folder: folder1/datacenter1/vm
-
folder: /folder1/datacenter1/vm/folder2
-
-
- 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.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

datacenter

+ +

+ string +

+
+

The datacenter name to which virtual machine belongs to.

+

This parameter is case sensitive.

+

Default: "ha-datacenter"

+
+
+

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. ESXi server's datacenter is ha-datacenter.

+

Examples:

+

folder: /ha-datacenter/vm

+

folder: ha-datacenter/vm

+

folder: /datacenter1/vm

+

folder: datacenter1/vm

+

folder: /datacenter1/vm/folder1

+

folder: datacenter1/vm/folder1

+

folder: /folder1/datacenter1/vm

+

folder: folder1/datacenter1/vm

+

folder: /folder1/datacenter1/vm/folder2

+
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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 +

+
+

Whether to use the VMware instance UUID rather than the BIOS UUID.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

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 +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -289,6 +279,7 @@ Examples .. code-block:: yaml + - name: Gather information about vGPU profiles of a VM community.vmware.vmware_guest_vgpu_info: hostname: "{{ vcenter_hostname }}" @@ -302,44 +293,56 @@ Examples + + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- vgpu_info - -
- list -
-
always -
metadata about the virtual machine's vGPU profiles
-
-
Sample:
-
{'vgpu': [{'Controller_Key': 100, 'Key': 13000, 'Label': 'PCI device 0', 'Summary': 'NVIDIA GRID vGPU grid_m10-8q', 'Unit_Number': 18, 'Vgpu': 'grid_m10-8q'}]}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

vgpu_info

+ +

+ list + / elements=string +

+
+

metadata about the virtual machine's vGPU profiles

+

Returned: always

+

Sample: {"vgpu": [{"Controller_Key": 100, "Key": 13000, "Label": "PCI device 0", "Summary": "NVIDIA GRID vGPU grid_m10-8q", "Unit_Number": 18, "Vgpu": "grid_m10-8q"}]}

+
+ + Authors ~~~~~~~ - Jared Priddy (@jdptechnc) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_guest_vgpu_module.rst b/docs/community.vmware.vmware_guest_vgpu_module.rst index 0e252ec62..02ec86644 100644 --- a/docs/community.vmware.vmware_guest_vgpu_module.rst +++ b/docs/community.vmware.vmware_guest_vgpu_module.rst @@ -1,14 +1,15 @@ -.. _community.vmware.vmware_guest_vgpu_module: -********************************** -community.vmware.vmware_guest_vgpu -********************************** +community.vmware.vmware_guest_vgpu module -- Modify vGPU video card profile of the specified virtual machine in the given vCenter infrastructure +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Modify vGPU video card profile of the specified virtual machine in the given vCenter infrastructure** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. -Version added: 2.5.0 +To use it in a playbook, specify: :code:`community.vmware.vmware_guest_vgpu`. + +New in community.vmware 2.5.0 .. contents:: :local: @@ -17,9 +18,14 @@ Version added: 2.5.0 Synopsis -------- + - This module is used to reconfigure vGPU card profile of the given virtual machine. - All parameters and VMware object names are case sensitive. -- VM must be power off :ref:`community.vmware.vmware_guest_powerstate ` module can perform that task. +- VM must be power off \ `community.vmware.vmware\_guest\_powerstate `__\ module can perform that task. + + + + @@ -29,345 +35,323 @@ Parameters .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- cluster - -
- string -
-
- -
The cluster name where the virtual machine is running.
-
-
- datacenter - -
- string -
-
- Default:
"ha-datacenter"
-
-
The datacenter name to which virtual machine belongs to.
-
This parameter is case sensitive.
-
-
- esxi_hostname - -
- string -
-
- -
The ESXi hostname where the virtual machine is running.
-
-
- 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. ESXi server's datacenter is ha-datacenter.
-
Examples:
-
folder: /ha-datacenter/vm
-
folder: ha-datacenter/vm
-
folder: /datacenter1/vm
-
folder: datacenter1/vm
-
folder: /datacenter1/vm/folder1
-
folder: datacenter1/vm/folder1
-
folder: /folder1/datacenter1/vm
-
folder: folder1/datacenter1/vm
-
folder: /folder1/datacenter1/vm/folder2
-
-
- force - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Force operation.
-
-
- 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.
-
-
- state - -
- string -
-
-
    Choices: -
  • present ←
  • -
  • absent
  • -
-
-
vGPU profile state.
-
When state=present, the selected vGPU profile will be added if the VM hosted ESXi host NVIDIA GPU offer it.
-
When state=absent, the selected vGPU profile gets removed from the VM.
-
-
- 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.
-
-
- vgpu - -
- string -
-
- -
A supported vGPU profile depending on the GPU model. Required for any operation.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

cluster

+ +

+ string +

+
+

The cluster name where the virtual machine is running.

+
+
+

datacenter

+ +

+ string +

+
+

The datacenter name to which virtual machine belongs to.

+

This parameter is case sensitive.

+

Default: "ha-datacenter"

+
+
+

esxi_hostname

+ +

+ string +

+
+

The ESXi hostname where the virtual machine is running.

+
+
+

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. ESXi server's datacenter is ha-datacenter.

+

Examples:

+

folder: /ha-datacenter/vm

+

folder: ha-datacenter/vm

+

folder: /datacenter1/vm

+

folder: datacenter1/vm

+

folder: /datacenter1/vm/folder1

+

folder: datacenter1/vm/folder1

+

folder: /folder1/datacenter1/vm

+

folder: folder1/datacenter1/vm

+

folder: /folder1/datacenter1/vm/folder2

+
+
+

force

+ +

+ boolean +

+
+

Force operation.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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 +

+
+

vGPU profile state.

+

When state=present, the selected vGPU profile will be added if the VM hosted ESXi host NVIDIA GPU offer it.

+

When state=absent, the selected vGPU profile gets removed from the VM.

+

Choices:

+
    +
  • "present" ← (default)

  • +
  • "absent"

  • +
+ +
+
+

use_instance_uuid

+ +

+ boolean +

+
+

Whether to use the VMware instance UUID rather than the BIOS UUID.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

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 +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

vgpu

+ +

+ string +

+
+

A supported vGPU profile depending on the GPU model. Required for any operation.

+
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -375,6 +359,7 @@ Examples .. code-block:: yaml + - name: Add vGPU profile to VM community.vmware.vmware_guest_vgpu: hostname: "{{ vcenter_hostname }}" @@ -403,41 +388,41 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- vgpu_info - -
- dictionary -
-
always -
metadata about the virtual machine's vGPU profile
-
-
Sample:
-
{'vgpu': {'Controller_Key': 100, 'Key': 13000, 'Label': 'PCI device 0', 'Summary': 'NVIDIA GRID vGPU grid_m10-8q', 'Unit_Number': 18, 'Vgpu': 'grid_m10-8q'}}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

vgpu_info

+ +

+ dictionary +

+
+

metadata about the virtual machine's vGPU profile

+

Returned: always

+

Sample: {"vgpu": {"Controller_Key": 100, "Key": 13000, "Label": "PCI device 0", "Summary": "NVIDIA GRID vGPU grid_m10-8q", "Unit_Number": 18, "Vgpu": "grid_m10-8q"}}

+
+ + Authors @@ -445,3 +430,13 @@ Authors - Mohamed Alibi (@Medalibi) - Unknown (@matancarmeli7) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_guest_video_module.rst b/docs/community.vmware.vmware_guest_video_module.rst index 4ebcea220..37daa28ca 100644 --- a/docs/community.vmware.vmware_guest_video_module.rst +++ b/docs/community.vmware.vmware_guest_video_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_guest_video_module: -*********************************** -community.vmware.vmware_guest_video -*********************************** +community.vmware.vmware_guest_video module -- Modify video card configurations of specified virtual machine in given vCenter infrastructure ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Modify video card configurations of specified virtual machine in given vCenter infrastructure** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_guest_video`. .. contents:: @@ -16,379 +17,362 @@ community.vmware.vmware_guest_video Synopsis -------- + - This module is used to reconfigure video card settings of given virtual machine. - All parameters and VMware object names are case sensitive. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- datacenter - -
- string -
-
- Default:
"ha-datacenter"
-
-
The datacenter name to which virtual machine belongs to.
-
This parameter is case sensitive.
-
-
- display_number - -
- integer -
-
- -
The number of display. Valid value from 1 to 10. The maximum display number is 4 on vCenter 6.0, 6.5 web UI.
-
-
- enable_3D - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Enable 3D for guest operating systems on which VMware supports 3D.
-
-
- 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. ESXi server's datacenter is ha-datacenter.
-
Examples:
-
folder: /ha-datacenter/vm
-
folder: ha-datacenter/vm
-
folder: /datacenter1/vm
-
folder: datacenter1/vm
-
folder: /datacenter1/vm/folder1
-
folder: datacenter1/vm/folder1
-
folder: /folder1/datacenter1/vm
-
folder: folder1/datacenter1/vm
-
folder: /folder1/datacenter1/vm/folder2
-
-
- gather_video_facts - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
If set to true, return settings of the video card, other attributes are ignored.
-
If set to false, will do reconfiguration and return video card settings.
-
-
- 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.
-
-
- memory_3D_mb - -
- integer -
-
- -
The value of 3D Memory must be power of 2 and valid value is from 32 MB to 2048 MB.
-
-
- 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.
-
-
- renderer_3D - -
- string -
-
-
    Choices: -
  • automatic
  • -
  • software
  • -
  • hardware
  • -
-
-
If set to automatic, selects the appropriate option (software or hardware) for this virtual machine automatically.
-
If set to software, uses normal CPU processing for 3D calculations.
-
If set to hardware, requires graphics hardware (GPU) for faster 3D calculations.
-
-
- use_auto_detect - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
If set to true, applies common video settings to the guest operating system, attributes display_number and video_memory_mb are ignored.
-
If set to false, the number of display and the total video memory will be reconfigured using display_number and video_memory_mb.
-
-
- 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.
-
-
- video_memory_mb - -
- float -
-
- -
Valid total MB of video memory range of virtual machine is from 1.172 MB to 256 MB on ESXi 6.7U1, from 1.172 MB to 128 MB on ESXi 6.7 and previous versions.
-
For specific guest OS, supported minimum and maximum video memory are different, please be careful on setting this.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

datacenter

+ +

+ string +

+
+

The datacenter name to which virtual machine belongs to.

+

This parameter is case sensitive.

+

Default: "ha-datacenter"

+
+
+

display_number

+ +

+ integer +

+
+

The number of display. Valid value from 1 to 10. The maximum display number is 4 on vCenter 6.0, 6.5 web UI.

+
+
+

enable_3D

+ +

+ boolean +

+
+

Enable 3D for guest operating systems on which VMware supports 3D.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+ +
+
+

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. ESXi server's datacenter is ha-datacenter.

+

Examples:

+

folder: /ha-datacenter/vm

+

folder: ha-datacenter/vm

+

folder: /datacenter1/vm

+

folder: datacenter1/vm

+

folder: /datacenter1/vm/folder1

+

folder: datacenter1/vm/folder1

+

folder: /folder1/datacenter1/vm

+

folder: folder1/datacenter1/vm

+

folder: /folder1/datacenter1/vm/folder2

+
+
+

gather_video_facts

+ +

+ boolean +

+
+

If set to true, return settings of the video card, other attributes are ignored.

+

If set to false, will do reconfiguration and return video card settings.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

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.

+
+
+

memory_3D_mb

+ +

+ integer +

+
+

The value of 3D Memory must be power of 2 and valid value is from 32 MB to 2048 MB.

+
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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.

+
+
+

renderer_3D

+ +

+ string +

+
+

If set to automatic, selects the appropriate option (software or hardware) for this virtual machine automatically.

+

If set to software, uses normal CPU processing for 3D calculations.

+

If set to hardware, requires graphics hardware (GPU) for faster 3D calculations.

+

Choices:

+
    +
  • "automatic"

  • +
  • "software"

  • +
  • "hardware"

  • +
+ +
+
+

use_auto_detect

+ +

+ boolean +

+
+

If set to true, applies common video settings to the guest operating system, attributes display_number and video_memory_mb are ignored.

+

If set to false, the number of display and the total video memory will be reconfigured using display_number and video_memory_mb.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

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 +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

video_memory_mb

+ +

+ float +

+
+

Valid total MB of video memory range of virtual machine is from 1.172 MB to 256 MB on ESXi 6.7U1, from 1.172 MB to 128 MB on ESXi 6.7 and previous versions.

+

For specific guest OS, supported minimum and maximum video memory are different, please be careful on setting this.

+
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -396,6 +380,7 @@ Examples .. code-block:: yaml + - name: Change video card settings of virtual machine community.vmware.vmware_guest_video: hostname: "{{ vcenter_hostname }}" @@ -443,44 +428,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- video_status - -
- dictionary -
-
always -
metadata about the virtual machine's video card after managing them
-
-
Sample:
-
{'auto_detect': False, 'display_number': 2, 'enable_3D_support': True, 'memory_3D': 524288, 'renderer_3D': 'automatic', 'video_memory': 8192}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

video_status

+ +

+ dictionary +

+
+

metadata about the virtual machine's video card after managing them

+

Returned: always

+

Sample: {"auto_detect": false, "display_number": 2, "enable_3D_support": true, "memory_3D": 524288, "renderer_3D": "automatic", "video_memory": 8192}

+
+ + Authors ~~~~~~~ -- Diane Wang (@Tomorrow9) +- Diane Wang (@Tomorrow9) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_host_acceptance_module.rst b/docs/community.vmware.vmware_host_acceptance_module.rst index 8766c25e5..3e0a785e2 100644 --- a/docs/community.vmware.vmware_host_acceptance_module.rst +++ b/docs/community.vmware.vmware_host_acceptance_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_host_acceptance_module: -*************************************** -community.vmware.vmware_host_acceptance -*************************************** +community.vmware.vmware_host_acceptance module -- Manage the host acceptance level of an ESXi host +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Manage the host acceptance level of an ESXi host** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_host_acceptance`. .. contents:: @@ -16,240 +17,235 @@ community.vmware.vmware_host_acceptance Synopsis -------- + - This module can be used to manage the host acceptance level of an ESXi host. - The host acceptance level controls the acceptance level of each VIB on a ESXi host. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- acceptance_level - -
- string -
-
-
    Choices: -
  • community
  • -
  • partner
  • -
  • vmware_accepted
  • -
  • vmware_certified
  • -
-
-
Name of acceptance level.
-
If set to partner, then accept only partner and VMware signed and certified VIBs.
-
If set to vmware_certified, then accept only VIBs that are signed and certified by VMware.
-
If set to vmware_accepted, then accept VIBs that have been accepted by VMware.
-
If set to community, then accept all VIBs, even those that are not signed.
-
-
- cluster_name - -
- string -
-
- -
Name of the cluster.
-
Acceptance level of all ESXi host system in the given cluster will be managed.
-
If esxi_hostname is not given, this parameter is required.
-
-
- esxi_hostname - -
- string -
-
- -
ESXi hostname.
-
Acceptance level of this ESXi host system will be managed.
-
If cluster_name is not given, this parameter is required.
-
-
- 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: -
  • list ←
  • -
  • present
  • -
-
-
Set or list acceptance level of the given ESXi host.
-
If set to list, then will return current acceptance level of given host system/s.
-
If set to present, then will set given acceptance level.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

acceptance_level

+ +

+ string +

+
+

Name of acceptance level.

+

If set to partner, then accept only partner and VMware signed and certified VIBs.

+

If set to vmware_certified, then accept only VIBs that are signed and certified by VMware.

+

If set to vmware_accepted, then accept VIBs that have been accepted by VMware.

+

If set to community, then accept all VIBs, even those that are not signed.

+

Choices:

+
    +
  • "community"

  • +
  • "partner"

  • +
  • "vmware_accepted"

  • +
  • "vmware_certified"

  • +
+ +
+
+

cluster_name

+ +

+ string +

+
+

Name of the cluster.

+

Acceptance level of all ESXi host system in the given cluster will be managed.

+

If esxi_hostname is not given, this parameter is required.

+
+
+

esxi_hostname

+ +

+ string +

+
+

ESXi hostname.

+

Acceptance level of this ESXi host system will be managed.

+

If cluster_name is not given, this parameter is required.

+
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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 +

+
+

Set or list acceptance level of the given ESXi host.

+

If set to list, then will return current acceptance level of given host system/s.

+

If set to present, then will set given acceptance level.

+

Choices:

+
    +
  • "list" ← (default)

  • +
  • "present"

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -257,6 +253,7 @@ Examples .. code-block:: yaml + - name: Set acceptance level to community for all ESXi Host in given Cluster community.vmware.vmware_host_acceptance: hostname: '{{ vcenter_hostname }}' @@ -291,44 +288,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- facts - -
- dictionary -
-
facts -
dict with hostname as key and dict with acceptance level facts, error as value
-
-
Sample:
-
{'facts': {'localhost.localdomain': {'error': 'NA', 'level': 'vmware_certified'}}}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

facts

+ +

+ dictionary +

+
+

dict with hostname as key and dict with acceptance level facts, error as value

+

Returned: facts

+

Sample: {"facts": {"localhost.localdomain": {"error": "NA", "level": "vmware_certified"}}}

+
+ + Authors ~~~~~~~ - Abhijeet Kasurde (@Akasurde) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_host_active_directory_module.rst b/docs/community.vmware.vmware_host_active_directory_module.rst index e312114cb..55ee4017e 100644 --- a/docs/community.vmware.vmware_host_active_directory_module.rst +++ b/docs/community.vmware.vmware_host_active_directory_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_host_active_directory_module: -********************************************* -community.vmware.vmware_host_active_directory -********************************************* +community.vmware.vmware_host_active_directory module -- Joins an ESXi host system to an Active Directory domain or leaves it +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Joins an ESXi host system to an Active Directory domain or leaves it** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_host_active_directory`. .. contents:: @@ -16,260 +17,252 @@ community.vmware.vmware_host_active_directory Synopsis -------- + - This module can be used to join or leave an ESXi host to or from an Active Directory domain. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- ad_domain - -
- string -
-
- Default:
""
-
-
AD Domain to join.
-

aliases: domain, domain_name
-
-
- ad_password - -
- string -
-
- Default:
""
-
-
Password for AD domain join.
-
-
- ad_state - -
- string -
-
-
    Choices: -
  • present
  • -
  • absent ←
  • -
-
-
Whether the ESXi host is joined to an AD domain or not.
-

aliases: state
-
-
- ad_user - -
- string -
-
- Default:
""
-
-
Username for AD domain join.
-
-
- cluster_name - -
- string -
-
- -
Name of the cluster from which all host systems will be used.
-
This parameter is required if esxi_hostname is not specified.
-
-
- esxi_hostname - -
- string -
-
- -
Name of the host system to work with.
-
This parameter is required if cluster_name is not specified.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+
+
+

ad_domain

+ +

aliases: domain, domain_name

+

+ string +

+
+

AD Domain to join.

+

Default: ""

+
+
+

ad_password

+ +

+ string +

+
+

Password for AD domain join.

+

Default: ""

+
+
+
+

ad_state

+ +

aliases: state

+

+ string +

+
+

Whether the ESXi host is joined to an AD domain or not.

+

Choices:

+
    +
  • "present"

  • +
  • "absent" ← (default)

  • +
+ +
+
+

ad_user

+ +

+ string +

+
+

Username for AD domain join.

+

Default: ""

+
+
+

cluster_name

+ +

+ string +

+
+

Name of the cluster from which all host systems will be used.

+

This parameter is required if esxi_hostname is not specified.

+
+
+

esxi_hostname

+ +

+ string +

+
+

Name of the host system to work with.

+

This parameter is required if cluster_name is not specified.

+
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -277,6 +270,7 @@ Examples .. code-block:: yaml + - name: Join an AD domain community.vmware.vmware_host_active_directory: hostname: '{{ vcenter_hostname }}' @@ -300,44 +294,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- results - -
- dictionary -
-
always -
metadata about host system's AD domain join state
-
-
Sample:
-
{'esxi01': {'changed': True, 'domain': 'example.local', 'membership_state': 'ok', 'msg': 'Host joined to AD domain', 'ad_state': 'present', 'ad_state_current': 'present', 'ad_state_previous': 'absent'}}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

results

+ +

+ dictionary +

+
+

metadata about host system's AD domain join state

+

Returned: always

+

Sample: {"esxi01": {"ad_state": "present", "ad_state_current": "present", "ad_state_previous": "absent", "changed": true, "domain": "example.local", "membership_state": "ok", "msg": "Host joined to AD domain"}}

+
+ + Authors ~~~~~~~ - Christian Kotte (@ckotte) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_host_auto_start_module.rst b/docs/community.vmware.vmware_host_auto_start_module.rst index cb44f4a62..b5b5df594 100644 --- a/docs/community.vmware.vmware_host_auto_start_module.rst +++ b/docs/community.vmware.vmware_host_auto_start_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_host_auto_start_module: -*************************************** -community.vmware.vmware_host_auto_start -*************************************** +community.vmware.vmware_host_auto_start module -- Manage the auto power ON or OFF for vm on ESXi host ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Manage the auto power ON or OFF for vm on ESXi host** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_host_auto_start`. .. contents:: @@ -16,491 +17,468 @@ community.vmware.vmware_host_auto_start Synopsis -------- + - In this module, can set up automatic startup and shutdown of virtual machines according to host startup or shutdown. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- esxi_hostname - -
- string - / required -
-
- -
ESXi hostname where the VM to set auto power on or off exists.
-
-
- 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 -
-
- -
VM name to set auto power on or off.
-
This is not necessary if change only system default VM settings for autoStart config.
-
-
- 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.
-
-
- power_info - -
- dictionary -
-
- Default:
{"start_action": "none", "start_delay": -1, "start_order": -1, "stop_action": "systemDefault", "stop_delay": -1, "wait_for_heartbeat": "systemDefault"}
-
-
Startup or shutdown settings of virtual machine.
-
This setting will override the system defaults.
-
-
- start_action - -
- string -
-
-
    Choices: -
  • none ←
  • -
  • powerOn
  • -
-
-
Whether to start the virtual machine when the host startup.
-
-
- start_delay - -
- integer -
-
- Default:
-1
-
-
Auto start delay in seconds of virtual machine.
-
-
- start_order - -
- integer -
-
- Default:
-1
-
-
The autostart priority of virtual machine.
-
Virtual machines with a lower number are powered on first.
-
On host shutdown, the virtual machines are shut down in reverse order, meaning those with a higher number are powered off first.
-
-
- stop_action - -
- string -
-
-
    Choices: -
  • none
  • -
  • systemDefault ←
  • -
  • powerOff
  • -
  • suspend
  • -
-
-
Stop action executed on the virtual machine when the system stops of virtual machine.
-
-
- stop_delay - -
- integer -
-
- Default:
-1
-
-
Auto stop delay in seconds of virtual machine.
-
-
- wait_for_heartbeat - -
- string -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
  • systemDefault ←
  • -
-
-
Continue power on processing when VMware Tools started.
-
-
- 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.
-
-
- system_defaults - -
- dictionary -
-
- -
System defaults for auto-start or auto-stop config for virtual machine.
-
-
- enabled - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Enable automatically start or stop of virtual machines.
-
-
- start_delay - -
- integer -
-
- Default:
120
-
-
Default auto start delay in seconds.
-
-
- stop_action - -
- string -
-
-
    Choices: -
  • none
  • -
  • guestShutdown
  • -
  • powerOff ←
  • -
  • suspend
  • -
-
-
Default stop action executed on the virtual machine when the system stops.
-
-
- stop_delay - -
- integer -
-
- Default:
120
-
-
Default auto stop delay in seconds.
-
-
- wait_for_heartbeat - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Continue power on processing when VMware Tools started.
-
If this parameter is enabled to powers on the next virtual machine without waiting for the delay to pass.
-
However, the virtual machine must have VMware Tools installed.
-
-
- 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 -
-
- -
VM uuid to set auto power on or off, this is VMware's unique identifier.
-
This is required if name is not supplied.
-
This is not necessary if change only system default VM settings for autoStart config.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

esxi_hostname

+ +

+ string + / required +

+
+

ESXi hostname where the VM to set auto power on or off exists.

+
+
+

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 +

+
+

VM name to set auto power on or off.

+

This is not necessary if change only system default VM settings for autoStart config.

+
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

power_info

+ +

+ dictionary +

+
+

Startup or shutdown settings of virtual machine.

+

This setting will override the system defaults.

+

Default: {"start_action": "none", "start_delay": -1, "start_order": -1, "stop_action": "systemDefault", "stop_delay": -1, "wait_for_heartbeat": "systemDefault"}

+
+
+

start_action

+ +

+ string +

+
+

Whether to start the virtual machine when the host startup.

+

Choices:

+
    +
  • "none" ← (default)

  • +
  • "powerOn"

  • +
+ +
+
+

start_delay

+ +

+ integer +

+
+

Auto start delay in seconds of virtual machine.

+

Default: -1

+
+
+

start_order

+ +

+ integer +

+
+

The autostart priority of virtual machine.

+

Virtual machines with a lower number are powered on first.

+

On host shutdown, the virtual machines are shut down in reverse order, meaning those with a higher number are powered off first.

+

Default: -1

+
+
+

stop_action

+ +

+ string +

+
+

Stop action executed on the virtual machine when the system stops of virtual machine.

+

Choices:

+
    +
  • "none"

  • +
  • "systemDefault" ← (default)

  • +
  • "powerOff"

  • +
  • "suspend"

  • +
+ +
+
+

stop_delay

+ +

+ integer +

+
+

Auto stop delay in seconds of virtual machine.

+

Default: -1

+
+
+

wait_for_heartbeat

+ +

+ string +

+
+

Continue power on processing when VMware Tools started.

+

Choices:

+
    +
  • "no"

  • +
  • "yes"

  • +
  • "systemDefault" ← (default)

  • +
+ +
+
+

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.

+
+
+

system_defaults

+ +

+ dictionary +

+
+

System defaults for auto-start or auto-stop config for virtual machine.

+
+
+

enabled

+ +

+ boolean +

+
+

Enable automatically start or stop of virtual machines.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

start_delay

+ +

+ integer +

+
+

Default auto start delay in seconds.

+

Default: 120

+
+
+

stop_action

+ +

+ string +

+
+

Default stop action executed on the virtual machine when the system stops.

+

Choices:

+
    +
  • "none"

  • +
  • "guestShutdown"

  • +
  • "powerOff" ← (default)

  • +
  • "suspend"

  • +
+ +
+
+

stop_delay

+ +

+ integer +

+
+

Default auto stop delay in seconds.

+

Default: 120

+
+
+

wait_for_heartbeat

+ +

+ boolean +

+
+

Continue power on processing when VMware Tools started.

+

If this parameter is enabled to powers on the next virtual machine without waiting for the delay to pass.

+

However, the virtual machine must have VMware Tools installed.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

use_instance_uuid

+ +

+ boolean +

+
+

Whether to use the VMware instance UUID rather than the BIOS UUID.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

uuid

+ +

+ string +

+
+

VM uuid to set auto power on or off, this is VMware's unique identifier.

+

This is required if name is not supplied.

+

This is not necessary if change only system default VM settings for autoStart config.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -508,6 +486,7 @@ Examples .. code-block:: yaml + --- - name: Update for system defaults config. community.vmware.vmware_host_auto_start: @@ -536,74 +515,69 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- power_info_config - -
- dictionary -
-
changed -
Parameter return when virtual machine power info config is changed.
-
-
Sample:
-
{ - "start_action": "powerOn", - "start_delay": -1, - "start_order": -1, - "stop_action": "systemDefault", - "stop_delay": -1, - "wait_for_heartbeat": "systemDefault" - }
-
-
- system_defaults_config - -
- dictionary -
-
changed -
Parameter return when system defaults config is changed.
-
-
Sample:
-
{ - "enabled": true, - "start_delay": 120, - "stop_action": "powerOff", - "stop_delay": 120, - "wait_for_heartbeat": false - }
-
-

- - -Status ------- + + + + + + + + + + + + + + + + + +

Key

Description

+
+

power_info_config

+ +

+ dictionary +

+
+

Parameter return when virtual machine power info config is changed.

+

Returned: changed

+

Sample: {"start_action": "powerOn", "start_delay": -1, "start_order": -1, "stop_action": "systemDefault", "stop_delay": -1, "wait_for_heartbeat": "systemDefault"}

+
+
+

system_defaults_config

+ +

+ dictionary +

+
+

Parameter return when system defaults config is changed.

+

Returned: changed

+

Sample: {"enabled": true, "start_delay": 120, "stop_action": "powerOff", "stop_delay": 120, "wait_for_heartbeat": false}

+
+ + Authors ~~~~~~~ - sky-joker (@sky-joker) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_host_capability_info_module.rst b/docs/community.vmware.vmware_host_capability_info_module.rst index ba9a11b46..05fe9cf77 100644 --- a/docs/community.vmware.vmware_host_capability_info_module.rst +++ b/docs/community.vmware.vmware_host_capability_info_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_host_capability_info_module: -******************************************** -community.vmware.vmware_host_capability_info -******************************************** +community.vmware.vmware_host_capability_info module -- Gathers info about an ESXi host's capability information ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Gathers info about an ESXi host's capability information** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_host_capability_info`. .. contents:: @@ -16,191 +17,186 @@ community.vmware.vmware_host_capability_info Synopsis -------- + - This module can be used to gather information about an ESXi host's capability information when ESXi hostname or Cluster name is given. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- cluster_name - -
- string -
-
- -
Name of the cluster from all host systems to be used for information gathering.
-
If esxi_hostname is not given, this parameter is required.
-
-
- esxi_hostname - -
- string -
-
- -
ESXi hostname to gather information from.
-
If cluster_name is not given, this parameter is required.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

cluster_name

+ +

+ string +

+
+

Name of the cluster from all host systems to be used for information gathering.

+

If esxi_hostname is not given, this parameter is required.

+
+
+

esxi_hostname

+ +

+ string +

+
+

ESXi hostname to gather information from.

+

If cluster_name is not given, this parameter is required.

+
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -208,6 +204,7 @@ Examples .. code-block:: yaml + - name: Gather capability info about all ESXi Host in given Cluster community.vmware.vmware_host_capability_info: hostname: '{{ vcenter_hostname }}' @@ -228,44 +225,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- hosts_capability_info - -
- dictionary -
-
always -
metadata about host's capability info
-
-
Sample:
-
{'esxi_hostname_0001': {'accel3dSupported': False, 'backgroundSnapshotsSupported': False, 'checkpointFtCompatibilityIssues': [], 'checkpointFtSupported': False, 'cloneFromSnapshotSupported': True, 'cpuHwMmuSupported': True}}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

hosts_capability_info

+ +

+ dictionary +

+
+

metadata about host's capability info

+

Returned: always

+

Sample: {"esxi_hostname_0001": {"accel3dSupported": false, "backgroundSnapshotsSupported": false, "checkpointFtCompatibilityIssues": [], "checkpointFtSupported": false, "cloneFromSnapshotSupported": true, "cpuHwMmuSupported": true}}

+
+ + Authors ~~~~~~~ - Abhijeet Kasurde (@Akasurde) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_host_config_info_module.rst b/docs/community.vmware.vmware_host_config_info_module.rst index b7ed1f010..ea2dc30f1 100644 --- a/docs/community.vmware.vmware_host_config_info_module.rst +++ b/docs/community.vmware.vmware_host_config_info_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_host_config_info_module: -**************************************** -community.vmware.vmware_host_config_info -**************************************** +community.vmware.vmware_host_config_info module -- Gathers info about an ESXi host's advance configuration information +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Gathers info about an ESXi host's advance configuration information** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_host_config_info`. .. contents:: @@ -16,191 +17,186 @@ community.vmware.vmware_host_config_info Synopsis -------- + - This module can be used to gather information about an ESXi host's advance configuration information when ESXi hostname or Cluster name is given. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- cluster_name - -
- string -
-
- -
Name of the cluster from which the ESXi host belong to.
-
If esxi_hostname is not given, this parameter is required.
-
-
- esxi_hostname - -
- string -
-
- -
ESXi hostname to gather information from.
-
If cluster_name is not given, this parameter is required.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

cluster_name

+ +

+ string +

+
+

Name of the cluster from which the ESXi host belong to.

+

If esxi_hostname is not given, this parameter is required.

+
+
+

esxi_hostname

+ +

+ string +

+
+

ESXi hostname to gather information from.

+

If cluster_name is not given, this parameter is required.

+
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -208,6 +204,7 @@ Examples .. code-block:: yaml + - name: Gather info about all ESXi Host in given Cluster community.vmware.vmware_host_config_info: hostname: '{{ vcenter_hostname }}' @@ -226,44 +223,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- hosts_info - -
- dictionary -
-
always -
dict with hostname as key and dict with host config information
-
-
Sample:
-
{'10.76.33.226': {'Annotations.WelcomeMessage': '', 'BufferCache.FlushInterval': 30000, 'BufferCache.HardMaxDirty': 95, 'BufferCache.PerFileHardMaxDirty': 50, 'BufferCache.SoftMaxDirty': 15}}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

hosts_info

+ +

+ dictionary +

+
+

dict with hostname as key and dict with host config information

+

Returned: always

+

Sample: {"10.76.33.226": {"Annotations.WelcomeMessage": "", "BufferCache.FlushInterval": 30000, "BufferCache.HardMaxDirty": 95, "BufferCache.PerFileHardMaxDirty": 50, "BufferCache.SoftMaxDirty": 15}}

+
+ + Authors ~~~~~~~ - Abhijeet Kasurde (@Akasurde) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_host_config_manager_module.rst b/docs/community.vmware.vmware_host_config_manager_module.rst index fb47d56c6..19aeb8503 100644 --- a/docs/community.vmware.vmware_host_config_manager_module.rst +++ b/docs/community.vmware.vmware_host_config_manager_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_host_config_manager_module: -******************************************* -community.vmware.vmware_host_config_manager -******************************************* +community.vmware.vmware_host_config_manager module -- Manage advanced system settings of an ESXi host ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Manage advanced system settings of an ESXi host** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_host_config_manager`. .. contents:: @@ -16,211 +17,204 @@ community.vmware.vmware_host_config_manager Synopsis -------- + - This module can be used to manage advanced system settings of an ESXi host when ESXi hostname or Cluster name is given. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- cluster_name - -
- string -
-
- -
Name of the cluster.
-
Settings are applied to every ESXi host in given cluster.
-
If esxi_hostname is not given, this parameter is required.
-
-
- esxi_hostname - -
- string -
-
- -
ESXi hostname.
-
Settings are applied to this ESXi host.
-
If cluster_name is not given, this parameter is required.
-
-
- 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.
-
-
- options - -
- dictionary -
-
- Default:
{}
-
-
A dictionary of advanced system settings.
-
Invalid options will cause module to error.
-
Note that the list of advanced options (with description and values) can be found by running `vim-cmd hostsvc/advopt/options`.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

cluster_name

+ +

+ string +

+
+

Name of the cluster.

+

Settings are applied to every ESXi host in given cluster.

+

If esxi_hostname is not given, this parameter is required.

+
+
+

esxi_hostname

+ +

+ string +

+
+

ESXi hostname.

+

Settings are applied to this ESXi host.

+

If cluster_name is not given, this parameter is required.

+
+
+

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.

+
+
+

options

+ +

+ dictionary +

+
+

A dictionary of advanced system settings.

+

Invalid options will cause module to error.

+

Note that the list of advanced options (with description and values) can be found by running `vim-cmd hostsvc/advopt/options`.

+

Default: {}

+
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -228,6 +222,7 @@ Examples .. code-block:: yaml + - name: Manage Log level setting for all ESXi hosts in given Cluster community.vmware.vmware_host_config_manager: hostname: '{{ vcenter_hostname }}' @@ -263,11 +258,20 @@ Examples -Status ------- + Authors ~~~~~~~ - Abhijeet Kasurde (@Akasurde) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_host_custom_attributes_module.rst b/docs/community.vmware.vmware_host_custom_attributes_module.rst index ef0d60705..6a442e148 100644 --- a/docs/community.vmware.vmware_host_custom_attributes_module.rst +++ b/docs/community.vmware.vmware_host_custom_attributes_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_host_custom_attributes_module: -********************************************** -community.vmware.vmware_host_custom_attributes -********************************************** +community.vmware.vmware_host_custom_attributes module -- Manage custom attributes from VMware for the given ESXi host ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Manage custom attributes from VMware for the given ESXi host** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_host_custom_attributes`. .. contents:: @@ -16,250 +17,241 @@ community.vmware.vmware_host_custom_attributes Synopsis -------- + - This module can be used to add, remove and update custom attributes for the given ESXi host. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- attributes - -
- list - / elements=dictionary -
-
- Default:
[]
-
-
A list of name and value of custom attributes that needs to be manage.
-
Value of custom attribute is not required and will be ignored, if state is set to absent.
-
-
- name - -
- string - / required -
-
- -
Name of the attribute.
-
-
- value - -
- string -
-
- Default:
""
-
-
Value of the attribute.
-
-
- esxi_hostname - -
- string - / required -
-
- -
Name of the ESXi host to work with.
-
This is a required parameter
-
-
- 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
  • -
-
-
The action to take.
-
If set to present, then custom attribute is added or updated.
-
If set to absent, then custom attribute is removed.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

attributes

+ +

+ list + / elements=dictionary +

+
+

A list of name and value of custom attributes that needs to be manage.

+

Value of custom attribute is not required and will be ignored, if state is set to absent.

+

Default: []

+
+
+

name

+ +

+ string + / required +

+
+

Name of the attribute.

+
+
+

value

+ +

+ string +

+
+

Value of the attribute.

+

Default: ""

+
+
+

esxi_hostname

+ +

+ string + / required +

+
+

Name of the ESXi host to work with.

+

This is a required parameter

+
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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 +

+
+

The action to take.

+

If set to present, then custom attribute is added or updated.

+

If set to absent, then custom attribute is removed.

+

Choices:

+
    +
  • "present" ← (default)

  • +
  • "absent"

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -267,6 +259,7 @@ Examples .. code-block:: yaml + - name: Add ESXi host custom attributes community.vmware.vmware_host_custom_attributes: hostname: "{{ vcenter_hostname }}" @@ -294,44 +287,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- custom_attributes - -
- dictionary -
-
changed -
metadata about the ESXi host attributes
-
-
Sample:
-
{'mycustom': 'my_custom_value', 'mycustom_2': 'my_custom_value_2', 'sample_1': 'sample_1_value', 'sample_2': 'sample_2_value', 'sample_3': 'sample_3_value'}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

custom_attributes

+ +

+ dictionary +

+
+

metadata about the ESXi host attributes

+

Returned: changed

+

Sample: {"mycustom": "my_custom_value", "mycustom_2": "my_custom_value_2", "sample_1": "sample_1_value", "sample_2": "sample_2_value", "sample_3": "sample_3_value"}

+
+ + Authors ~~~~~~~ - Hunter Christain (@exp-hc) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_host_datastore_module.rst b/docs/community.vmware.vmware_host_datastore_module.rst index 7bcd1eb92..73bfa283a 100644 --- a/docs/community.vmware.vmware_host_datastore_module.rst +++ b/docs/community.vmware.vmware_host_datastore_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_host_datastore_module: -************************************** -community.vmware.vmware_host_datastore -************************************** +community.vmware.vmware_host_datastore module -- Manage a datastore on ESXi host +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Manage a datastore on ESXi host** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_host_datastore`. .. contents:: @@ -16,6 +17,7 @@ community.vmware.vmware_host_datastore Synopsis -------- + - This module can be used to mount/umount datastore on ESXi host. - This module only supports NFS (NFS v3 or NFS v4.1) and VMFS datastores. - For VMFS datastore, available device must already be connected on ESXi host. @@ -24,333 +26,319 @@ Synopsis + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- auto_expand - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Expand a datastore capacity to full if it has free capacity.
-
This parameter can't be extend using another datastore.
-
A use case example in auto_expand, it can be used to expand a datastore capacity after increasing LUN volume.
-
-
- datastore_name - -
- string - / required -
-
- -
Name of the datastore to add/remove.
-
-
- datastore_type - -
- string -
-
-
    Choices: -
  • nfs
  • -
  • nfs41
  • -
  • vmfs
  • -
-
-
Type of the datastore to configure (nfs/nfs41/vmfs).
-
-
- esxi_hostname - -
- string -
-
- -
ESXi hostname to manage the datastore.
-
Required when used with a vcenter
-
-
- 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.
-
-
- nfs_path - -
- string -
-
- -
Resource path on NFS host.
-
Required if datastore type is set to nfs/nfs41 and state is set to present, else unused.
-
-
- nfs_ro - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
ReadOnly or ReadWrite mount.
-
Unused if datastore type is not set to nfs/nfs41 and state is not set to present.
-
-
- nfs_server - -
- string -
-
- -
NFS host serving nfs datastore.
-
Required if datastore type is set to nfs/nfs41 and state is set to present, else unused.
-
Two or more servers can be defined if datastore type is set to nfs41
-
-
- 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
  • -
-
-
present: Mount datastore on host if datastore is absent else do nothing.
-
absent: Umount datastore if datastore is present else do nothing.
-
-
- 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.
-
-
- vmfs_device_name - -
- string -
-
- -
Name of the device to be used as VMFS datastore.
-
Required for VMFS datastore type and state is set to present, else unused.
-
-
- vmfs_version - -
- integer -
-
- -
VMFS version to use for datastore creation.
-
Unused if datastore type is not set to vmfs and state is not set to present.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

auto_expand

+ +

+ boolean +

+
+

Expand a datastore capacity to full if it has free capacity.

+

This parameter can't be extend using another datastore.

+

A use case example in auto_expand, it can be used to expand a datastore capacity after increasing LUN volume.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

datastore_name

+ +

+ string + / required +

+
+

Name of the datastore to add/remove.

+
+
+

datastore_type

+ +

+ string +

+
+

Type of the datastore to configure (nfs/nfs41/vmfs).

+

Choices:

+
    +
  • "nfs"

  • +
  • "nfs41"

  • +
  • "vmfs"

  • +
+ +
+
+

esxi_hostname

+ +

+ string +

+
+

ESXi hostname to manage the datastore.

+

Required when used with a vcenter

+
+
+

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.

+
+
+

nfs_path

+ +

+ string +

+
+

Resource path on NFS host.

+

Required if datastore type is set to nfs/nfs41 and state is set to present, else unused.

+
+
+

nfs_ro

+ +

+ boolean +

+
+

ReadOnly or ReadWrite mount.

+

Unused if datastore type is not set to nfs/nfs41 and state is not set to present.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

nfs_server

+ +

+ string +

+
+

NFS host serving nfs datastore.

+

Required if datastore type is set to nfs/nfs41 and state is set to present, else unused.

+

Two or more servers can be defined if datastore type is set to nfs41

+
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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 +

+
+

present: Mount datastore on host if datastore is absent else do nothing.

+

absent: Umount datastore if datastore is present else do nothing.

+

Choices:

+
    +
  • "present" ← (default)

  • +
  • "absent"

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

vmfs_device_name

+ +

+ string +

+
+

Name of the device to be used as VMFS datastore.

+

Required for VMFS datastore type and state is set to present, else unused.

+
+
+

vmfs_version

+ +

+ integer +

+
+

VMFS version to use for datastore creation.

+

Unused if datastore type is not set to vmfs and state is not set to present.

+
+ + Notes ----- -.. note:: - - Kerberos authentication with NFS v4.1 isn't implemented - - All modules requires API write access and hence is not supported on a free ESXi license. - +- Kerberos authentication with NFS v4.1 isn't implemented +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -358,6 +346,7 @@ Examples .. code-block:: yaml + - name: Mount VMFS datastores to ESXi community.vmware.vmware_host_datastore: hostname: '{{ vcenter_hostname }}' @@ -417,12 +406,21 @@ Examples -Status ------- + Authors ~~~~~~~ -- Ludovic Rivallain (@lrivallain) -- Christian Kotte (@ckotte) +- Ludovic Rivallain (@lrivallain) +- Christian Kotte (@ckotte) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_host_disk_info_module.rst b/docs/community.vmware.vmware_host_disk_info_module.rst index 496407c3c..2f11bdc4a 100644 --- a/docs/community.vmware.vmware_host_disk_info_module.rst +++ b/docs/community.vmware.vmware_host_disk_info_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_host_disk_info_module: -************************************** -community.vmware.vmware_host_disk_info -************************************** +community.vmware.vmware_host_disk_info module -- Gathers information about disks attached to given ESXi host/s. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Gathers information about disks attached to given ESXi host/s.** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_host_disk_info`. .. contents:: @@ -16,9 +17,14 @@ community.vmware.vmware_host_disk_info Synopsis -------- + - This module returns information about disks attached to given ESXi host/s -- If *cluster_name* is provided, then disk information about all hosts from the given cluster will be returned. -- If *esxi_hostname* is provided, then disk information about the given host system will be returned. +- If \ :emphasis:`cluster\_name`\ is provided, then disk information about all hosts from the given cluster will be returned. +- If \ :emphasis:`esxi\_hostname`\ is provided, then disk information about the given host system will be returned. + + + + @@ -28,181 +34,171 @@ Parameters .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- cluster_name - -
- string -
-
- -
Name of the cluster from which the ESXi host belong to.
-
If esxi_hostname is not given, this parameter is required.
-
-
- esxi_hostname - -
- string -
-
- -
ESXi hostname to gather information from.
-
If cluster_name is not given, this parameter is required.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

cluster_name

+ +

+ string +

+
+

Name of the cluster from which the ESXi host belong to.

+

If esxi_hostname is not given, this parameter is required.

+
+
+

esxi_hostname

+ +

+ string +

+
+

ESXi hostname to gather information from.

+

If cluster_name is not given, this parameter is required.

+
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -210,6 +206,7 @@ Examples .. code-block:: yaml + - name: Gather info about vmhbas of all ESXi Host in the given Cluster community.vmware.vmware_host_disk_info: hostname: '{{ vcenter_hostname }}' @@ -230,66 +227,55 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- hosts_disk_info - -
- list -
-
always -
list of information for all disks attached to each ESXi host
-
-
Sample:
-
"192.168.0.182": [ - { - "canonical_name": "naa.6000c296ed6217bd61df35622eb21a3a", - "capacity_mb": 4096, - "device_path": "/vmfs/devices/disks/naa.6000c296ed6217bd61df35622eb21a3a", - "device_type": "disk", - "device_ctd_list": [ - "vmhba0:C0:T1:L0" - ], - "disk_uid": "key-vim.host.ScsiDisk-02000000006000c296ed6217bd61df35622eb21a3a566972747561", - "display_name": "Local VMware Disk (naa.6000c296ed6217bd61df35622eb21a3a)" - }, - { - "canonical_name": "naa.6000c2968ad7142d93faae527fe8822b", - "capacity_mb": 204800, - "device_path": "/vmfs/devices/disks/naa.6000c2968ad7142d93faae527fe8822b", - "device_type": "disk", - "device_ctd_list": [ - "vmhba0:C0:T3:L0" - ], - "disk_uid": "key-vim.host.ScsiDisk-02000000006000c2968ad7142d93faae527fe8822b566972747561", - "display_name": "Local VMware Disk (naa.6000c2968ad7142d93faae527fe8822b)" - },]
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

hosts_disk_info

+ +

+ list + / elements=string +

+
+

list of information for all disks attached to each ESXi host

+

Returned: always

+

Sample: ["\"192.168.0.182\": [\n {\n \"canonical_name\": \"naa.6000c296ed6217bd61df35622eb21a3a\"", "\n \"capacity_mb\": 4096", "\n \"device_path\": \"/vmfs/devices/disks/naa.6000c296ed6217bd61df35622eb21a3a\"", "\n \"device_type\": \"disk\"", "\n \"device_ctd_list\": [\n \"vmhba0:C0:T1:L0\"\n ]", "\n \"disk_uid\": \"key-vim.host.ScsiDisk-02000000006000c296ed6217bd61df35622eb21a3a566972747561\"", "\n \"display_name\": \"Local VMware Disk (naa.6000c296ed6217bd61df35622eb21a3a)\"\n }", "\n {\n \"canonical_name\": \"naa.6000c2968ad7142d93faae527fe8822b\"", "\n \"capacity_mb\": 204800", "\n \"device_path\": \"/vmfs/devices/disks/naa.6000c2968ad7142d93faae527fe8822b\"", "\n \"device_type\": \"disk\"", "\n \"device_ctd_list\": [\n \"vmhba0:C0:T3:L0\"\n ]", "\n \"disk_uid\": \"key-vim.host.ScsiDisk-02000000006000c2968ad7142d93faae527fe8822b566972747561\"", "\n \"display_name\": \"Local VMware Disk (naa.6000c2968ad7142d93faae527fe8822b)\"\n }", "]"]

+
+ + Authors ~~~~~~~ - Matt Proud (@laidbackware) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_host_dns_info_module.rst b/docs/community.vmware.vmware_host_dns_info_module.rst index 166f0f2aa..65ea9c1d2 100644 --- a/docs/community.vmware.vmware_host_dns_info_module.rst +++ b/docs/community.vmware.vmware_host_dns_info_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_host_dns_info_module: -************************************* -community.vmware.vmware_host_dns_info -************************************* +community.vmware.vmware_host_dns_info module -- Gathers info about an ESXi host's DNS configuration information ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Gathers info about an ESXi host's DNS configuration information** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_host_dns_info`. .. contents:: @@ -16,192 +17,187 @@ community.vmware.vmware_host_dns_info Synopsis -------- + - This module can be used to gather information about an ESXi host's DNS configuration information when ESXi hostname or Cluster name is given. - All parameters and VMware object names are case sensitive. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- cluster_name - -
- string -
-
- -
Name of the cluster from which the ESXi host belong to.
-
If esxi_hostname is not given, this parameter is required.
-
-
- esxi_hostname - -
- string -
-
- -
ESXi hostname to gather information from.
-
If cluster_name is not given, this parameter is required.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

cluster_name

+ +

+ string +

+
+

Name of the cluster from which the ESXi host belong to.

+

If esxi_hostname is not given, this parameter is required.

+
+
+

esxi_hostname

+ +

+ string +

+
+

ESXi hostname to gather information from.

+

If cluster_name is not given, this parameter is required.

+
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -209,6 +205,7 @@ Examples .. code-block:: yaml + - name: Gather DNS info about all ESXi Hosts in given Cluster community.vmware.vmware_host_dns_info: hostname: '{{ vcenter_hostname }}' @@ -227,44 +224,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- hosts_dns_info - -
- dictionary -
-
always -
metadata about DNS config from given cluster / host system
-
-
Sample:
-
{'DC0_C0_H0': {'dhcp': True, 'domain_name': 'localdomain', 'host_name': 'localhost', 'ip_address': ['8.8.8.8'], 'search_domain': ['localdomain'], 'virtual_nic_device': 'vmk0'}}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

hosts_dns_info

+ +

+ dictionary +

+
+

metadata about DNS config from given cluster / host system

+

Returned: always

+

Sample: {"DC0_C0_H0": {"dhcp": true, "domain_name": "localdomain", "host_name": "localhost", "ip_address": ["8.8.8.8"], "search_domain": ["localdomain"], "virtual_nic_device": "vmk0"}}

+
+ + Authors ~~~~~~~ - Abhijeet Kasurde (@Akasurde) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_host_dns_module.rst b/docs/community.vmware.vmware_host_dns_module.rst index d566a4856..a4aff39c2 100644 --- a/docs/community.vmware.vmware_host_dns_module.rst +++ b/docs/community.vmware.vmware_host_dns_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_host_dns_module: -******************************** -community.vmware.vmware_host_dns -******************************** +community.vmware.vmware_host_dns module -- Manage DNS configuration of an ESXi host system +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Manage DNS configuration of an ESXi host system** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_host_dns`. .. contents:: @@ -16,316 +17,301 @@ community.vmware.vmware_host_dns Synopsis -------- + - This module can be used to configure DNS for the default TCP/IP stack on an ESXi host system. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- cluster_name - -
- string -
-
- -
Name of the cluster from which all host systems will be used.
-
This parameter is required if esxi_hostname is not specified and you connect to a vCenter.
-
Cannot be used when you connect directly to an ESXi host.
-
-
- device - -
- string -
-
- -
The VMkernel network adapter to obtain DNS settings from.
-
Needs to get its IP through DHCP, a static network configuration combined with a dynamic DNS configuration doesn't work.
-
The parameter is only required in case of type is set to dhcp.
-
-
- dns_servers - -
- list - / elements=string -
-
- -
A list of DNS servers to be used.
-
The order of the DNS servers is important as they are used consecutively in order.
-
-
- domain - -
- string -
-
- -
The domain name to be used for the ESXi host.
-
-
- esxi_hostname - -
- string -
-
- -
Name of the host system to work with.
-
This parameter is required if cluster_name is not specified and you connect to a vCenter.
-
Cannot be used when you connect directly to an ESXi host.
-
-
- host_name - -
- string -
-
- -
The hostname to be used for the ESXi host.
-
Cannot be used when configuring a complete cluster.
-
-
- 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.
-
-
- search_domains - -
- list - / elements=string -
-
- -
A list of domains to be searched through by the resolver.
-
-
- type - -
- string - / required -
-
-
    Choices: -
  • dhcp
  • -
  • static
  • -
-
-
Type of DNS assignment. Either dhcp or static.
-
A VMkernel adapter needs to be set to DHCP if type is set to dhcp.
-
-
- 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.
-
-
- verbose - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Verbose output of the DNS server configuration change.
-
Explains if an DNS server was added, removed, or if the DNS server sequence was changed.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

cluster_name

+ +

+ string +

+
+

Name of the cluster from which all host systems will be used.

+

This parameter is required if esxi_hostname is not specified and you connect to a vCenter.

+

Cannot be used when you connect directly to an ESXi host.

+
+
+

device

+ +

+ string +

+
+

The VMkernel network adapter to obtain DNS settings from.

+

Needs to get its IP through DHCP, a static network configuration combined with a dynamic DNS configuration doesn't work.

+

The parameter is only required in case of type is set to dhcp.

+
+
+

dns_servers

+ +

+ list + / elements=string +

+
+

A list of DNS servers to be used.

+

The order of the DNS servers is important as they are used consecutively in order.

+
+
+

domain

+ +

+ string +

+
+

The domain name to be used for the ESXi host.

+
+
+

esxi_hostname

+ +

+ string +

+
+

Name of the host system to work with.

+

This parameter is required if cluster_name is not specified and you connect to a vCenter.

+

Cannot be used when you connect directly to an ESXi host.

+
+
+

host_name

+ +

+ string +

+
+

The hostname to be used for the ESXi host.

+

Cannot be used when configuring a complete cluster.

+
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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.

+
+
+

search_domains

+ +

+ list + / elements=string +

+
+

A list of domains to be searched through by the resolver.

+
+
+

type

+ +

+ string + / required +

+
+

Type of DNS assignment. Either dhcp or static.

+

A VMkernel adapter needs to be set to DHCP if type is set to dhcp.

+

Choices:

+
    +
  • "dhcp"

  • +
  • "static"

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

verbose

+ +

+ boolean +

+
+

Verbose output of the DNS server configuration change.

+

Explains if an DNS server was added, removed, or if the DNS server sequence was changed.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+ + Notes ----- -.. note:: - - This module is a replacement for the module ``vmware_dns_config`` - - All modules requires API write access and hence is not supported on a free ESXi license. - +- This module is a replacement for the module \ :literal:`vmware\_dns\_config`\ +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -333,6 +319,7 @@ Examples .. code-block:: yaml + - name: Configure DNS for an ESXi host community.vmware.vmware_host_dns: hostname: '{{ vcenter_hostname }}' @@ -378,41 +365,41 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- dns_config_result - -
- dictionary -
-
always -
metadata about host system's DNS configuration
-
-
Sample:
-
{'esx01.example.local': {'changed': True, 'dns_servers_changed': ['192.168.1.12', '192.168.1.13'], 'dns_servers': ['192.168.1.10', '192.168.1.11'], 'dns_servers_previous': ['192.168.1.10', '192.168.1.11', '192.168.1.12', '192.168.1.13'], 'domain': 'example.local', 'host_name': 'esx01', 'msg': 'DNS servers and Search domains changed', 'search_domains_changed': ['subdomain.example.local'], 'search_domains': ['subdomain.example.local', 'example.local'], 'search_domains_previous': ['example.local']}}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

dns_config_result

+ +

+ dictionary +

+
+

metadata about host system's DNS configuration

+

Returned: always

+

Sample: {"esx01.example.local": {"changed": true, "dns_servers": ["192.168.1.10", "192.168.1.11"], "dns_servers_changed": ["192.168.1.12", "192.168.1.13"], "dns_servers_previous": ["192.168.1.10", "192.168.1.11", "192.168.1.12", "192.168.1.13"], "domain": "example.local", "host_name": "esx01", "msg": "DNS servers and Search domains changed", "search_domains": ["subdomain.example.local", "example.local"], "search_domains_changed": ["subdomain.example.local"], "search_domains_previous": ["example.local"]}}

+
+ + Authors @@ -420,3 +407,13 @@ Authors - Christian Kotte (@ckotte) - Mario Lenz (@mariolenz) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_host_facts_module.rst b/docs/community.vmware.vmware_host_facts_module.rst index c9c015f0d..24cb1d4d3 100644 --- a/docs/community.vmware.vmware_host_facts_module.rst +++ b/docs/community.vmware.vmware_host_facts_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_host_facts_module: -********************************** -community.vmware.vmware_host_facts -********************************** +community.vmware.vmware_host_facts module -- Gathers facts about remote ESXi hostsystem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Gathers facts about remote ESXi hostsystem** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_host_facts`. .. contents:: @@ -16,13 +17,18 @@ community.vmware.vmware_host_facts Synopsis -------- + - This module can be used to gathers facts like CPU, memory, datastore, network and system etc. about ESXi host system. -- Please specify hostname or IP address of ESXi host system as ``hostname``. -- If hostname or IP address of vCenter is provided as ``hostname`` and ``esxi_hostname`` is not specified, then the module will throw an error. +- Please specify hostname or IP address of ESXi host system as \ :literal:`hostname`\ . +- If hostname or IP address of vCenter is provided as \ :literal:`hostname`\ and \ :literal:`esxi\_hostname`\ is not specified, then the module will throw an error. - VSAN facts added in 2.7 version. - SYSTEM fact uuid added in 2.10 version. - Connection state fact added in VMware collection 2.6.0. -- Please note that when ESXi host connection state is not ``connected``, facts returned from vCenter might be stale. Users are recommended to check connection state value and take appropriate decision in the playbook. +- Please note that when ESXi host connection state is not \ :literal:`connected`\ , facts returned from vCenter might be stale. Users are recommended to check connection state value and take appropriate decision in the playbook. + + + + @@ -32,232 +38,222 @@ Parameters .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- esxi_hostname - -
- string -
-
- -
ESXi hostname.
-
Host facts about the specified ESXi server will be returned.
-
By specifying this option, you can select which ESXi hostsystem is returned if connecting to a vCenter.
-
-
- 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: [
-
"hardware.memorySize",
-
"hardware.cpuInfo.numCpuCores",
-
"config.product.apiVersion",
-
"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
-
-
- show_tag - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Tags related to Host are shown if set to true.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

esxi_hostname

+ +

+ string +

+
+

ESXi hostname.

+

Host facts about the specified ESXi server will be returned.

+

By specifying this option, you can select which ESXi hostsystem is returned if connecting to a vCenter.

+
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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: [

+

"hardware.memorySize",

+

"hardware.cpuInfo.numCpuCores",

+

"config.product.apiVersion",

+

"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 +

+
+

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

+

Choices:

+
    +
  • "summary" ← (default)

  • +
  • "vsphere"

  • +
+ +
+
+

show_tag

+ +

+ boolean +

+
+

Tags related to Host are shown if set to true.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -265,6 +261,7 @@ Examples .. code-block:: yaml + - name: Gather vmware host facts community.vmware.vmware_host_facts: hostname: "{{ esxi_server }}" @@ -358,11 +355,20 @@ Examples -Status ------- + Authors ~~~~~~~ - Wei Gao (@woshihaoren) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_host_feature_info_module.rst b/docs/community.vmware.vmware_host_feature_info_module.rst index 9ccf0e1e1..02f222296 100644 --- a/docs/community.vmware.vmware_host_feature_info_module.rst +++ b/docs/community.vmware.vmware_host_feature_info_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_host_feature_info_module: -***************************************** -community.vmware.vmware_host_feature_info -***************************************** +community.vmware.vmware_host_feature_info module -- Gathers info about an ESXi host's feature capability information +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Gathers info about an ESXi host's feature capability information** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_host_feature_info`. .. contents:: @@ -16,191 +17,186 @@ community.vmware.vmware_host_feature_info Synopsis -------- + - This module can be used to gather information about an ESXi host's feature capability information when ESXi hostname or Cluster name is given. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- cluster_name - -
- string -
-
- -
Name of the cluster from all host systems to be used for information gathering.
-
If esxi_hostname is not given, this parameter is required.
-
-
- esxi_hostname - -
- string -
-
- -
ESXi hostname to gather information from.
-
If cluster_name is not given, this parameter is required.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

cluster_name

+ +

+ string +

+
+

Name of the cluster from all host systems to be used for information gathering.

+

If esxi_hostname is not given, this parameter is required.

+
+
+

esxi_hostname

+ +

+ string +

+
+

ESXi hostname to gather information from.

+

If cluster_name is not given, this parameter is required.

+
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -208,6 +204,7 @@ Examples .. code-block:: yaml + - name: Gather feature capability info about all ESXi Hosts in given Cluster community.vmware.vmware_host_feature_info: hostname: '{{ vcenter_hostname }}' @@ -236,44 +233,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- hosts_feature_info - -
- dictionary -
-
always -
metadata about host's feature capability information
-
-
Sample:
-
{'10.76.33.226': [{'feature_name': 'cpuid.3DNOW', 'key': 'cpuid.3DNOW', 'value': '0'}, {'feature_name': 'cpuid.3DNOWPLUS', 'key': 'cpuid.3DNOWPLUS', 'value': '0'}]}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

hosts_feature_info

+ +

+ dictionary +

+
+

metadata about host's feature capability information

+

Returned: always

+

Sample: {"10.76.33.226": [{"feature_name": "cpuid.3DNOW", "key": "cpuid.3DNOW", "value": "0"}, {"feature_name": "cpuid.3DNOWPLUS", "key": "cpuid.3DNOWPLUS", "value": "0"}]}

+
+ + Authors ~~~~~~~ - Abhijeet Kasurde (@Akasurde) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_host_firewall_info_module.rst b/docs/community.vmware.vmware_host_firewall_info_module.rst index 295e750e0..bff430b75 100644 --- a/docs/community.vmware.vmware_host_firewall_info_module.rst +++ b/docs/community.vmware.vmware_host_firewall_info_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_host_firewall_info_module: -****************************************** -community.vmware.vmware_host_firewall_info -****************************************** +community.vmware.vmware_host_firewall_info module -- Gathers info about an ESXi host's firewall configuration information ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Gathers info about an ESXi host's firewall configuration information** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_host_firewall_info`. .. contents:: @@ -16,191 +17,186 @@ community.vmware.vmware_host_firewall_info Synopsis -------- + - This module can be used to gather information about an ESXi host's firewall configuration information when ESXi hostname or Cluster name is given. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- cluster_name - -
- string -
-
- -
Name of the cluster from which the ESXi host belong to.
-
If esxi_hostname is not given, this parameter is required.
-
-
- esxi_hostname - -
- string -
-
- -
ESXi hostname to gather information from.
-
If cluster_name is not given, this parameter is required.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

cluster_name

+ +

+ string +

+
+

Name of the cluster from which the ESXi host belong to.

+

If esxi_hostname is not given, this parameter is required.

+
+
+

esxi_hostname

+ +

+ string +

+
+

ESXi hostname to gather information from.

+

If cluster_name is not given, this parameter is required.

+
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -208,6 +204,7 @@ Examples .. code-block:: yaml + - name: Gather firewall info about all ESXi Host in given Cluster community.vmware.vmware_host_firewall_info: hostname: '{{ vcenter_hostname }}' @@ -226,44 +223,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- hosts_firewall_info - -
- dictionary -
-
on success -
metadata about host's firewall configuration
-
-
Sample:
-
{'esxi_hostname_0001': [{'allowed_hosts': {'all_ip': True, 'ip_address': ['10.10.10.1'], 'ip_network': ['11.111.112.0/22', '192.168.10.1/24']}, 'enabled': True, 'key': 'CIMHttpServer', 'rule': [{'direction': 'inbound', 'end_port': None, 'port': 5988, 'port_type': 'dst', 'protocol': 'tcp'}], 'service': 'sfcbd-watchdog'}]}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

hosts_firewall_info

+ +

+ dictionary +

+
+

metadata about host's firewall configuration

+

Returned: on success

+

Sample: {"esxi_hostname_0001": [{"allowed_hosts": {"all_ip": true, "ip_address": ["10.10.10.1"], "ip_network": ["11.111.112.0/22", "192.168.10.1/24"]}, "enabled": true, "key": "CIMHttpServer", "rule": [{"direction": "inbound", "end_port": null, "port": 5988, "port_type": "dst", "protocol": "tcp"}], "service": "sfcbd-watchdog"}]}

+
+ + Authors ~~~~~~~ - Abhijeet Kasurde (@Akasurde) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_host_firewall_manager_module.rst b/docs/community.vmware.vmware_host_firewall_manager_module.rst index d10dba142..907a8fa6d 100644 --- a/docs/community.vmware.vmware_host_firewall_manager_module.rst +++ b/docs/community.vmware.vmware_host_firewall_manager_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_host_firewall_manager_module: -********************************************* -community.vmware.vmware_host_firewall_manager -********************************************* +community.vmware.vmware_host_firewall_manager module -- Manage firewall configurations about an ESXi host ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Manage firewall configurations about an ESXi host** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_host_firewall_manager`. .. contents:: @@ -16,330 +17,315 @@ community.vmware.vmware_host_firewall_manager Synopsis -------- + - This module can be used to manage firewall configurations about an ESXi host when ESXi hostname or Cluster name is given. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- cluster_name - -
- string -
-
- -
Name of the cluster.
-
Firewall settings are applied to every ESXi host system in given cluster.
-
If esxi_hostname is not given, this parameter is required.
-
-
- esxi_hostname - -
- string -
-
- -
ESXi hostname.
-
Firewall settings are applied to this ESXi host system.
-
If cluster_name is not given, this parameter is required.
-
-
- 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.
-
-
- rules - -
- list - / elements=dictionary -
-
- Default:
[]
-
-
A list of Rule set which needs to be managed.
-
Each member of list is rule set name and state to be set the rule.
-
Both rule name and rule state are required parameters.
-
Additional IPs and networks can also be specified
-
Please see examples for more information.
-
-
- allowed_hosts - -
- dictionary -
-
- -
Define the allowed hosts for this rule set.
-
-
- all_ip - -
- boolean - / required -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Whether all hosts should be allowed or not.
-
-
- ip_address - -
- list - / elements=string -
-
- Default:
[]
-
-
List of allowed IP addresses.
-
-
- ip_network - -
- list - / elements=string -
-
- Default:
[]
-
-
List of allowed IP networks.
-
-
- enabled - -
- boolean - / required -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Whether the rule set is enabled or not.
-
-
- name - -
- string - / required -
-
- -
Rule set name.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

cluster_name

+ +

+ string +

+
+

Name of the cluster.

+

Firewall settings are applied to every ESXi host system in given cluster.

+

If esxi_hostname is not given, this parameter is required.

+
+
+

esxi_hostname

+ +

+ string +

+
+

ESXi hostname.

+

Firewall settings are applied to this ESXi host system.

+

If cluster_name is not given, this parameter is required.

+
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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.

+
+
+

rules

+ +

+ list + / elements=dictionary +

+
+

A list of Rule set which needs to be managed.

+

Each member of list is rule set name and state to be set the rule.

+

Both rule name and rule state are required parameters.

+

Additional IPs and networks can also be specified

+

Please see examples for more information.

+

Default: []

+
+
+

allowed_hosts

+ +

+ dictionary +

+
+

Define the allowed hosts for this rule set.

+
+
+

all_ip

+ +

+ boolean + / required +

+
+

Whether all hosts should be allowed or not.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+ +
+
+

ip_address

+ +

+ list + / elements=string +

+
+

List of allowed IP addresses.

+

Default: []

+
+
+

ip_network

+ +

+ list + / elements=string +

+
+

List of allowed IP networks.

+

Default: []

+
+
+

enabled

+ +

+ boolean + / required +

+
+

Whether the rule set is enabled or not.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+ +
+
+

name

+ +

+ string + / required +

+
+

Rule set name.

+
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -347,6 +333,7 @@ Examples .. code-block:: yaml + - name: Enable vvold rule set for all ESXi Host in given Cluster community.vmware.vmware_host_firewall_manager: hostname: '{{ vcenter_hostname }}' @@ -420,41 +407,41 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- rule_set_state - -
- dictionary -
-
success -
dict with hostname as key and dict with firewall rule set facts as value
-
-
Sample:
-
{'rule_set_state': {'localhost.localdomain': {'CIMHttpServer': {'current_state': False, 'desired_state': False, 'previous_state': True, 'allowed_hosts': {'current_allowed_all': True, 'previous_allowed_all': True, 'desired_allowed_all': True, 'current_allowed_ip': [], 'previous_allowed_ip': [], 'desired_allowed_ip': [], 'current_allowed_networks': [], 'previous_allowed_networks': [], 'desired_allowed_networks': []}}, 'remoteSerialPort': {'current_state': True, 'desired_state': True, 'previous_state': True, 'allowed_hosts': {'current_allowed_all': False, 'previous_allowed_all': True, 'desired_allowed_all': False, 'current_allowed_ip': ['192.168.100.11'], 'previous_allowed_ip': [], 'desired_allowed_ip': ['192.168.100.11'], 'current_allowed_networks': ['192.168.200.0/24'], 'previous_allowed_networks': [], 'desired_allowed_networks': ['192.168.200.0/24']}}}}}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

rule_set_state

+ +

+ dictionary +

+
+

dict with hostname as key and dict with firewall rule set facts as value

+

Returned: success

+

Sample: {"rule_set_state": {"localhost.localdomain": {"CIMHttpServer": {"allowed_hosts": {"current_allowed_all": true, "current_allowed_ip": [], "current_allowed_networks": [], "desired_allowed_all": true, "desired_allowed_ip": [], "desired_allowed_networks": [], "previous_allowed_all": true, "previous_allowed_ip": [], "previous_allowed_networks": []}, "current_state": false, "desired_state": false, "previous_state": true}, "remoteSerialPort": {"allowed_hosts": {"current_allowed_all": false, "current_allowed_ip": ["192.168.100.11"], "current_allowed_networks": ["192.168.200.0/24"], "desired_allowed_all": false, "desired_allowed_ip": ["192.168.100.11"], "desired_allowed_networks": ["192.168.200.0/24"], "previous_allowed_all": true, "previous_allowed_ip": [], "previous_allowed_networks": []}, "current_state": true, "desired_state": true, "previous_state": true}}}}

+
+ + Authors @@ -462,3 +449,13 @@ Authors - Abhijeet Kasurde (@Akasurde) - Aaron Longchamps (@alongchamps) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_host_hyperthreading_module.rst b/docs/community.vmware.vmware_host_hyperthreading_module.rst index 6c80ae455..870fe1c79 100644 --- a/docs/community.vmware.vmware_host_hyperthreading_module.rst +++ b/docs/community.vmware.vmware_host_hyperthreading_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_host_hyperthreading_module: -******************************************* -community.vmware.vmware_host_hyperthreading -******************************************* +community.vmware.vmware_host_hyperthreading module -- Enables/Disables Hyperthreading optimization for an ESXi host system +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Enables/Disables Hyperthreading optimization for an ESXi host system** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_host_hyperthreading`. .. contents:: @@ -16,6 +17,7 @@ community.vmware.vmware_host_hyperthreading Synopsis -------- + - This module can be used to enable or disable Hyperthreading optimization for ESXi host systems in given vCenter infrastructure. - It also checks if Hyperthreading is activated/deactivated and if the host needs to be restarted. - The module informs the user if Hyperthreading is enabled but inactive because the processor is vulnerable to L1 Terminal Fault (L1TF). @@ -23,207 +25,201 @@ Synopsis + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- cluster_name - -
- string -
-
- -
Name of the cluster from which all host systems will be used.
-
This parameter is required if esxi_hostname is not specified.
-
-
- esxi_hostname - -
- string -
-
- -
Name of the host system to work with.
-
This parameter is required if cluster_name is not specified.
-
-
- 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: -
  • enabled ←
  • -
  • disabled
  • -
-
-
Enable or disable Hyperthreading.
-
You need to reboot the ESXi host if you change the configuration.
-
Make sure that Hyperthreading is enabled in the BIOS. Otherwise, it will be enabled, but never activated.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

cluster_name

+ +

+ string +

+
+

Name of the cluster from which all host systems will be used.

+

This parameter is required if esxi_hostname is not specified.

+
+
+

esxi_hostname

+ +

+ string +

+
+

Name of the host system to work with.

+

This parameter is required if cluster_name is not specified.

+
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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 +

+
+

Enable or disable Hyperthreading.

+

You need to reboot the ESXi host if you change the configuration.

+

Make sure that Hyperthreading is enabled in the BIOS. Otherwise, it will be enabled, but never activated.

+

Choices:

+
    +
  • "enabled" ← (default)

  • +
  • "disabled"

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -231,6 +227,7 @@ Examples .. code-block:: yaml + - name: Enable Hyperthreading for an host system community.vmware.vmware_host_hyperthreading: hostname: '{{ vcenter_hostname }}' @@ -260,44 +257,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- results - -
- dictionary -
-
always -
metadata about host system's Hyperthreading configuration
-
-
Sample:
-
{'esxi01': {'msg': "Hyperthreading is already enabled and active for host 'esxi01'", 'state_current': 'active', 'state': 'enabled'}}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

results

+ +

+ dictionary +

+
+

metadata about host system's Hyperthreading configuration

+

Returned: always

+

Sample: {"esxi01": {"msg": "Hyperthreading is already enabled and active for host 'esxi01'", "state": "enabled", "state_current": "active"}}

+
+ + Authors ~~~~~~~ - Christian Kotte (@ckotte) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_host_inventory_inventory.rst b/docs/community.vmware.vmware_host_inventory_inventory.rst index 89d19d430..296b784a7 100644 --- a/docs/community.vmware.vmware_host_inventory_inventory.rst +++ b/docs/community.vmware.vmware_host_inventory_inventory.rst @@ -1,12 +1,15 @@ -.. _community.vmware.vmware_host_inventory_inventory: -************************************** -community.vmware.vmware_host_inventory -************************************** +community.vmware.vmware_host_inventory inventory -- VMware ESXi hostsystem inventory source ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**VMware ESXi hostsystem inventory source** +This inventory plugin is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. +You need further requirements to be able to use this inventory plugin, +see `Requirements `_ for details. + +To use it in a playbook, specify: :code:`community.vmware.vmware_host_inventory`. .. contents:: @@ -16,717 +19,775 @@ community.vmware.vmware_host_inventory Synopsis -------- + - Get VMware ESXi hostsystem as inventory hosts from VMware environment. -- Uses any file which ends with vmware.yml, vmware.yaml, vmware_host_inventory.yml, or vmware_host_inventory.yaml as a YAML configuration file. +- Uses any file which ends with vmware.yml, vmware.yaml, vmware\_host\_inventory.yml, or vmware\_host\_inventory.yaml as a YAML configuration file. +.. _ansible_collections.community.vmware.vmware_host_inventory_inventory_requirements: + Requirements ------------ -The below requirements are needed on the local Ansible controller node that executes this inventory. +The below requirements are needed on the local controller node that executes this inventory. - vSphere Automation SDK - For tag feature + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsConfigurationComments
-
- cache - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
ini entries: -

[inventory]
cache = no

-
-
env:ANSIBLE_INVENTORY_CACHE
-
-
Toggle to enable/disable the caching of the inventory's source data, requires a cache plugin setup to work.
-
-
- cache_connection - -
- string -
-
- -
ini entries: -

[defaults]
fact_caching_connection = VALUE

-

[inventory]
cache_connection = VALUE

-
-
env:ANSIBLE_CACHE_PLUGIN_CONNECTION
-
env:ANSIBLE_INVENTORY_CACHE_CONNECTION
-
-
Cache connection data or path, read cache plugin documentation for specifics.
-
-
- cache_plugin - -
- string -
-
- Default:
"memory"
-
-
ini entries: -

[defaults]
fact_caching = memory

-

[inventory]
cache_plugin = memory

-
-
env:ANSIBLE_CACHE_PLUGIN
-
env:ANSIBLE_INVENTORY_CACHE_PLUGIN
-
-
Cache plugin to use for the inventory's source data.
-
-
- cache_prefix - -
- - -
-
- Default:
"ansible_inventory_"
-
-
ini entries: -

[default]
fact_caching_prefix = ansible_inventory_

-

[defaults]
fact_caching_prefix = ansible_inventory_

-

[inventory]
cache_prefix = ansible_inventory_

-
-
env:ANSIBLE_CACHE_PLUGIN_PREFIX
-
env:ANSIBLE_INVENTORY_CACHE_PLUGIN_PREFIX
-
-
Prefix to use for cache plugin files/tables
-
-
- cache_timeout - -
- integer -
-
- Default:
3600
-
-
ini entries: -

[defaults]
fact_caching_timeout = 3600

-

[inventory]
cache_timeout = 3600

-
-
env:ANSIBLE_CACHE_PLUGIN_TIMEOUT
-
env:ANSIBLE_INVENTORY_CACHE_TIMEOUT
-
-
Cache duration in seconds
-
-
- compose - -
- dictionary -
-
- Default:
{}
-
- -
Create vars from jinja2 expressions.
-
-
- filters - -
- list - / elements=string -
-
- Default:
[]
-
- -
This option allows client-side filtering hosts with jinja templating.
-
When server-side filtering is introduced, it should be preferred over this.
-
-
- groups - -
- dictionary -
-
- Default:
{}
-
- -
Add hosts to group based on Jinja2 conditionals.
-
-
- hostname - -
- - - / required -
-
- -
env:VMWARE_HOST
-
env:VMWARE_SERVER
-
-
Name of vCenter or ESXi server.
-
-
- hostnames - -
- list - / elements=string -
-
- Default:
["name"]
-
- -
A list of templates in order of precedence to compose inventory_hostname.
-
Ignores template if resulted in an empty string or None value.
-
You can use property specified in properties as variables in the template.
-
-
- keyed_groups - -
- list - / elements=dictionary -
-
- Default:
[{"key": "summary.runtime.powerState", "separator": ""}]
-
- -
Add hosts to group based on the values of a variable.
-
-
- default_value - -
- string -
-
added in 2.12
-
- - -
The default value when the host variable's value is an empty string.
-
This option is mutually exclusive with trailing_separator.
-
-
- key - -
- string -
-
- - -
The key from input dictionary used to generate groups
-
-
- parent_group - -
- string -
-
- - -
parent group for keyed group
-
-
- prefix - -
- string -
-
- Default:
""
-
- -
A keyed group name will start with this prefix
-
-
- separator - -
- string -
-
- Default:
"_"
-
- -
separator used to build the keyed group name
-
-
- trailing_separator - -
- boolean -
-
added in 2.12
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
- -
Set this option to False to omit the separator after the host variable when the value is an empty string.
-
This option is mutually exclusive with default_value.
-
-
- leading_separator - -
- boolean -
-
added in 2.11
-
- Default:
"yes"
-
- -
Use in conjunction with keyed_groups.
-
By default, a keyed group that does not have a prefix or a separator provided will have a name that starts with an underscore.
-
This is because the default prefix is "" and the default separator is "_".
-
Set this option to False to omit the leading underscore (or other separator) if no prefix is given.
-
If the group name is derived from a mapping the separator is still used to concatenate the items.
-
To not use a separator in the group name at all, set the separator for the keyed group to an empty string instead.
-
-
- password - -
- - - / required -
-
- -
env:VMWARE_PASSWORD
-
-
Password of vSphere user.
-
Accepts vault encrypted variable.
-
-
- port - -
- integer -
-
- Default:
443
-
-
env:VMWARE_PORT
-
-
Port number used to connect to vCenter or ESXi Server.
-
-
- properties - -
- list - / elements=string -
-
- Default:
["name", "customValue", "summary.runtime.powerState"]
-
- -
Specify the list of VMware schema properties associated with the ESXi hostsystem.
-
These properties will be populated in hostvars of the given ESXi hostsystem.
-
Each value in the list can be a path to a specific property in hostsystem object or a path to a collection of hostsystem objects.
-
summary.runtime.powerState are required if keyed_groups is set to default.
-
Please make sure that all the properties that are used in other parameters are included in this options.
-
In addition to ESXi hostsystem's properties, the following are special values
-
Use customValue to populate ESXi hostsystem's custom attributes. customValue is only supported by vCenter and not by ESXi.
-
Use all to populate all the properties of the virtual machine. The value all is time consuming operation, do not use unless required absolutely.
-
-
- proxy_host - -
- string -
-
- -
env:VMWARE_PROXY_HOST
-
-
Address of a proxy that will receive all HTTPS requests and relay them.
-
The format is a hostname or a IP.
-
This feature depends on a version of pyvmomi>=v6.7.1.2018.12.
-
-
- proxy_port - -
- integer -
-
- -
env:VMWARE_PROXY_PORT
-
-
Port of the HTTP proxy that will receive all HTTPS requests and relay them.
-
-
- resources - -
- list - / elements=dictionary -
-
- Default:
[]
-
- -
A list of resources to limit search scope.
-
Each resource item is represented by exactly one 'vim_type_snake_case:list of resource names pair and optional nested resources
-
Key name is based on snake case of a vim type name; e.g host_system correspond to vim.HostSystem
-
-
- strict - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
- -
If yes make invalid entries a fatal error, otherwise skip and continue.
-
Since it is possible to use facts in the expressions they might not always be available and we ignore those errors by default.
-
-
- use_extra_vars - -
- boolean -
-
added in 2.11
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
ini entries: -

[inventory_plugins]
use_extra_vars = no

-
-
env:ANSIBLE_INVENTORY_USE_EXTRA_VARS
-
-
Merge extra vars into the available variables for composition (highest precedence).
-
-
- username - -
- - - / required -
-
- -
env:VMWARE_USER
-
env:VMWARE_USERNAME
-
-
Name of vSphere user.
-
Accepts vault encrypted variable.
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
env:VMWARE_VALIDATE_CERTS
-
-
Allows connection when SSL certificates are not valid.
-
Set to false when certificates are not trusted.
-
-
- with_nested_properties - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
- -
This option transform flatten properties name to nested dictionary.
-
-
- with_path - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
- -
Include ESXi hostsystem's path.
-
Set this option to a string value to replace root name from 'Datacenters'.
-
-
- with_sanitized_property_name - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
- -
This option allows property name sanitization to create safe property names for use in Ansible.
-
Also, transforms property name to snake case.
-
-
- with_tags - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
- -
Include tags and associated hosts.
-
Requires 'vSphere Automation SDK' library to be installed on the given controller machine.
-
Please refer following URLs for installation steps
- -
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

cache

+ +

+ boolean +

+ +
+

Toggle to enable/disable the caching of the inventory's source data, requires a cache plugin setup to work.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +

Configuration:

+
    +
  • +

    INI entry

    +
    [inventory]
    +  cache = false
    + +
  • +
  • +

    Environment variable: ANSIBLE_INVENTORY_CACHE

    + +
  • +
+
+
+

cache_connection

+ +

+ string +

+ +
+

Cache connection data or path, read cache plugin documentation for specifics.

+

Configuration:

+
    +
  • +

    INI entries

    +
    [defaults]
    +  fact_caching_connection = VALUE
    + +
    [inventory]
    +  cache_connection = VALUE
    + +
  • +
  • +

    Environment variable: ANSIBLE_CACHE_PLUGIN_CONNECTION

    + +
  • +
  • +

    Environment variable: ANSIBLE_INVENTORY_CACHE_CONNECTION

    + +
  • +
+
+
+

cache_plugin

+ +

+ string +

+ +
+

Cache plugin to use for the inventory's source data.

+

Default: "memory"

+

Configuration:

+
    +
  • +

    INI entries

    +
    [defaults]
    +  fact_caching = memory
    + +
    [inventory]
    +  cache_plugin = memory
    + +
  • +
  • +

    Environment variable: ANSIBLE_CACHE_PLUGIN

    + +
  • +
  • +

    Environment variable: ANSIBLE_INVENTORY_CACHE_PLUGIN

    + +
  • +
+
+
+

cache_prefix

+ +

+ string +

+ +
+

Prefix to use for cache plugin files/tables

+

Default: "ansible_inventory_"

+

Configuration:

+
    +
  • +

    INI entries

    +
    [defaults]
    +  fact_caching_prefix = ansible_inventory_
    + +
    [inventory]
    +  cache_prefix = ansible_inventory_
    + +
  • +
  • +

    Environment variable: ANSIBLE_CACHE_PLUGIN_PREFIX

    + +
  • +
  • +

    Environment variable: ANSIBLE_INVENTORY_CACHE_PLUGIN_PREFIX

    + +
  • +
+
+
+

cache_timeout

+ +

+ integer +

+ +
+

Cache duration in seconds

+

Default: 3600

+

Configuration:

+
    +
  • +

    INI entries

    +
    [defaults]
    +  fact_caching_timeout = 3600
    + +
    [inventory]
    +  cache_timeout = 3600
    + +
  • +
  • +

    Environment variable: ANSIBLE_CACHE_PLUGIN_TIMEOUT

    + +
  • +
  • +

    Environment variable: ANSIBLE_INVENTORY_CACHE_TIMEOUT

    + +
  • +
+
+
+

compose

+ +

+ dictionary +

+ +
+

Create vars from jinja2 expressions.

+

Default: {}

+
+
+

filters

+ +

+ list + / elements=string +

+ +
+

This option allows client-side filtering hosts with jinja templating.

+

When server-side filtering is introduced, it should be preferred over this.

+

Default: []

+
+
+

groups

+ +

+ dictionary +

+ +
+

Add hosts to group based on Jinja2 conditionals.

+

Default: {}

+
+
+

hostname

+ +

+ string + / required +

+ +
+

Name of vCenter or ESXi server.

+

Configuration:

+
    +
  • +

    Environment variable: VMWARE_HOST

    + +
  • +
  • +

    Environment variable: VMWARE_SERVER

    + +
  • +
+
+
+

hostnames

+ +

+ list + / elements=string +

+ +
+

A list of templates in order of precedence to compose inventory_hostname.

+

Ignores template if resulted in an empty string or None value.

+

You can use property specified in properties as variables in the template.

+

Default: ["name"]

+
+
+

keyed_groups

+ +

+ list + / elements=dictionary +

+ +
+

Add hosts to group based on the values of a variable.

+

Default: [{"key": "summary.runtime.powerState", "separator": ""}]

+
+
+

default_value

+ +

+ string +

+

added in ansible-core 2.12

+ +
+

The default value when the host variable's value is an empty string.

+

This option is mutually exclusive with keyed_groups[].trailing_separator.

+
+
+

key

+ +

+ string +

+ +
+

The key from input dictionary used to generate groups

+
+
+

parent_group

+ +

+ string +

+ +
+

parent group for keyed group

+
+
+

prefix

+ +

+ string +

+ +
+

A keyed group name will start with this prefix

+

Default: ""

+
+
+

separator

+ +

+ string +

+ +
+

separator used to build the keyed group name

+

Default: "_"

+
+
+

trailing_separator

+ +

+ boolean +

+

added in ansible-core 2.12

+ +
+

Set this option to False to omit the keyed_groups[].separator after the host variable when the value is an empty string.

+

This option is mutually exclusive with keyed_groups[].default_value.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

leading_separator

+ +

+ boolean +

+

added in ansible-core 2.11

+ +
+

Use in conjunction with keyed_groups.

+

By default, a keyed group that does not have a prefix or a separator provided will have a name that starts with an underscore.

+

This is because the default prefix is "" and the default separator is "_".

+

Set this option to False to omit the leading underscore (or other separator) if no prefix is given.

+

If the group name is derived from a mapping the separator is still used to concatenate the items.

+

To not use a separator in the group name at all, set the separator for the keyed group to an empty string instead.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

password

+ +

+ string + / required +

+ +
+

Password of vSphere user.

+

Accepts vault encrypted variable.

+

Configuration:

+
    +
  • +

    Environment variable: VMWARE_PASSWORD

    + +
  • +
+
+
+

port

+ +

+ integer +

+ +
+

Port number used to connect to vCenter or ESXi Server.

+

Default: 443

+

Configuration:

+
    +
  • +

    Environment variable: VMWARE_PORT

    + +
  • +
+
+
+

properties

+ +

+ list + / elements=string +

+ +
+

Specify the list of VMware schema properties associated with the ESXi hostsystem.

+

These properties will be populated in hostvars of the given ESXi hostsystem.

+

Each value in the list can be a path to a specific property in hostsystem object or a path to a collection of hostsystem objects.

+

summary.runtime.powerState are required if keyed_groups is set to default.

+

Please make sure that all the properties that are used in other parameters are included in this options.

+

In addition to ESXi hostsystem's properties, the following are special values

+

Use customValue to populate ESXi hostsystem's custom attributes. customValue is only supported by vCenter and not by ESXi.

+

Use all to populate all the properties of the virtual machine. The value all is time consuming operation, do not use unless required absolutely.

+

Default: ["name", "customValue", "summary.runtime.powerState"]

+
+
+

proxy_host

+ +

+ string +

+ +
+

Address of a proxy that will receive all HTTPS requests and relay them.

+

The format is a hostname or a IP.

+

This feature depends on a version of pyvmomi>=v6.7.1.2018.12.

+

Configuration:

+
    +
  • +

    Environment variable: VMWARE_PROXY_HOST

    + +
  • +
+
+
+

proxy_port

+ +

+ integer +

+ +
+

Port of the HTTP proxy that will receive all HTTPS requests and relay them.

+

Configuration:

+
    +
  • +

    Environment variable: VMWARE_PROXY_PORT

    + +
  • +
+
+
+

resources

+ +

+ list + / elements=dictionary +

+ +
+

A list of resources to limit search scope.

+

Each resource item is represented by exactly one 'vim_type_snake_case:list of resource names pair and optional nested resources

+

Key name is based on snake case of a vim type name; e.g host_system correspond to vim.HostSystem

+

Default: []

+
+
+

strict

+ +

+ boolean +

+ +
+

If yes make invalid entries a fatal error, otherwise skip and continue.

+

Since it is possible to use facts in the expressions they might not always be available and we ignore those errors by default.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

use_extra_vars

+ +

+ boolean +

+

added in ansible-core 2.11

+ +
+

Merge extra vars into the available variables for composition (highest precedence).

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +

Configuration:

+
    +
  • +

    INI entry

    +
    [inventory_plugins]
    +  use_extra_vars = false
    + +
  • +
  • +

    Environment variable: ANSIBLE_INVENTORY_USE_EXTRA_VARS

    + +
  • +
+
+
+

username

+ +

+ string + / required +

+ +
+

Name of vSphere user.

+

Accepts vault encrypted variable.

+

Configuration:

+
    +
  • +

    Environment variable: VMWARE_USER

    + +
  • +
  • +

    Environment variable: VMWARE_USERNAME

    + +
  • +
+
+
+

validate_certs

+ +

+ boolean +

+ +
+

Allows connection when SSL certificates are not valid.

+

Set to false when certificates are not trusted.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +

Configuration:

+
    +
  • +

    Environment variable: VMWARE_VALIDATE_CERTS

    + +
  • +
+
+
+

with_nested_properties

+ +

+ boolean +

+ +
+

This option transform flatten properties name to nested dictionary.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

with_path

+ +

+ boolean +

+ +
+

Include ESXi hostsystem's path.

+

Set this option to a string value to replace root name from 'Datacenters'.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

with_sanitized_property_name

+ +

+ boolean +

+ +
+

This option allows property name sanitization to create safe property names for use in Ansible.

+

Also, transforms property name to snake case.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

with_tags

+ +

+ boolean +

+ +
+

Include tags and associated hosts.

+

Requires 'vSphere Automation SDK' library to be installed on the given controller machine.

+

Please refer following URLs for installation steps

+

https://code.vmware.com/web/sdk/7.0/vsphere-automation-python

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+ + @@ -736,6 +797,7 @@ Examples .. code-block:: yaml + # Sample configuration file for VMware Host dynamic inventory plugin: community.vmware.vmware_host_inventory strict: false @@ -762,8 +824,7 @@ Examples -Status ------- + Authors @@ -774,3 +835,11 @@ Authors .. hint:: Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up. + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_host_ipv6_module.rst b/docs/community.vmware.vmware_host_ipv6_module.rst index 5ca3f39b2..9b7324e90 100644 --- a/docs/community.vmware.vmware_host_ipv6_module.rst +++ b/docs/community.vmware.vmware_host_ipv6_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_host_ipv6_module: -********************************* -community.vmware.vmware_host_ipv6 -********************************* +community.vmware.vmware_host_ipv6 module -- Enables/Disables IPv6 support for an ESXi host system ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Enables/Disables IPv6 support for an ESXi host system** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_host_ipv6`. .. contents:: @@ -16,212 +17,207 @@ community.vmware.vmware_host_ipv6 Synopsis -------- + - This module can be used to enable or disable IPv6 support for ESXi host systems in given vCenter infrastructure. - It also checks if the host needs to be restarted. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- cluster_name - -
- string -
-
- -
Name of the cluster from which all host systems will be used.
-
This is required parameter if esxi_hostname is not specified.
-
-
- esxi_hostname - -
- string -
-
- -
Name of the host system to work with.
-
This is required parameter if cluster_name is not specified.
-
-
- 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: -
  • enabled ←
  • -
  • disabled
  • -
-
-
Enable or disable IPv6 support.
-
You need to reboot the ESXi host if you change the configuration.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

cluster_name

+ +

+ string +

+
+

Name of the cluster from which all host systems will be used.

+

This is required parameter if esxi_hostname is not specified.

+
+
+

esxi_hostname

+ +

+ string +

+
+

Name of the host system to work with.

+

This is required parameter if cluster_name is not specified.

+
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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 +

+
+

Enable or disable IPv6 support.

+

You need to reboot the ESXi host if you change the configuration.

+

Choices:

+
    +
  • "enabled" ← (default)

  • +
  • "disabled"

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -229,6 +225,7 @@ Examples .. code-block:: yaml + - name: Enable IPv6 for an host system community.vmware.vmware_host_ipv6: hostname: '{{ vcenter_hostname }}' @@ -258,44 +255,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- result - -
- dictionary -
-
always -
metadata about host system's IPv6 configuration
-
-
Sample:
-
{'esxi01': {'changed': False, 'msg': "IPv6 is already enabled and active for host 'esxi01'"}}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

result

+ +

+ dictionary +

+
+

metadata about host system's IPv6 configuration

+

Returned: always

+

Sample: {"esxi01": {"changed": false, "msg": "IPv6 is already enabled and active for host 'esxi01'"}}

+
+ + Authors ~~~~~~~ -- Christian Kotte (@ckotte) +- Christian Kotte (@ckotte) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_host_iscsi_info_module.rst b/docs/community.vmware.vmware_host_iscsi_info_module.rst index 216b0f0a0..c74de86ed 100644 --- a/docs/community.vmware.vmware_host_iscsi_info_module.rst +++ b/docs/community.vmware.vmware_host_iscsi_info_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_host_iscsi_info_module: -*************************************** -community.vmware.vmware_host_iscsi_info -*************************************** +community.vmware.vmware_host_iscsi_info module -- Gather iSCSI configuration information of ESXi host ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Gather iSCSI configuration information of ESXi host** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_host_iscsi_info`. .. contents:: @@ -16,175 +17,172 @@ community.vmware.vmware_host_iscsi_info Synopsis -------- + - This module can be used to gather information about the iSCSI configuration of the ESXi host. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- esxi_hostname - -
- string - / required -
-
- -
The ESXi hostname on which to gather iSCSI settings.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

esxi_hostname

+ +

+ string + / required +

+
+

The ESXi hostname on which to gather iSCSI settings.

+
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -192,6 +190,7 @@ Examples .. code-block:: yaml + - name: Gather iSCSI configuration information of ESXi host community.vmware.vmware_host_iscsi_info: hostname: "{{ vcenter_hostname }}" @@ -202,125 +201,71 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- detected_iscsi_drives - -
- list -
-
always -
list of detected iSCSI drive
-
added from version 1.9.0
-
-
Sample:
-
[ - { - "address": [ - "192.168.0.57:3260" - ], - "canonical_name": "naa.60014055f198fb3d0cb4bd7ae1f802e1", - "iscsi_name": "iqn.2021-03.local.iscsi-target:iscsi-storage.target0" - } - ]
-
-
- iscsi_properties - -
- dictionary -
-
always -
dictionary of current iSCSI information
-
-
Sample:
-
{ - "iscsi_alias": "", - "iscsi_authentication_properties": { - "_vimtype": "vim.host.InternetScsiHba.AuthenticationProperties", - "chapAuthEnabled": false, - "chapAuthenticationType": "chapProhibited", - "chapInherited": null, - "chapName": "", - "chapSecret": "XXXXXXXXX", - "mutualChapAuthenticationType": "chapProhibited", - "mutualChapInherited": null, - "mutualChapName": "", - "mutualChapSecret": "XXXXXXXXX" - }, - "iscsi_enabled": true, - "iscsi_name": "iqn.1998-01.com.vmware:esxi-033f58ee", - "iscsi_send_targets": [ - { - "address": "192.168.0.1", - "authenticationProperties": { - "_vimtype": "vim.host.InternetScsiHba.AuthenticationProperties", - "chapAuthEnabled": false, - "chapAuthenticationType": "chapProhibited", - "chapInherited": true, - "chapName": "", - "chapSecret": "XXXXXXXXX", - "mutualChapAuthenticationType": "chapProhibited", - "mutualChapInherited": true, - "mutualChapName": "", - "mutualChapSecret": "XXXXXXXXX" - }, - "port": 3260 - } - ], - "iscsi_static_targets": [ - { - "address": "192.168.0.1", - "authenticationProperties": { - "_vimtype": "vim.host.InternetScsiHba.AuthenticationProperties", - "chapAuthEnabled": false, - "chapAuthenticationType": "chapProhibited", - "chapInherited": true, - "chapName": "", - "chapSecret": "XXXXXXXXX", - "mutualChapAuthenticationType": "chapProhibited", - "mutualChapInherited": true, - "mutualChapName": "", - "mutualChapSecret": "XXXXXXXXX" - }, - "iscsi_name": "iqn.2004-04.com.qnap:tvs-673:iscsi.vm3.2c580e", - "port": 3260 - } - ], - "port_bind": [], - "vmhba_name": "vmhba65" - }
-
-

- - -Status ------- + + + + + + + + + + + + + + + + + +

Key

Description

+
+

detected_iscsi_drives

+ +

+ list + / elements=string +

+
+

list of detected iSCSI drive

+

added from version 1.9.0

+

Returned: always

+

Sample: ["[\n {\n \"address\": [\n \"192.168.0.57:3260\"\n ]", "\n \"canonical_name\": \"naa.60014055f198fb3d0cb4bd7ae1f802e1\"", "\n \"iscsi_name\": \"iqn.2021-03.local.iscsi-target:iscsi-storage.target0\"\n }\n]"]

+
+
+

iscsi_properties

+ +

+ dictionary +

+
+

dictionary of current iSCSI information

+

Returned: always

+

Sample: {"iscsi_alias": "", "iscsi_authentication_properties": {"_vimtype": "vim.host.InternetScsiHba.AuthenticationProperties", "chapAuthEnabled": false, "chapAuthenticationType": "chapProhibited", "chapInherited": null, "chapName": "", "chapSecret": "XXXXXXXXX", "mutualChapAuthenticationType": "chapProhibited", "mutualChapInherited": null, "mutualChapName": "", "mutualChapSecret": "XXXXXXXXX"}, "iscsi_enabled": true, "iscsi_name": "iqn.1998-01.com.vmware:esxi-033f58ee", "iscsi_send_targets": [{"address": "192.168.0.1", "authenticationProperties": {"_vimtype": "vim.host.InternetScsiHba.AuthenticationProperties", "chapAuthEnabled": false, "chapAuthenticationType": "chapProhibited", "chapInherited": true, "chapName": "", "chapSecret": "XXXXXXXXX", "mutualChapAuthenticationType": "chapProhibited", "mutualChapInherited": true, "mutualChapName": "", "mutualChapSecret": "XXXXXXXXX"}, "port": 3260}], "iscsi_static_targets": [{"address": "192.168.0.1", "authenticationProperties": {"_vimtype": "vim.host.InternetScsiHba.AuthenticationProperties", "chapAuthEnabled": false, "chapAuthenticationType": "chapProhibited", "chapInherited": true, "chapName": "", "chapSecret": "XXXXXXXXX", "mutualChapAuthenticationType": "chapProhibited", "mutualChapInherited": true, "mutualChapName": "", "mutualChapSecret": "XXXXXXXXX"}, "iscsi_name": "iqn.2004-04.com.qnap:tvs-673:iscsi.vm3.2c580e", "port": 3260}], "port_bind": [], "vmhba_name": "vmhba65"}

+
+ + Authors ~~~~~~~ - sky-joker (@sky-joker) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_host_iscsi_module.rst b/docs/community.vmware.vmware_host_iscsi_module.rst index 1e3b0e280..76daf9527 100644 --- a/docs/community.vmware.vmware_host_iscsi_module.rst +++ b/docs/community.vmware.vmware_host_iscsi_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_host_iscsi_module: -********************************** -community.vmware.vmware_host_iscsi -********************************** +community.vmware.vmware_host_iscsi module -- Manage the iSCSI configuration of ESXi host +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Manage the iSCSI configuration of ESXi host** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_host_iscsi`. .. contents:: @@ -16,993 +17,937 @@ community.vmware.vmware_host_iscsi Synopsis -------- + - In this module, can manage the iSCSI configuration of ESXi host + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- esxi_hostname - -
- string - / required -
-
- -
The ESXi hostname on which to change iSCSI settings.
-
-
- 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.
-
-
- iscsi_config - -
- dictionary -
-
- -
The iSCSI configs.
-
This parameter is required if state=present or state=absent.
-
-
- alias - -
- string -
-
- Default:
""
-
-
The new value for the alias of the adapter.
-
-
- authentication - -
- dictionary -
-
- -
CHAP authentication parent settings for iSCSI.
-
-
- chap_auth_enabled - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Whether to enable CHAP authentication.
-
-
- chap_authentication_type - -
- string -
-
-
    Choices: -
  • chapDiscouraged
  • -
  • chapPreferred
  • -
  • chapRequired
  • -
  • chapProhibited ←
  • -
-
-
The preference for CHAP or non-CHAP protocol of CHAP if CHAP is enabled.
-
-
- chap_name - -
- string -
-
- Default:
""
-
-
CHAP user name if CHAP is enabled.
-
-
- chap_secret - -
- string -
-
- -
The secret password of CHAP if CHAP is enabled.
-
-
- mutual_chap_authentication_type - -
- string -
-
-
    Choices: -
  • chapProhibited ←
  • -
  • chapRequired
  • -
-
-
The preference for CHAP or non-CHAP protocol of Mutual-CHAP if CHAP is enabled.
-
-
- mutual_chap_name - -
- string -
-
- Default:
""
-
-
The user name that the target needs to use to authenticate with the initiator if Mutual-CHAP is enabled.
-
-
- mutual_chap_secret - -
- string -
-
- -
The secret password of mutual CHAP if Mutual-CHAP is enabled.
-
-
- force - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Force port bind VMkernels to be removed.
-
-
- iscsi_name - -
- string -
-
- -
The name for the iSCSI HBA adapter.
-
This is iSCSI qualified name.
-

aliases: initiator_iqn
-
-
- port_bind - -
- list - / elements=string -
-
- Default:
[]
-
-
The list of the VMkernels if use port bindings.
-
-
- send_target - -
- dictionary -
-
- -
The iSCSI dynamic target settings.
-
-
- address - -
- string - / required -
-
- -
The IP address or hostname of the storage device.
-
-
- authentication - -
- dictionary -
-
- -
CHAP authentication settings of a dynamic target for iSCSI.
-
-
- chap_auth_enabled - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Whether to enable CHAP authentication.
-
-
- chap_authentication_type - -
- string -
-
-
    Choices: -
  • chapDiscouraged
  • -
  • chapPreferred
  • -
  • chapRequired
  • -
  • chapProhibited ←
  • -
-
-
The preference for CHAP or non-CHAP protocol of CHAP if CHAP is enabled.
-
-
- chap_inherited - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Whether or not to inherit CHAP settings from the parent settings.
-
-
- chap_name - -
- string -
-
- Default:
""
-
-
CHAP user name if CHAP is enabled.
-
-
- chap_secret - -
- string -
-
- -
The secret password of CHAP if CHAP is enabled.
-
-
- mutual_chap_authentication_type - -
- string -
-
-
    Choices: -
  • chapProhibited ←
  • -
  • chapRequired
  • -
-
-
The preference for CHAP or non-CHAP protocol of Mutual-CHAP if CHAP is enabled.
-
-
- mutual_chap_inherited - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Whether or not to inherit Mutual-CHAP settings from the parent settings.
-
-
- mutual_chap_name - -
- string -
-
- Default:
""
-
-
The user name that the target needs to use to authenticate with the initiator if Mutual-CHAP is enabled.
-
-
- mutual_chap_secret - -
- string -
-
- -
The secret password of mutual CHAP if Mutual-CHAP is enabled.
-
-
- port - -
- integer -
-
- Default:
3260
-
-
The TCP port of the storage device.
-
If not specified, the standard default of 3260 is used.
-
-
- static_target - -
- dictionary -
-
- -
The iSCSI static target settings.
-
-
- address - -
- string - / required -
-
- -
The IP address or hostname of the storage device.
-
-
- authentication - -
- dictionary -
-
- -
CHAP authentication settings of a static target for iSCSI.
-
-
- chap_auth_enabled - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Whether to enable CHAP authentication.
-
-
- chap_authentication_type - -
- string -
-
-
    Choices: -
  • chapDiscouraged
  • -
  • chapPreferred
  • -
  • chapRequired
  • -
  • chapProhibited ←
  • -
-
-
The preference for CHAP or non-CHAP protocol of CHAP if CHAP is enabled.
-
-
- chap_inherited - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Whether or not to inherit CHAP settings from the parent settings.
-
-
- chap_name - -
- string -
-
- Default:
""
-
-
CHAP user name if CHAP is enabled.
-
-
- chap_secret - -
- string -
-
- -
The secret password of CHAP if CHAP is enabled.
-
-
- mutual_chap_authentication_type - -
- string -
-
-
    Choices: -
  • chapProhibited ←
  • -
  • chapRequired
  • -
-
-
The preference for CHAP or non-CHAP protocol of Mutual-CHAP if CHAP is enabled.
-
-
- mutual_chap_inherited - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Whether or not to inherit Mutual-CHAP settings from the parent settings.
-
-
- mutual_chap_name - -
- string -
-
- Default:
""
-
-
The user name that the target needs to use to authenticate with the initiator if Mutual-CHAP is enabled.
-
-
- mutual_chap_secret - -
- string -
-
- -
The secret password of mutual CHAP if Mutual-CHAP is enabled.
-
-
- iscsi_name - -
- string - / required -
-
- -
The name of the iSCSI target to connect to.
-
-
- port - -
- integer -
-
- Default:
3260
-
-
The TCP port of the storage device.
-
If not specified, the standard default of 3260 is used.
-
-
- vmhba_name - -
- string - / required -
-
- -
The iSCSI adapter name.
-
-
- 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
  • -
  • enabled
  • -
  • disabled
  • -
-
-
If set to present, add the iSCSI target or the bind ports if they are not existing.
-
If set to present, update the iSCSI settings if they already exist and occur change.
-
If set to absent, remove the iSCSI target or the bind ports if they are existing.
-
If set to (enabled), enable the iSCSI of ESXi if the iSCSI is disabled.
-
If set to (disabled), disable the iSCSI of ESXi if the iSCSI is enabled.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

esxi_hostname

+ +

+ string + / required +

+
+

The ESXi hostname on which to change iSCSI settings.

+
+
+

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.

+
+
+

iscsi_config

+ +

+ dictionary +

+
+

The iSCSI configs.

+

This parameter is required if state=present or state=absent.

+
+
+

alias

+ +

+ string +

+
+

The new value for the alias of the adapter.

+

Default: ""

+
+
+

authentication

+ +

+ dictionary +

+
+

CHAP authentication parent settings for iSCSI.

+
+
+

chap_auth_enabled

+ +

+ boolean +

+
+

Whether to enable CHAP authentication.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

chap_authentication_type

+ +

+ string +

+
+

The preference for CHAP or non-CHAP protocol of CHAP if CHAP is enabled.

+

Choices:

+
    +
  • "chapDiscouraged"

  • +
  • "chapPreferred"

  • +
  • "chapRequired"

  • +
  • "chapProhibited" ← (default)

  • +
+ +
+
+

chap_name

+ +

+ string +

+
+

CHAP user name if CHAP is enabled.

+

Default: ""

+
+
+

chap_secret

+ +

+ string +

+
+

The secret password of CHAP if CHAP is enabled.

+
+
+

mutual_chap_authentication_type

+ +

+ string +

+
+

The preference for CHAP or non-CHAP protocol of Mutual-CHAP if CHAP is enabled.

+

Choices:

+
    +
  • "chapProhibited" ← (default)

  • +
  • "chapRequired"

  • +
+ +
+
+

mutual_chap_name

+ +

+ string +

+
+

The user name that the target needs to use to authenticate with the initiator if Mutual-CHAP is enabled.

+

Default: ""

+
+
+

mutual_chap_secret

+ +

+ string +

+
+

The secret password of mutual CHAP if Mutual-CHAP is enabled.

+
+
+

force

+ +

+ boolean +

+
+

Force port bind VMkernels to be removed.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+
+

iscsi_name

+ +

aliases: initiator_iqn

+

+ string +

+
+

The name for the iSCSI HBA adapter.

+

This is iSCSI qualified name.

+
+
+

port_bind

+ +

+ list + / elements=string +

+
+

The list of the VMkernels if use port bindings.

+

Default: []

+
+
+

send_target

+ +

+ dictionary +

+
+

The iSCSI dynamic target settings.

+
+
+

address

+ +

+ string + / required +

+
+

The IP address or hostname of the storage device.

+
+
+

authentication

+ +

+ dictionary +

+
+

CHAP authentication settings of a dynamic target for iSCSI.

+
+
+

chap_auth_enabled

+ +

+ boolean +

+
+

Whether to enable CHAP authentication.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

chap_authentication_type

+ +

+ string +

+
+

The preference for CHAP or non-CHAP protocol of CHAP if CHAP is enabled.

+

Choices:

+
    +
  • "chapDiscouraged"

  • +
  • "chapPreferred"

  • +
  • "chapRequired"

  • +
  • "chapProhibited" ← (default)

  • +
+ +
+
+

chap_inherited

+ +

+ boolean +

+
+

Whether or not to inherit CHAP settings from the parent settings.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

chap_name

+ +

+ string +

+
+

CHAP user name if CHAP is enabled.

+

Default: ""

+
+
+

chap_secret

+ +

+ string +

+
+

The secret password of CHAP if CHAP is enabled.

+
+
+

mutual_chap_authentication_type

+ +

+ string +

+
+

The preference for CHAP or non-CHAP protocol of Mutual-CHAP if CHAP is enabled.

+

Choices:

+
    +
  • "chapProhibited" ← (default)

  • +
  • "chapRequired"

  • +
+ +
+
+

mutual_chap_inherited

+ +

+ boolean +

+
+

Whether or not to inherit Mutual-CHAP settings from the parent settings.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

mutual_chap_name

+ +

+ string +

+
+

The user name that the target needs to use to authenticate with the initiator if Mutual-CHAP is enabled.

+

Default: ""

+
+
+

mutual_chap_secret

+ +

+ string +

+
+

The secret password of mutual CHAP if Mutual-CHAP is enabled.

+
+
+

port

+ +

+ integer +

+
+

The TCP port of the storage device.

+

If not specified, the standard default of 3260 is used.

+

Default: 3260

+
+
+

static_target

+ +

+ dictionary +

+
+

The iSCSI static target settings.

+
+
+

address

+ +

+ string + / required +

+
+

The IP address or hostname of the storage device.

+
+
+

authentication

+ +

+ dictionary +

+
+

CHAP authentication settings of a static target for iSCSI.

+
+
+

chap_auth_enabled

+ +

+ boolean +

+
+

Whether to enable CHAP authentication.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

chap_authentication_type

+ +

+ string +

+
+

The preference for CHAP or non-CHAP protocol of CHAP if CHAP is enabled.

+

Choices:

+
    +
  • "chapDiscouraged"

  • +
  • "chapPreferred"

  • +
  • "chapRequired"

  • +
  • "chapProhibited" ← (default)

  • +
+ +
+
+

chap_inherited

+ +

+ boolean +

+
+

Whether or not to inherit CHAP settings from the parent settings.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

chap_name

+ +

+ string +

+
+

CHAP user name if CHAP is enabled.

+

Default: ""

+
+
+

chap_secret

+ +

+ string +

+
+

The secret password of CHAP if CHAP is enabled.

+
+
+

mutual_chap_authentication_type

+ +

+ string +

+
+

The preference for CHAP or non-CHAP protocol of Mutual-CHAP if CHAP is enabled.

+

Choices:

+
    +
  • "chapProhibited" ← (default)

  • +
  • "chapRequired"

  • +
+ +
+
+

mutual_chap_inherited

+ +

+ boolean +

+
+

Whether or not to inherit Mutual-CHAP settings from the parent settings.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

mutual_chap_name

+ +

+ string +

+
+

The user name that the target needs to use to authenticate with the initiator if Mutual-CHAP is enabled.

+

Default: ""

+
+
+

mutual_chap_secret

+ +

+ string +

+
+

The secret password of mutual CHAP if Mutual-CHAP is enabled.

+
+
+

iscsi_name

+ +

+ string + / required +

+
+

The name of the iSCSI target to connect to.

+
+
+

port

+ +

+ integer +

+
+

The TCP port of the storage device.

+

If not specified, the standard default of 3260 is used.

+

Default: 3260

+
+
+

vmhba_name

+ +

+ string + / required +

+
+

The iSCSI adapter name.

+
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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 +

+
+

If set to present, add the iSCSI target or the bind ports if they are not existing.

+

If set to present, update the iSCSI settings if they already exist and occur change.

+

If set to absent, remove the iSCSI target or the bind ports if they are existing.

+

If set to (enabled), enable the iSCSI of ESXi if the iSCSI is disabled.

+

If set to (disabled), disable the iSCSI of ESXi if the iSCSI is enabled.

+

Choices:

+
    +
  • "present" ← (default)

  • +
  • "absent"

  • +
  • "enabled"

  • +
  • "disabled"

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -1010,6 +955,7 @@ Examples .. code-block:: yaml + - name: Enable iSCSI of ESXi community.vmware.vmware_host_iscsi: hostname: "{{ vcenter_hostname }}" @@ -1085,64 +1031,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- iscsi_properties - -
- dictionary -
-
changed -
Parameter return when system defaults config is changed.
-
-
Sample:
-
{ - "iscsi_alias": "", - "iscsi_authentication_properties": { - "_vimtype": "vim.host.InternetScsiHba.AuthenticationProperties", - "chapAuthEnabled": false, - "chapAuthenticationType": "chapProhibited", - "chapInherited": null, - "chapName": "", - "chapSecret": "XXXXXXXXXXXXXXXXXXXXX", - "mutualChapAuthenticationType": "chapProhibited", - "mutualChapInherited": null, - "mutualChapName": "XXXXXXXXXXXXXXXXXXXXX", - "mutualChapSecret": "" - }, - "iscsi_enabled": true, - "iscsi_name": "", - "iscsi_send_targets": [], - "iscsi_static_targets": [], - "port_bind": [], - "vmhba_name": "vmhba65" - }
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

iscsi_properties

+ +

+ dictionary +

+
+

Parameter return when system defaults config is changed.

+

Returned: changed

+

Sample: {"iscsi_alias": "", "iscsi_authentication_properties": {"_vimtype": "vim.host.InternetScsiHba.AuthenticationProperties", "chapAuthEnabled": false, "chapAuthenticationType": "chapProhibited", "chapInherited": null, "chapName": "", "chapSecret": "XXXXXXXXXXXXXXXXXXXXX", "mutualChapAuthenticationType": "chapProhibited", "mutualChapInherited": null, "mutualChapName": "XXXXXXXXXXXXXXXXXXXXX", "mutualChapSecret": ""}, "iscsi_enabled": true, "iscsi_name": "", "iscsi_send_targets": [], "iscsi_static_targets": [], "port_bind": [], "vmhba_name": "vmhba65"}

+
+ + Authors ~~~~~~~ - sky-joker (@sky-joker) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_host_kernel_manager_module.rst b/docs/community.vmware.vmware_host_kernel_manager_module.rst index bc360bab3..a224d44e1 100644 --- a/docs/community.vmware.vmware_host_kernel_manager_module.rst +++ b/docs/community.vmware.vmware_host_kernel_manager_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_host_kernel_manager_module: -******************************************* -community.vmware.vmware_host_kernel_manager -******************************************* +community.vmware.vmware_host_kernel_manager module -- Manage kernel module options on ESXi hosts +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Manage kernel module options on ESXi hosts** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_host_kernel_manager`. .. contents:: @@ -16,11 +17,16 @@ community.vmware.vmware_host_kernel_manager Synopsis -------- + - This module can be used to manage kernel module options on ESXi hosts. - All connected ESXi hosts in scope will be configured when specified. - If a host is not connected at time of configuration, it will be marked as such in the output. - Kernel module options may require a reboot to take effect which is not covered here. -- You can use :ref:`ansible.builtin.reboot ` or :ref:`community.vmware.vmware_host_powerstate ` module to reboot all ESXi host systems. +- You can use \ `ansible.builtin.reboot `__\ or \ `community.vmware.vmware\_host\_powerstate `__\ module to reboot all ESXi host systems. + + + + @@ -30,215 +36,201 @@ Parameters .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- cluster_name - -
- string -
-
- -
Name of the VMware cluster to work on.
-
All ESXi hosts in this cluster will be configured.
-
This parameter is required if esxi_hostname is not specified.
-
-
- esxi_hostname - -
- string -
-
- -
Name of the ESXi host to work on.
-
This parameter is required if cluster_name is not specified.
-
-
- 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.
-
-
- kernel_module_name - -
- string - / required -
-
- -
Name of the kernel module to be configured.
-
-
- kernel_module_option - -
- string - / required -
-
- -
Specified configurations will be applied to the given module.
-
These values are specified in key=value pairs and separated by a space when there are multiple options.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

cluster_name

+ +

+ string +

+
+

Name of the VMware cluster to work on.

+

All ESXi hosts in this cluster will be configured.

+

This parameter is required if esxi_hostname is not specified.

+
+
+

esxi_hostname

+ +

+ string +

+
+

Name of the ESXi host to work on.

+

This parameter is required if cluster_name is not specified.

+
+
+

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.

+
+
+

kernel_module_name

+ +

+ string + / required +

+
+

Name of the kernel module to be configured.

+
+
+

kernel_module_option

+ +

+ string + / required +

+
+

Specified configurations will be applied to the given module.

+

These values are specified in key=value pairs and separated by a space when there are multiple options.

+
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -246,6 +238,7 @@ Examples .. code-block:: yaml + - name: Configure IPv6 to be off via tcpip4 kernel module community.vmware.vmware_host_kernel_manager: hostname: '{{ vcenter_hostname }}' @@ -266,44 +259,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- host_kernel_status - -
- dictionary -
-
success -
dict with information on what was changed, by ESXi host in scope.
-
-
Sample:
-
{'results': {'myhost01.example.com': {'changed': True, 'configured_options': 'ipv6=0', 'msg': 'Options have been changed on the kernel module', 'original_options': 'ipv6=1'}}}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

host_kernel_status

+ +

+ dictionary +

+
+

dict with information on what was changed, by ESXi host in scope.

+

Returned: success

+

Sample: {"results": {"myhost01.example.com": {"changed": true, "configured_options": "ipv6=0", "msg": "Options have been changed on the kernel module", "original_options": "ipv6=1"}}}

+
+ + Authors ~~~~~~~ - Aaron Longchamps (@alongchamps) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_host_lockdown_exceptions_module.rst b/docs/community.vmware.vmware_host_lockdown_exceptions_module.rst index a2097c128..9452f2166 100644 --- a/docs/community.vmware.vmware_host_lockdown_exceptions_module.rst +++ b/docs/community.vmware.vmware_host_lockdown_exceptions_module.rst @@ -1,14 +1,15 @@ -.. _community.vmware.vmware_host_lockdown_exceptions_module: -************************************************ -community.vmware.vmware_host_lockdown_exceptions -************************************************ +community.vmware.vmware_host_lockdown_exceptions module -- Manage Lockdown Mode Exception Users ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Manage Lockdown Mode Exception Users** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. -Version added: 3.1.0 +To use it in a playbook, specify: :code:`community.vmware.vmware_host_lockdown_exceptions`. + +New in community.vmware 3.1.0 .. contents:: :local: @@ -17,9 +18,14 @@ Version added: 3.1.0 Synopsis -------- + - This module can be used to manage Lockdown Mode Exception Users. - All parameters and VMware objects values are case sensitive. -- Please specify ``hostname`` as vCenter IP or hostname only, as lockdown operations are not possible from standalone ESXi server. +- Please specify \ :literal:`hostname`\ as vCenter IP or hostname only, as lockdown operations are not possible from standalone ESXi server. + + + + @@ -29,223 +35,211 @@ Parameters .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- cluster_name - -
- string -
-
- -
Name of cluster.
-
All host systems from given cluster used to manage exception users.
-
Required parameter, if esxi_hostname is not set.
-
-
- esxi_hostname - -
- list - / elements=string -
-
- -
List of ESXi hostname to manage exception users.
-
Required parameter, if cluster_name is not set.
-
-
- exception_users - -
- list - / elements=string - / required -
-
- -
List of Lockdown Mode Exception Users.
-
To remove all Exception Users, state=set the empty list.
-
-
- 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
  • -
  • set
  • -
-
-
If present, make sure the given users are defined as Lockdown Mode Exception Users.
-
If absent, make sure the given users are NO Lockdown Mode Exception Users.
-
If set, will replace Lockdown Mode Exception Users defined list of users.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

cluster_name

+ +

+ string +

+
+

Name of cluster.

+

All host systems from given cluster used to manage exception users.

+

Required parameter, if esxi_hostname is not set.

+
+
+

esxi_hostname

+ +

+ list + / elements=string +

+
+

List of ESXi hostname to manage exception users.

+

Required parameter, if cluster_name is not set.

+
+
+

exception_users

+ +

+ list + / elements=string + / required +

+
+

List of Lockdown Mode Exception Users.

+

To remove all Exception Users, state=set the empty list.

+
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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 +

+
+

If present, make sure the given users are defined as Lockdown Mode Exception Users.

+

If absent, make sure the given users are NO Lockdown Mode Exception Users.

+

If set, will replace Lockdown Mode Exception Users defined list of users.

+

Choices:

+
    +
  • "present" ← (default)

  • +
  • "absent"

  • +
  • "set"

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -253,6 +247,7 @@ Examples .. code-block:: yaml + - name: Remove all Lockdown Mode Exception Users on a host community.vmware.vmware_host_lockdown: hostname: '{{ vcenter_hostname }}' @@ -265,44 +260,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- results - -
- dictionary -
-
always -
metadata about exception users of Host systems
-
-
Sample:
-
{'host_lockdown_exceptions': {'DC0_C0': {'current_exception_users': [], 'desired_exception_users': [], 'previous_exception_users': ['root']}}}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

results

+ +

+ dictionary +

+
+

metadata about exception users of Host systems

+

Returned: always

+

Sample: {"host_lockdown_exceptions": {"DC0_C0": {"current_exception_users": [], "desired_exception_users": [], "previous_exception_users": ["root"]}}}

+
+ + Authors ~~~~~~~ - Mario Lenz (@mariolenz) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_host_lockdown_module.rst b/docs/community.vmware.vmware_host_lockdown_module.rst index 97c6e45e2..1e2f9f6ea 100644 --- a/docs/community.vmware.vmware_host_lockdown_module.rst +++ b/docs/community.vmware.vmware_host_lockdown_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_host_lockdown_module: -************************************* -community.vmware.vmware_host_lockdown -************************************* +community.vmware.vmware_host_lockdown module -- Manage administrator permission for the local administrative account for the ESXi host +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Manage administrator permission for the local administrative account for the ESXi host** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_host_lockdown`. .. contents:: @@ -16,10 +17,15 @@ community.vmware.vmware_host_lockdown Synopsis -------- + - This module can be used to manage administrator permission for the local administrative account for the host when ESXi hostname is given. - All parameters and VMware objects values are case sensitive. - This module is destructive as administrator permission are managed using APIs used, please read options carefully and proceed. -- Please specify ``hostname`` as vCenter IP or hostname only, as lockdown operations are not possible from standalone ESXi server. +- Please specify \ :literal:`hostname`\ as vCenter IP or hostname only, as lockdown operations are not possible from standalone ESXi server. + + + + @@ -29,212 +35,202 @@ Parameters .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- cluster_name - -
- string -
-
- -
Name of cluster.
-
All host systems from given cluster used to manage lockdown.
-
Required parameter, if esxi_hostname is not set.
-
-
- esxi_hostname - -
- list - / elements=string -
-
- -
List of ESXi hostname to manage lockdown.
-
Required parameter, if cluster_name is not set.
-
See examples for specifications.
-
-
- 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: -
  • disabled
  • -
  • normal ←
  • -
  • strict
  • -
  • present
  • -
  • absent
  • -
-
-
State of hosts system
-
If set to disabled, all host systems will be removed from lockdown mode.
-
If host system is already out of lockdown mode and set to disabled, no action will be taken.
-
If set to normal, all host systems will be set in lockdown mode.
-
If host system is already in lockdown mode and set to normal, no action will be taken.
-
If set to strict, all host systems will be set in strict lockdown mode.
-
If host system is already in strict lockdown mode and set to strict, no action will be 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

cluster_name

+ +

+ string +

+
+

Name of cluster.

+

All host systems from given cluster used to manage lockdown.

+

Required parameter, if esxi_hostname is not set.

+
+
+

esxi_hostname

+ +

+ list + / elements=string +

+
+

List of ESXi hostname to manage lockdown.

+

Required parameter, if cluster_name is not set.

+

See examples for specifications.

+
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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 +

+
+

State of hosts system

+

If set to disabled, all host systems will be removed from lockdown mode.

+

If host system is already out of lockdown mode and set to disabled, no action will be taken.

+

If set to normal, all host systems will be set in lockdown mode.

+

If host system is already in lockdown mode and set to normal, no action will be taken.

+

If set to strict, all host systems will be set in strict lockdown mode.

+

If host system is already in strict lockdown mode and set to strict, no action will be taken.

+

Choices:

+
    +
  • "disabled"

  • +
  • "normal" ← (default)

  • +
  • "strict"

  • +
  • "present"

  • +
  • "absent"

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -242,6 +238,7 @@ Examples .. code-block:: yaml + - name: Enter host system into lockdown mode community.vmware.vmware_host_lockdown: hostname: '{{ vcenter_hostname }}' @@ -293,44 +290,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- results - -
- dictionary -
-
always -
metadata about state of Host system lock down
-
-
Sample:
-
{'host_lockdown_state': {'DC0_C0': {'current_state': 'normal', 'previous_state': 'disabled', 'desired_state': 'normal'}}}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

results

+ +

+ dictionary +

+
+

metadata about state of Host system lock down

+

Returned: always

+

Sample: {"host_lockdown_state": {"DC0_C0": {"current_state": "normal", "desired_state": "normal", "previous_state": "disabled"}}}

+
+ + Authors ~~~~~~~ - Abhijeet Kasurde (@Akasurde) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_host_logbundle_info_module.rst b/docs/community.vmware.vmware_host_logbundle_info_module.rst index 8d5ae6512..65a64f87f 100644 --- a/docs/community.vmware.vmware_host_logbundle_info_module.rst +++ b/docs/community.vmware.vmware_host_logbundle_info_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_host_logbundle_info_module: -******************************************* -community.vmware.vmware_host_logbundle_info -******************************************* +community.vmware.vmware_host_logbundle_info module -- Gathers manifest info for logbundle ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Gathers manifest info for logbundle** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_host_logbundle_info`. .. contents:: @@ -16,175 +17,172 @@ community.vmware.vmware_host_logbundle_info Synopsis -------- + - This module can be used to gather manifest information for logbundle from ESXi. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- esxi_hostname - -
- string - / required -
-
- -
Name of the host system to fetch the manifests for logbundle.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

esxi_hostname

+ +

+ string + / required +

+
+

Name of the host system to fetch the manifests for logbundle.

+
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -192,6 +190,7 @@ Examples .. code-block:: yaml + - name: fetch the manifests for logbundle from ESXi community.vmware.vmware_host_logbundle_info: hostname: "{{ vcenter_hostname }}" @@ -202,44 +201,55 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- manifests - -
- list -
-
always -
list of dictionary of manifest information for logbundle
-
-
Sample:
-
[{'enabled': 'true', 'group': 'System', 'id': 'System:Base', 'name': 'Base', 'vmOnly': 'false'}, {'enabled': 'false', 'group': 'System', 'id': 'System:BaseMinmal', 'name': 'BaseMinmal', 'vmOnly': 'false'}, {'enabled': 'true', 'group': 'Fcd', 'id': 'Fcd:Catalog', 'name': 'Catalog', 'vmOnly': 'false'}, {'enabled': 'false', 'group': 'VirtualMachines', 'id': 'VirtualMachines:CoreDumpHung', 'name': 'CoreDumpHung', 'vmOnly': 'true'}, {'enabled': 'true', 'group': 'System', 'id': 'System:CoreDumps', 'name': 'CoreDumps', 'vmOnly': 'false'}]
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

manifests

+ +

+ list + / elements=string +

+
+

list of dictionary of manifest information for logbundle

+

Returned: always

+

Sample: [{"enabled": "true", "group": "System", "id": "System:Base", "name": "Base", "vmOnly": "false"}, {"enabled": "false", "group": "System", "id": "System:BaseMinmal", "name": "BaseMinmal", "vmOnly": "false"}, {"enabled": "true", "group": "Fcd", "id": "Fcd:Catalog", "name": "Catalog", "vmOnly": "false"}, {"enabled": "false", "group": "VirtualMachines", "id": "VirtualMachines:CoreDumpHung", "name": "CoreDumpHung", "vmOnly": "true"}, {"enabled": "true", "group": "System", "id": "System:CoreDumps", "name": "CoreDumps", "vmOnly": "false"}]

+
+ + Authors ~~~~~~~ - sky-joker (@sky-joker) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_host_logbundle_module.rst b/docs/community.vmware.vmware_host_logbundle_module.rst index 1a5029e26..1afdd4a03 100644 --- a/docs/community.vmware.vmware_host_logbundle_module.rst +++ b/docs/community.vmware.vmware_host_logbundle_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_host_logbundle_module: -************************************** -community.vmware.vmware_host_logbundle -************************************** +community.vmware.vmware_host_logbundle module -- Fetch logbundle file from ESXi ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Fetch logbundle file from ESXi** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_host_logbundle`. .. contents:: @@ -16,259 +17,246 @@ community.vmware.vmware_host_logbundle Synopsis -------- + - This module can be used to fetch logbundle file from ESXi. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- dest - -
- string - / required -
-
- -
file destination on localhost, path must be exist.
-
-
- esxi_hostname - -
- string - / required -
-
- -
Name of the host system to fetch the logbundle.
-
-
- 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.
-
-
- manifests - -
- list - / elements=string -
-
- Default:
["System:Base", "System:CoreDumps", "System:EsxImage", "System:IOFilter", "System:LoadESX", "System:Modules", "System:RDMA", "System:ResourceGroups", "System:TPM", "System:VFlash", "System:VMTools", "System:VmiofPlugins", "System:ntp", "System:uwstats", "Fcd:Catalog", "VirtualMachines:CoreDumps", "VirtualMachines:VirtualMachineStats", "VirtualMachines:base", "VirtualMachines:base", "VirtualMachines:diskinfo", "VirtualMachines:logs", "Storage:FCoE", "Storage:Multipathing", "Storage:NAS", "Storage:VSAN", "Storage:VSANHealth", "Storage:VSANIscsiTarget", "Storage:VSANPerfStats", "Storage:VSANPerfSvc", "Storage:VSANTraces", "Storage:VVOL", "Storage:base", "Storage:iodm", "Storage:iscsi", "FeatureStateSwitch:FeatureStateSwitch", "Userworld:HostAgent", "Userworld:ProcessInformation", "Configuration:System", "Logs:System", "hostProfiles:SystemImageCacheHostProfile", "hostProfiles:hostProfiles", "FileSystem:VMFSDiskDump", "FileSystem:base", "ActiveDirectory:base", "CIM:base", "Hardware:base", "Hardware:usb", "Installer:base", "Network:base", "Network:dvs", "Network:lacp", "Network:nscd", "Network:tcpip", "IntegrityChecks:md5sums"]
-
-
Logs to include in the logbundle file.
-
Refer to the id key of the community.vmware.vmware_host_logbundle_info module for values that can be specified in the manifest.
-
-
- 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
-
-
- performance_data - -
- dictionary -
-
- -
Gather performance data for ESXi.
-
-
- duration - -
- integer -
-
- Default:
300
-
-
Duration for which performance data is gathered.
-
-
- interval - -
- integer -
-
- Default:
5
-
-
Interval for which performance data is gathered.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

dest

+ +

+ string + / required +

+
+

file destination on localhost, path must be exist.

+
+
+

esxi_hostname

+ +

+ string + / required +

+
+

Name of the host system to fetch the logbundle.

+
+
+

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.

+
+
+

manifests

+ +

+ list + / elements=string +

+
+

Logs to include in the logbundle file.

+

Refer to the id key of the community.vmware.vmware_host_logbundle_info module for values that can be specified in the manifest.

+

Default: ["System:Base", "System:CoreDumps", "System:EsxImage", "System:IOFilter", "System:LoadESX", "System:Modules", "System:RDMA", "System:ResourceGroups", "System:TPM", "System:VFlash", "System:VMTools", "System:VmiofPlugins", "System:ntp", "System:uwstats", "Fcd:Catalog", "VirtualMachines:CoreDumps", "VirtualMachines:VirtualMachineStats", "VirtualMachines:base", "VirtualMachines:base", "VirtualMachines:diskinfo", "VirtualMachines:logs", "Storage:FCoE", "Storage:Multipathing", "Storage:NAS", "Storage:VSAN", "Storage:VSANHealth", "Storage:VSANIscsiTarget", "Storage:VSANPerfStats", "Storage:VSANPerfSvc", "Storage:VSANTraces", "Storage:VVOL", "Storage:base", "Storage:iodm", "Storage:iscsi", "FeatureStateSwitch:FeatureStateSwitch", "Userworld:HostAgent", "Userworld:ProcessInformation", "Configuration:System", "Logs:System", "hostProfiles:SystemImageCacheHostProfile", "hostProfiles:hostProfiles", "FileSystem:VMFSDiskDump", "FileSystem:base", "ActiveDirectory:base", "CIM:base", "Hardware:base", "Hardware:usb", "Installer:base", "Network:base", "Network:dvs", "Network:lacp", "Network:nscd", "Network:tcpip", "IntegrityChecks:md5sums"]

+
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

performance_data

+ +

+ dictionary +

+
+

Gather performance data for ESXi.

+
+
+

duration

+ +

+ integer +

+
+

Duration for which performance data is gathered.

+

Default: 300

+
+
+

interval

+ +

+ integer +

+
+

Interval for which performance data is gathered.

+

Default: 5

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -276,6 +264,7 @@ Examples .. code-block:: yaml + - name: fetch logbundle file from ESXi community.vmware.vmware_host_logbundle: hostname: "{{ vcenter_hostname }}" @@ -297,44 +286,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- dest - -
- string -
-
on success -
saved path of a logbundle file for ESXi
-
-
Sample:
-
{'changed': True, 'dest': './esxi-log.tgz', 'failed': False, 'gid': 0, 'group': 'root', 'mode': '0644', 'owner': 'root', 'size': 25783140, 'state': 'file', 'uid': 0}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

dest

+ +

+ string +

+
+

saved path of a logbundle file for ESXi

+

Returned: on success

+

Sample: "{'changed': True, 'dest': './esxi-log.tgz', 'failed': False, 'gid': 0, 'group': 'root', 'mode': '0644', 'owner': 'root', 'size': 25783140, 'state': 'file', 'uid': 0}"

+
+ + Authors ~~~~~~~ - sky-joker (@sky-joker) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_host_module.rst b/docs/community.vmware.vmware_host_module.rst index ab28301e7..b3af74d59 100644 --- a/docs/community.vmware.vmware_host_module.rst +++ b/docs/community.vmware.vmware_host_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_host_module: -**************************** -community.vmware.vmware_host -**************************** +community.vmware.vmware_host module -- Add, remove, or move an ESXi host to, from, or within vCenter +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Add, remove, or move an ESXi host to, from, or within vCenter** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_host`. .. contents:: @@ -16,403 +17,392 @@ community.vmware.vmware_host Synopsis -------- + - This module can be used to add, reconnect, or remove an ESXi host to or from vCenter. - This module can also be used to move an ESXi host to a cluster or folder, or vice versa, within the same datacenter. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- add_connected - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
If set to true, then the host should be connected as soon as it is added.
-
This parameter is ignored if state is set to a value other than present.
-
-
- cluster_name - -
- string -
-
- -
Name of the cluster to add the host.
-
If folder is not set, then this parameter is required.
-
Aliases added in version 2.6.
-

aliases: cluster
-
-
- datacenter_name - -
- string - / required -
-
- -
Name of the datacenter to add the host.
-
Aliases added in version 2.6.
-

aliases: datacenter
-
-
- esxi_hostname - -
- string - / required -
-
- -
ESXi hostname to manage.
-
-
- esxi_password - -
- string -
-
- -
ESXi password.
-
Required for adding a host.
-
Optional for reconnect.
-
Unused for removing.
-
No longer a required parameter from version 2.5.
-
-
- esxi_ssl_thumbprint - -
- string -
-
- Default:
""
-
-
Specifying the hostsystem certificate's thumbprint.
-
Use following command to get hostsystem certificate's thumbprint -
-
# openssl x509 -in /etc/vmware/ssl/rui.crt -fingerprint -sha1 -noout
-
Only used if fetch_thumbprint isn't set to true.
-

aliases: ssl_thumbprint
-
-
- esxi_username - -
- string -
-
- -
ESXi username.
-
Required for adding a host.
-
Optional for reconnect. If both esxi_username and esxi_password are used
-
Unused for removing.
-
No longer a required parameter from version 2.5.
-
-
- fetch_ssl_thumbprint - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Fetch the thumbprint of the host's SSL certificate.
-
This basically disables the host certificate verification (check if it was signed by a recognized CA).
-
Disable this option if you want to allow only hosts with valid certificates to be added to vCenter.
-
If this option is set to false and the certificate can't be verified, an add or reconnect will fail.
-
Unused when esxi_ssl_thumbprint is set.
-
Optional for reconnect, but only used if esxi_username and esxi_password are used.
-
Unused for removing.
-
-
- folder - -
- string -
-
- -
Name of the folder under which host to add.
-
If cluster_name is not set, then this parameter is required.
-
For example, if there is a datacenter 'dc1' under folder called 'Site1' then, this value will be '/Site1/dc1/host'.
-
Here 'host' is an invisible folder under VMware Web Client.
-
Another example, if there is a nested folder structure like '/myhosts/india/pune' under datacenter 'dc2', then folder value will be '/dc2/host/myhosts/india/pune'.
-
Other Examples: '/Site2/dc2/Asia-Cluster/host' or '/dc3/Asia-Cluster/host'
-

aliases: folder_name
-
-
- force_connection - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Force the connection if the host is already being managed by another vCenter server.
-
-
- 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.
-
-
- reconnect_disconnected - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Reconnect disconnected hosts.
-
This is only used if state is set to present and if the host already exists.
-
-
- state - -
- string -
-
-
    Choices: -
  • present ←
  • -
  • absent
  • -
  • add_or_reconnect
  • -
  • reconnect
  • -
  • disconnected
  • -
-
-
If set to present, add the host if host is absent.
-
If set to present, update the location of the host if host already exists.
-
If set to absent, remove the host if host is present.
-
If set to absent, do nothing if host already does not exists.
-
If set to add_or_reconnect, add the host if it's absent else reconnect it and update the location.
-
If set to reconnect, then reconnect the host if it's present and update the location.
-
If set to disconnected, disconnect the host if the host already exists.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

add_connected

+ +

+ boolean +

+
+

If set to true, then the host should be connected as soon as it is added.

+

This parameter is ignored if state is set to a value other than present.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+
+

cluster_name

+ +

aliases: cluster

+

+ string +

+
+

Name of the cluster to add the host.

+

If folder is not set, then this parameter is required.

+

Aliases added in version 2.6.

+
+
+
+

datacenter_name

+ +

aliases: datacenter

+

+ string + / required +

+
+

Name of the datacenter to add the host.

+

Aliases added in version 2.6.

+
+
+

esxi_hostname

+ +

+ string + / required +

+
+

ESXi hostname to manage.

+
+
+

esxi_password

+ +

+ string +

+
+

ESXi password.

+

Required for adding a host.

+

Optional for reconnect.

+

Unused for removing.

+

No longer a required parameter from version 2.5.

+
+
+
+

esxi_ssl_thumbprint

+ +

aliases: ssl_thumbprint

+

+ string +

+
+

Specifying the hostsystem certificate's thumbprint.

+

Use following command to get hostsystem certificate's thumbprint -

+

# openssl x509 -in /etc/vmware/ssl/rui.crt -fingerprint -sha1 -noout

+

Only used if fetch_thumbprint isn't set to true.

+

Default: ""

+
+
+

esxi_username

+ +

+ string +

+
+

ESXi username.

+

Required for adding a host.

+

Optional for reconnect. If both esxi_username and esxi_password are used

+

Unused for removing.

+

No longer a required parameter from version 2.5.

+
+
+

fetch_ssl_thumbprint

+ +

+ boolean +

+
+

Fetch the thumbprint of the host's SSL certificate.

+

This basically disables the host certificate verification (check if it was signed by a recognized CA).

+

Disable this option if you want to allow only hosts with valid certificates to be added to vCenter.

+

If this option is set to false and the certificate can't be verified, an add or reconnect will fail.

+

Unused when esxi_ssl_thumbprint is set.

+

Optional for reconnect, but only used if esxi_username and esxi_password are used.

+

Unused for removing.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+
+

folder

+ +

aliases: folder_name

+

+ string +

+
+

Name of the folder under which host to add.

+

If cluster_name is not set, then this parameter is required.

+

For example, if there is a datacenter 'dc1' under folder called 'Site1' then, this value will be '/Site1/dc1/host'.

+

Here 'host' is an invisible folder under VMware Web Client.

+

Another example, if there is a nested folder structure like '/myhosts/india/pune' under datacenter 'dc2', then folder value will be '/dc2/host/myhosts/india/pune'.

+

Other Examples: '/Site2/dc2/Asia-Cluster/host' or '/dc3/Asia-Cluster/host'

+
+
+

force_connection

+ +

+ boolean +

+
+

Force the connection if the host is already being managed by another vCenter server.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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.

+
+
+

reconnect_disconnected

+ +

+ boolean +

+
+

Reconnect disconnected hosts.

+

This is only used if state is set to present and if the host already exists.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

state

+ +

+ string +

+
+

If set to present, add the host if host is absent.

+

If set to present, update the location of the host if host already exists.

+

If set to absent, remove the host if host is present.

+

If set to absent, do nothing if host already does not exists.

+

If set to add_or_reconnect, add the host if it's absent else reconnect it and update the location.

+

If set to reconnect, then reconnect the host if it's present and update the location.

+

If set to disconnected, disconnect the host if the host already exists.

+

Choices:

+
    +
  • "present" ← (default)

  • +
  • "absent"

  • +
  • "add_or_reconnect"

  • +
  • "reconnect"

  • +
  • "disconnected"

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -420,6 +410,7 @@ Examples .. code-block:: yaml + - name: Add ESXi Host to vCenter community.vmware.vmware_host: hostname: '{{ vcenter_hostname }}' @@ -487,41 +478,41 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- result - -
- string -
-
on successful addition -
metadata about the new host system added
-
-
Sample:
-
Host already connected to vCenter 'vcenter01' in cluster 'cluster01'
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

result

+ +

+ string +

+
+

metadata about the new host system added

+

Returned: on successful addition

+

Sample: "Host already connected to vCenter 'vcenter01' in cluster 'cluster01'"

+
+ + Authors @@ -531,3 +522,13 @@ Authors - Russell Teague (@mtnbikenc) - Maxime de Roucy (@tchernomax) - Christian Kotte (@ckotte) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_host_ntp_info_module.rst b/docs/community.vmware.vmware_host_ntp_info_module.rst index b4cf2be1e..9bd5ab5a2 100644 --- a/docs/community.vmware.vmware_host_ntp_info_module.rst +++ b/docs/community.vmware.vmware_host_ntp_info_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_host_ntp_info_module: -************************************* -community.vmware.vmware_host_ntp_info -************************************* +community.vmware.vmware_host_ntp_info module -- Gathers info about NTP configuration on an ESXi host +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Gathers info about NTP configuration on an ESXi host** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_host_ntp_info`. .. contents:: @@ -16,193 +17,188 @@ community.vmware.vmware_host_ntp_info Synopsis -------- + - This module can be used to gather information about NTP configurations on an ESXi host. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- cluster_name - -
- string -
-
- -
Name of the cluster.
-
NTP config information about each ESXi server will be returned for the given cluster.
-
If esxi_hostname is not given, this parameter is required.
-
-
- esxi_hostname - -
- string -
-
- -
ESXi hostname.
-
NTP config information about this ESXi server will be returned.
-
If cluster_name is not given, this parameter is required.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

cluster_name

+ +

+ string +

+
+

Name of the cluster.

+

NTP config information about each ESXi server will be returned for the given cluster.

+

If esxi_hostname is not given, this parameter is required.

+
+
+

esxi_hostname

+ +

+ string +

+
+

ESXi hostname.

+

NTP config information about this ESXi server will be returned.

+

If cluster_name is not given, this parameter is required.

+
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -210,6 +206,7 @@ Examples .. code-block:: yaml + - name: Gather NTP info about all ESXi Host in the given Cluster community.vmware.vmware_host_ntp_info: hostname: '{{ vcenter_hostname }}' @@ -230,44 +227,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- hosts_ntp_info - -
- dictionary -
-
hosts_ntp_info -
dict with hostname as key and dict with NTP infos as value
-
-
Sample:
-
{'10.76.33.226': [{'ntp_servers': [], 'time_zone_description': 'UTC', 'time_zone_gmt_offset': 0, 'time_zone_identifier': 'UTC', 'time_zone_name': 'UTC'}]}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

hosts_ntp_info

+ +

+ dictionary +

+
+

dict with hostname as key and dict with NTP infos as value

+

Returned: hosts_ntp_info

+

Sample: {"10.76.33.226": [{"ntp_servers": [], "time_zone_description": "UTC", "time_zone_gmt_offset": 0, "time_zone_identifier": "UTC", "time_zone_name": "UTC"}]}

+
+ + Authors ~~~~~~~ - Abhijeet Kasurde (@Akasurde) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_host_ntp_module.rst b/docs/community.vmware.vmware_host_ntp_module.rst index 132900ead..64de20664 100644 --- a/docs/community.vmware.vmware_host_ntp_module.rst +++ b/docs/community.vmware.vmware_host_ntp_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_host_ntp_module: -******************************** -community.vmware.vmware_host_ntp -******************************** +community.vmware.vmware_host_ntp module -- Manage NTP server configuration of an ESXi host +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Manage NTP server configuration of an ESXi host** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_host_ntp`. .. contents:: @@ -16,252 +17,245 @@ community.vmware.vmware_host_ntp Synopsis -------- + - This module can be used to configure, add or remove NTP servers from an ESXi host. -- If ``state`` is not given, the NTP servers will be configured in the exact sequence. +- If \ :literal:`state`\ is not given, the NTP servers will be configured in the exact sequence. - User can specify an ESXi hostname or Cluster name. In case of cluster name, all ESXi hosts are updated. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- cluster_name - -
- string -
-
- -
Name of the cluster from which all host systems will be used.
-
This parameter is required if esxi_hostname is not specified.
-
-
- esxi_hostname - -
- string -
-
- -
Name of the host system to work with.
-
This parameter is required if cluster_name is not specified.
-
-
- 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.
-
-
- ntp_servers - -
- list - / elements=string - / required -
-
- -
IP or FQDN of NTP server(s).
-
This accepts a list of NTP servers. For multiple servers, please look at the examples.
-
-
- 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
  • -
-
-
present: Add NTP server(s), if specified server(s) are absent else do nothing.
-
absent: Remove NTP server(s), if specified server(s) are present else do nothing.
-
Specified NTP server(s) will be configured if state isn't specified.
-
-
- 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.
-
-
- verbose - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Verbose output of the configuration change.
-
Explains if an NTP server was added, removed, or if the NTP server sequence was changed.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

cluster_name

+ +

+ string +

+
+

Name of the cluster from which all host systems will be used.

+

This parameter is required if esxi_hostname is not specified.

+
+
+

esxi_hostname

+ +

+ string +

+
+

Name of the host system to work with.

+

This parameter is required if cluster_name is not specified.

+
+
+

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.

+
+
+

ntp_servers

+ +

+ list + / elements=string + / required +

+
+

IP or FQDN of NTP server(s).

+

This accepts a list of NTP servers. For multiple servers, please look at the examples.

+
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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 +

+
+

present: Add NTP server(s), if specified server(s) are absent else do nothing.

+

absent: Remove NTP server(s), if specified server(s) are present else do nothing.

+

Specified NTP server(s) will be configured if state isn't specified.

+

Choices:

+
    +
  • "present"

  • +
  • "absent"

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

verbose

+ +

+ boolean +

+
+

Verbose output of the configuration change.

+

Explains if an NTP server was added, removed, or if the NTP server sequence was changed.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -269,6 +263,7 @@ Examples .. code-block:: yaml + - name: Configure NTP servers for an ESXi Host community.vmware.vmware_host_ntp: hostname: vcenter01.example.local @@ -317,41 +312,41 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- host_ntp_status - -
- dictionary -
-
always -
metadata about host system's NTP configuration
-
-
Sample:
-
{'esx01.example.local': {'ntp_servers_changed': ['time1.example.local', 'time2.example.local', 'time3.example.local', 'time4.example.local'], 'ntp_servers': ['time3.example.local', 'time4.example.local'], 'ntp_servers_previous': ['time1.example.local', 'time2.example.local']}, 'esx02.example.local': {'ntp_servers_changed': ['time3.example.local'], 'ntp_servers_current': ['time1.example.local', 'time2.example.local', 'time3.example.local'], 'state': 'present', 'ntp_servers_previous': ['time1.example.local', 'time2.example.local']}}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

host_ntp_status

+ +

+ dictionary +

+
+

metadata about host system's NTP configuration

+

Returned: always

+

Sample: {"esx01.example.local": {"ntp_servers": ["time3.example.local", "time4.example.local"], "ntp_servers_changed": ["time1.example.local", "time2.example.local", "time3.example.local", "time4.example.local"], "ntp_servers_previous": ["time1.example.local", "time2.example.local"]}, "esx02.example.local": {"ntp_servers_changed": ["time3.example.local"], "ntp_servers_current": ["time1.example.local", "time2.example.local", "time3.example.local"], "ntp_servers_previous": ["time1.example.local", "time2.example.local"], "state": "present"}}

+
+ + Authors @@ -359,3 +354,13 @@ Authors - Abhijeet Kasurde (@Akasurde) - Christian Kotte (@ckotte) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_host_package_info_module.rst b/docs/community.vmware.vmware_host_package_info_module.rst index da4c8ba6d..8f929efca 100644 --- a/docs/community.vmware.vmware_host_package_info_module.rst +++ b/docs/community.vmware.vmware_host_package_info_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_host_package_info_module: -***************************************** -community.vmware.vmware_host_package_info -***************************************** +community.vmware.vmware_host_package_info module -- Gathers info about available packages on an ESXi host ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Gathers info about available packages on an ESXi host** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_host_package_info`. .. contents:: @@ -16,193 +17,188 @@ community.vmware.vmware_host_package_info Synopsis -------- + - This module can be used to gather information about available packages and their status on an ESXi host. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- cluster_name - -
- string -
-
- -
Name of the cluster.
-
Package information about each ESXi server will be returned for given cluster.
-
If esxi_hostname is not given, this parameter is required.
-
-
- esxi_hostname - -
- string -
-
- -
ESXi hostname.
-
Package information about this ESXi server will be returned.
-
If cluster_name is not given, this parameter is required.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

cluster_name

+ +

+ string +

+
+

Name of the cluster.

+

Package information about each ESXi server will be returned for given cluster.

+

If esxi_hostname is not given, this parameter is required.

+
+
+

esxi_hostname

+ +

+ string +

+
+

ESXi hostname.

+

Package information about this ESXi server will be returned.

+

If cluster_name is not given, this parameter is required.

+
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -210,6 +206,7 @@ Examples .. code-block:: yaml + - name: Gather info about all ESXi Host in given Cluster community.vmware.vmware_host_package_info: hostname: '{{ vcenter_hostname }}' @@ -230,44 +227,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- hosts_package_info - -
- dictionary -
-
hosts_package_info -
dict with hostname as key and dict with package information as value
-
-
Sample:
-
{'hosts_package_info': {'localhost.localdomain': []}}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

hosts_package_info

+ +

+ dictionary +

+
+

dict with hostname as key and dict with package information as value

+

Returned: hosts_package_info

+

Sample: {"hosts_package_info": {"localhost.localdomain": []}}

+
+ + Authors ~~~~~~~ - Abhijeet Kasurde (@Akasurde) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_host_passthrough_module.rst b/docs/community.vmware.vmware_host_passthrough_module.rst index 915ec57ea..086ba8b82 100644 --- a/docs/community.vmware.vmware_host_passthrough_module.rst +++ b/docs/community.vmware.vmware_host_passthrough_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_host_passthrough_module: -**************************************** -community.vmware.vmware_host_passthrough -**************************************** +community.vmware.vmware_host_passthrough module -- Manage PCI device passthrough settings on host ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Manage PCI device passthrough settings on host** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_host_passthrough`. .. contents:: @@ -16,249 +17,243 @@ community.vmware.vmware_host_passthrough Synopsis -------- + - This module can be managed PCI device passthrough settings on host. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- cluster - -
- string -
-
- -
Name of the cluster from which all host systems will be used.
-
This parameter is required if esxi_hostname is not specified.
-

aliases: cluster_name
-
-
- devices - -
- list - / elements=dictionary - / required -
-
- -
List of PCI device name or id.
-
-
- device - -
- string -
-
- -
Name of PCI device to enable passthrough.
-

aliases: name, device_name
-
-
- esxi_hostname - -
- string -
-
- -
Name of the host system to work with.
-
This parameter is required if cluster_name is not specified.
-
User can specify specific host from the cluster.
-
-
- 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
  • -
-
-
If state=present, passthrough of PCI device will be enabled.
-
If state=absent, passthrough of PCI device will be disabled.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+
+

cluster

+ +

aliases: cluster_name

+

+ string +

+
+

Name of the cluster from which all host systems will be used.

+

This parameter is required if esxi_hostname is not specified.

+
+
+

devices

+ +

+ list + / elements=dictionary + / required +

+
+

List of PCI device name or id.

+
+
+
+
+

device

+ +

aliases: name, device_name

+

+ string +

+
+

Name of PCI device to enable passthrough.

+
+
+

esxi_hostname

+ +

+ string +

+
+

Name of the host system to work with.

+

This parameter is required if cluster_name is not specified.

+

User can specify specific host from the cluster.

+
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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 +

+
+

If state=present, passthrough of PCI device will be enabled.

+

If state=absent, passthrough of PCI device will be disabled.

+

Choices:

+
    +
  • "present" ← (default)

  • +
  • "absent"

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - Supports ``check_mode``. - - All modules requires API write access and hence is not supported on a free ESXi license. - +- Supports \ :literal:`check\_mode`\ . +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -266,6 +261,7 @@ Examples .. code-block:: yaml + - name: Enable PCI device passthrough against the whole ESXi in a cluster community.vmware.vmware_host_passthrough: hostname: "{{ vcenter_hostname }}" @@ -313,64 +309,55 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- passthrough_configs - -
- list - / elements=dictionary -
-
changed -
list of that PCI devices have been enabled passthrough for each host system.
-
-
Sample:
-
[ - { - "esxi-01.example.com": [ - { - "device_id": "0000:03:00.0", - "device_name": "Dual Band Wireless AC 3165", - "passthruEnabled": true - } - ] - }, - { - "esxi-02.example.com": [ - { - "device_id": "0000:03:00.0", - "device_name": "Dual Band Wireless AC 3165", - "passthruEnabled": true - } - ] - } - ]
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

passthrough_configs

+ +

+ list + / elements=dictionary +

+
+

list of that PCI devices have been enabled passthrough for each host system.

+

Returned: changed

+

Sample: "[\n {\n \"esxi-01.example.com\": [\n {\n \"device_id\": \"0000:03:00.0\",\n \"device_name\": \"Dual Band Wireless AC 3165\",\n \"passthruEnabled\": true\n }\n ]\n },\n {\n \"esxi-02.example.com\": [\n {\n \"device_id\": \"0000:03:00.0\",\n \"device_name\": \"Dual Band Wireless AC 3165\",\n \"passthruEnabled\": true\n }\n ]\n }\n]"

+
+ + Authors ~~~~~~~ - sky-joker (@sky-joker) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_host_powermgmt_policy_module.rst b/docs/community.vmware.vmware_host_powermgmt_policy_module.rst index 58bb2c51c..3dc121805 100644 --- a/docs/community.vmware.vmware_host_powermgmt_policy_module.rst +++ b/docs/community.vmware.vmware_host_powermgmt_policy_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_host_powermgmt_policy_module: -********************************************* -community.vmware.vmware_host_powermgmt_policy -********************************************* +community.vmware.vmware_host_powermgmt_policy module -- Manages the Power Management Policy of an ESXI host system +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Manages the Power Management Policy of an ESXI host system** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_host_powermgmt_policy`. .. contents:: @@ -16,212 +17,207 @@ community.vmware.vmware_host_powermgmt_policy Synopsis -------- + - This module can be used to manage the Power Management Policy of ESXi host systems in given vCenter infrastructure. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- cluster_name - -
- string -
-
- -
Name of the cluster from which all host systems will be used.
-
This is required parameter if esxi_hostname is not specified.
-
-
- esxi_hostname - -
- string -
-
- -
Name of the host system to work with.
-
This is required parameter if cluster_name is not specified.
-
-
- 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
-
-
- policy - -
- string -
-
-
    Choices: -
  • high-performance
  • -
  • balanced ←
  • -
  • low-power
  • -
  • custom
  • -
-
-
Set the Power Management Policy of the host system.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

cluster_name

+ +

+ string +

+
+

Name of the cluster from which all host systems will be used.

+

This is required parameter if esxi_hostname is not specified.

+
+
+

esxi_hostname

+ +

+ string +

+
+

Name of the host system to work with.

+

This is required parameter if cluster_name is not specified.

+
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

policy

+ +

+ string +

+
+

Set the Power Management Policy of the host system.

+

Choices:

+
    +
  • "high-performance"

  • +
  • "balanced" ← (default)

  • +
  • "low-power"

  • +
  • "custom"

  • +
+ +
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -229,6 +225,7 @@ Examples .. code-block:: yaml + - name: Set the Power Management Policy of a host system to high-performance community.vmware.vmware_host_powermgmt_policy: hostname: '{{ vcenter_hostname }}' @@ -249,44 +246,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- result - -
- dictionary -
-
always -
metadata about host system's Power Management Policy
-
-
Sample:
-
{'changed': True, 'result': {'esxi01': {'changed': True, 'current_state': 'high-performance', 'desired_state': 'high-performance', 'msg': 'Power policy changed', 'previous_state': 'balanced'}}}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

result

+ +

+ dictionary +

+
+

metadata about host system's Power Management Policy

+

Returned: always

+

Sample: {"changed": true, "result": {"esxi01": {"changed": true, "current_state": "high-performance", "desired_state": "high-performance", "msg": "Power policy changed", "previous_state": "balanced"}}}

+
+ + Authors ~~~~~~~ -- Christian Kotte (@ckotte) +- Christian Kotte (@ckotte) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_host_powerstate_module.rst b/docs/community.vmware.vmware_host_powerstate_module.rst index 7d7773af8..505cdea51 100644 --- a/docs/community.vmware.vmware_host_powerstate_module.rst +++ b/docs/community.vmware.vmware_host_powerstate_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_host_powerstate_module: -*************************************** -community.vmware.vmware_host_powerstate -*************************************** +community.vmware.vmware_host_powerstate module -- Manages power states of host systems in vCenter ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Manages power states of host systems in vCenter** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_host_powerstate`. .. contents:: @@ -16,6 +17,7 @@ community.vmware.vmware_host_powerstate Synopsis -------- + - This module can be used to manage power states of host systems in given vCenter infrastructure. - User can set power state to 'power-down-to-standby', 'power-up-from-standby', 'shutdown-host' and 'reboot-host'. - State 'reboot-host', 'shutdown-host' and 'power-down-to-standby' are not supported by all the host systems. @@ -23,248 +25,240 @@ Synopsis + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- cluster_name - -
- string -
-
- -
Name of the cluster from which all host systems will be used.
-
This is required parameter if esxi_hostname is not specified.
-
-
- esxi_hostname - -
- string -
-
- -
Name of the host system to work with.
-
This is required parameter if cluster_name is not specified.
-
-
- force - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
This parameter specify if the host should be proceeding with user defined powerstate regardless of whether it is in maintenance mode.
-
If state set to reboot-host and force as true, then host system is rebooted regardless of whether it is in maintenance mode.
-
If state set to shutdown-host and force as true, then host system is shutdown regardless of whether it is in maintenance mode.
-
If state set to power-down-to-standby and force to true, then all powered off VMs will evacuated.
-
Not applicable if state set to power-up-from-standby.
-
-
- 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: -
  • power-down-to-standby
  • -
  • power-up-from-standby
  • -
  • shutdown-host ←
  • -
  • reboot-host
  • -
-
-
Set the state of the host system.
-
-
- timeout - -
- integer -
-
- Default:
600
-
-
This parameter defines timeout for state set to power-down-to-standby or power-up-from-standby.
-
Ignored if state set to reboot-host or shutdown-host.
-
This parameter is defined in seconds.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

cluster_name

+ +

+ string +

+
+

Name of the cluster from which all host systems will be used.

+

This is required parameter if esxi_hostname is not specified.

+
+
+

esxi_hostname

+ +

+ string +

+
+

Name of the host system to work with.

+

This is required parameter if cluster_name is not specified.

+
+
+

force

+ +

+ boolean +

+
+

This parameter specify if the host should be proceeding with user defined powerstate regardless of whether it is in maintenance mode.

+

If state set to reboot-host and force as true, then host system is rebooted regardless of whether it is in maintenance mode.

+

If state set to shutdown-host and force as true, then host system is shutdown regardless of whether it is in maintenance mode.

+

If state set to power-down-to-standby and force to true, then all powered off VMs will evacuated.

+

Not applicable if state set to power-up-from-standby.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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 +

+
+

Set the state of the host system.

+

Choices:

+
    +
  • "power-down-to-standby"

  • +
  • "power-up-from-standby"

  • +
  • "shutdown-host" ← (default)

  • +
  • "reboot-host"

  • +
+ +
+
+

timeout

+ +

+ integer +

+
+

This parameter defines timeout for state set to power-down-to-standby or power-up-from-standby.

+

Ignored if state set to reboot-host or shutdown-host.

+

This parameter is defined in seconds.

+

Default: 600

+
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -272,6 +266,7 @@ Examples .. code-block:: yaml + - name: Set the state of a host system to reboot community.vmware.vmware_host_powerstate: hostname: '{{ vcenter_hostname }}' @@ -304,44 +299,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- result - -
- dictionary -
-
always -
metadata about host system's state
-
-
Sample:
-
{'esxi01': {'msg': "power down 'esxi01' to standby", 'error': ''}}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

result

+ +

+ dictionary +

+
+

metadata about host system's state

+

Returned: always

+

Sample: {"esxi01": {"error": "", "msg": "power down 'esxi01' to standby"}}

+
+ + Authors ~~~~~~~ - Abhijeet Kasurde (@Akasurde) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_host_scanhba_module.rst b/docs/community.vmware.vmware_host_scanhba_module.rst index 86e02a024..bb5d09565 100644 --- a/docs/community.vmware.vmware_host_scanhba_module.rst +++ b/docs/community.vmware.vmware_host_scanhba_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_host_scanhba_module: -************************************ -community.vmware.vmware_host_scanhba -************************************ +community.vmware.vmware_host_scanhba module -- Rescan host HBA's and optionally refresh the storage system +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Rescan host HBA's and optionally refresh the storage system** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_host_scanhba`. .. contents:: @@ -16,11 +17,16 @@ community.vmware.vmware_host_scanhba Synopsis -------- + - This module can force a rescan of the hosts HBA subsystem which is needed when wanting to mount a new datastore. -- You could use this before using :ref:`community.vmware.vmware_host_datastore ` to mount a new datastore to ensure your device/volume is ready. +- You could use this before using \ `community.vmware.vmware\_host\_datastore `__\ to mount a new datastore to ensure your device/volume is ready. - You can also optionally force a Refresh of the Storage System in vCenter/ESXi Web Client. - All parameters and VMware object names are case sensitive. -- You can supply an esxi_hostname or a cluster_name +- You can supply an esxi\_hostname or a cluster\_name + + + + @@ -30,236 +36,226 @@ Parameters .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- cluster_name - -
- string -
-
- -
Cluster name to Rescan the storage subsystem on (this will run the rescan task on each host in the cluster).
-
-
- esxi_hostname - -
- string -
-
- -
ESXi hostname to Rescan the storage subsystem on.
-
-
- 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.
-
-
- refresh_storage - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Refresh the storage system in vCenter/ESXi Web Client for each host found
-
-
- rescan_hba - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Rescan all host bus adapters for new storage devices. Rescanning all adapters can be slow.
-
-
- rescan_vmfs - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Rescan all known storage devices for new VMFS volumes.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

cluster_name

+ +

+ string +

+
+

Cluster name to Rescan the storage subsystem on (this will run the rescan task on each host in the cluster).

+
+
+

esxi_hostname

+ +

+ string +

+
+

ESXi hostname to Rescan the storage subsystem on.

+
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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.

+
+
+

refresh_storage

+ +

+ boolean +

+
+

Refresh the storage system in vCenter/ESXi Web Client for each host found

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

rescan_hba

+ +

+ boolean +

+
+

Rescan all host bus adapters for new storage devices. Rescanning all adapters can be slow.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

rescan_vmfs

+ +

+ boolean +

+
+

Rescan all known storage devices for new VMFS volumes.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -267,7 +263,8 @@ Examples .. code-block:: yaml - - name: Recan HBA's for a given ESXi host and refresh storage system objects + + - name: Rescan HBA's for a given ESXi host and refresh storage system objects community.vmware.vmware_host_scanhba: hostname: '{{ vcenter_hostname }}' username: '{{ vcenter_username }}' @@ -295,7 +292,7 @@ Examples rescan_hba: false delegate_to: localhost - - name: Recan HBA's for a given ESXi host and don't refresh storage system objects + - name: Rescan HBA's for a given ESXi host and don't refresh storage system objects community.vmware.vmware_host_scanhba: hostname: '{{ vcenter_hostname }}' username: '{{ vcenter_username }}' @@ -305,44 +302,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- result - -
- dictionary -
-
always -
return confirmation of requested host and updated / refreshed storage system
-
-
Sample:
-
{'esxi01.example.com': {'rescaned_hba': 'true', 'refreshed_storage': 'true', 'rescaned_vmfs': 'true'}}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

result

+ +

+ dictionary +

+
+

return confirmation of requested host and updated / refreshed storage system

+

Returned: always

+

Sample: {"esxi01.example.com": {"refreshed_storage": "true", "rescaned_hba": "true", "rescaned_vmfs": "true"}}

+
+ + Authors ~~~~~~~ - Michael Eaton (@michaeldeaton) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_host_scsidisk_info_module.rst b/docs/community.vmware.vmware_host_scsidisk_info_module.rst index b0162cb79..0afa28e22 100644 --- a/docs/community.vmware.vmware_host_scsidisk_info_module.rst +++ b/docs/community.vmware.vmware_host_scsidisk_info_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_host_scsidisk_info_module: -****************************************** -community.vmware.vmware_host_scsidisk_info -****************************************** +community.vmware.vmware_host_scsidisk_info module -- Gather information about SCSI disk attached to the given ESXi +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Gather information about SCSI disk attached to the given ESXi** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_host_scsidisk_info`. .. contents:: @@ -16,193 +17,188 @@ community.vmware.vmware_host_scsidisk_info Synopsis -------- + - This module can be used to gather information about SCSI disk attached to the given ESXi. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- cluster_name - -
- string -
-
- -
Name of the cluster from which all host systems will be used.
-
SCSI disk information about each ESXi server will be returned for the given cluster.
-
This parameter is required if esxi_hostname is not specified.
-
-
- esxi_hostname - -
- string -
-
- -
Name of the host system to work with.
-
SCSI disk information about this ESXi server will be returned.
-
This parameter is required if cluster_name is not specified.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

cluster_name

+ +

+ string +

+
+

Name of the cluster from which all host systems will be used.

+

SCSI disk information about each ESXi server will be returned for the given cluster.

+

This parameter is required if esxi_hostname is not specified.

+
+
+

esxi_hostname

+ +

+ string +

+
+

Name of the host system to work with.

+

SCSI disk information about this ESXi server will be returned.

+

This parameter is required if cluster_name is not specified.

+
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -210,6 +206,7 @@ Examples .. code-block:: yaml + - name: Gather information SCSI disk attached to the given ESXi community.vmware.vmware_host_scsidisk_info: hostname: '{{ vcenter_hostname }}' @@ -228,44 +225,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- hosts_scsidisk_info - -
- dictionary -
-
always -
metadata about host system SCSI disk information
-
-
Sample:
-
{'10.65.201.106': [{'block': 41943040, 'block_size': 512, 'canonical_name': 't10.ATA_QEMU_HARDDISK_QM00001_', 'device_name': '/vmfs/devices/disks/t10.ATA_QEMU_HARDDISK_QM00001_', 'device_path': '/vmfs/devices/disks/t10.ATA_QEMU_HARDDISK_QM00001_', 'device_type': 'disk', 'display_name': 'Local ATA Disk (t10.ATA_QEMU_HARDDISK_QM00001_)', 'key': 'key-vim.host.ScsiDisk-0100000000514d30303030312020202020202020202020202051454d552048', 'local_disk': True, 'lun_type': 'disk', 'model': 'QEMU HARDDISK ', 'perenniallyReserved': None, 'protocol_endpoint': False, 'revision': '1.5.', 'scsi_disk_type': 'native512', 'scsi_level': 5, 'serial_number': 'unavailable', 'ssd': False, 'uuid': '0100000000514d30303030312020202020202020202020202051454d552048', 'vStorageSupport': 'vStorageUnsupported', 'vendor': 'ATA '}]}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

hosts_scsidisk_info

+ +

+ dictionary +

+
+

metadata about host system SCSI disk information

+

Returned: always

+

Sample: {"10.65.201.106": [{"block": 41943040, "block_size": 512, "canonical_name": "t10.ATA_QEMU_HARDDISK_QM00001_", "device_name": "/vmfs/devices/disks/t10.ATA_QEMU_HARDDISK_QM00001_", "device_path": "/vmfs/devices/disks/t10.ATA_QEMU_HARDDISK_QM00001_", "device_type": "disk", "display_name": "Local ATA Disk (t10.ATA_QEMU_HARDDISK_QM00001_)", "key": "key-vim.host.ScsiDisk-0100000000514d30303030312020202020202020202020202051454d552048", "local_disk": true, "lun_type": "disk", "model": "QEMU HARDDISK ", "perenniallyReserved": null, "protocol_endpoint": false, "revision": "1.5.", "scsi_disk_type": "native512", "scsi_level": 5, "serial_number": "unavailable", "ssd": false, "uuid": "0100000000514d30303030312020202020202020202020202051454d552048", "vStorageSupport": "vStorageUnsupported", "vendor": "ATA "}]}

+
+ + Authors ~~~~~~~ - Abhijeet Kasurde (@Akasurde) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_host_service_info_module.rst b/docs/community.vmware.vmware_host_service_info_module.rst index 246abc5eb..7afaa6ed9 100644 --- a/docs/community.vmware.vmware_host_service_info_module.rst +++ b/docs/community.vmware.vmware_host_service_info_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_host_service_info_module: -***************************************** -community.vmware.vmware_host_service_info -***************************************** +community.vmware.vmware_host_service_info module -- Gathers info about an ESXi host's services +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Gathers info about an ESXi host's services** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_host_service_info`. .. contents:: @@ -16,194 +17,189 @@ community.vmware.vmware_host_service_info Synopsis -------- + - This module can be used to gather information about an ESXi host's services. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- cluster_name - -
- string -
-
- -
Name of the cluster.
-
Service information about each ESXi server will be returned for given cluster.
-
If esxi_hostname is not given, this parameter is required.
-
-
- esxi_hostname - -
- string -
-
- -
ESXi hostname.
-
Service information about this ESXi server will be returned.
-
If cluster_name is not given, this parameter is required.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

cluster_name

+ +

+ string +

+
+

Name of the cluster.

+

Service information about each ESXi server will be returned for given cluster.

+

If esxi_hostname is not given, this parameter is required.

+
+
+

esxi_hostname

+ +

+ string +

+
+

ESXi hostname.

+

Service information about this ESXi server will be returned.

+

If cluster_name is not given, this parameter is required.

+
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - If source package name is not available then fact is populated as null. - - All modules requires API write access and hence is not supported on a free ESXi license. - +- If source package name is not available then fact is populated as null. +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -211,6 +207,7 @@ Examples .. code-block:: yaml + - name: Gather info about all ESXi Host in given Cluster community.vmware.vmware_host_service_info: hostname: '{{ vcenter_hostname }}' @@ -231,44 +228,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- host_service_info - -
- dictionary -
-
always -
dict with hostname as key and dict with host service config information
-
-
Sample:
-
{'10.76.33.226': [{'key': 'DCUI', 'label': 'Direct Console UI', 'policy': 'on', 'required': False, 'running': True, 'uninstallable': False, 'source_package_name': 'esx-base', 'source_package_desc': 'This VIB contains all of the base functionality of vSphere ESXi.'}, {'key': 'TSM', 'label': 'ESXi Shell', 'policy': 'off', 'required': False, 'running': False, 'uninstallable': False, 'source_package_name': 'esx-base', 'source_package_desc': 'This VIB contains all of the base functionality of vSphere ESXi.'}]}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

host_service_info

+ +

+ dictionary +

+
+

dict with hostname as key and dict with host service config information

+

Returned: always

+

Sample: {"10.76.33.226": [{"key": "DCUI", "label": "Direct Console UI", "policy": "on", "required": false, "running": true, "source_package_desc": "This VIB contains all of the base functionality of vSphere ESXi.", "source_package_name": "esx-base", "uninstallable": false}, {"key": "TSM", "label": "ESXi Shell", "policy": "off", "required": false, "running": false, "source_package_desc": "This VIB contains all of the base functionality of vSphere ESXi.", "source_package_name": "esx-base", "uninstallable": false}]}

+
+ + Authors ~~~~~~~ - Abhijeet Kasurde (@Akasurde) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_host_service_manager_module.rst b/docs/community.vmware.vmware_host_service_manager_module.rst index 7066e4f72..a8451b9a5 100644 --- a/docs/community.vmware.vmware_host_service_manager_module.rst +++ b/docs/community.vmware.vmware_host_service_manager_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_host_service_manager_module: -******************************************** -community.vmware.vmware_host_service_manager -******************************************** +community.vmware.vmware_host_service_manager module -- Manage services on a given ESXi host ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Manage services on a given ESXi host** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_host_service_manager`. .. contents:: @@ -16,9 +17,14 @@ community.vmware.vmware_host_service_manager Synopsis -------- + - This module can be used to manage (start, stop, restart) services on a given ESXi host. -- If cluster_name is provided, specified service will be managed on all ESXi host belonging to that cluster. -- If specific esxi_hostname is provided, then specified service will be managed on given ESXi host only. +- If cluster\_name is provided, specified service will be managed on all ESXi host belonging to that cluster. +- If specific esxi\_hostname is provided, then specified service will be managed on given ESXi host only. + + + + @@ -28,249 +34,237 @@ Parameters .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- cluster_name - -
- string -
-
- -
Name of the cluster.
-
Service settings are applied to every ESXi host system/s in given cluster.
-
If esxi_hostname is not given, this parameter is required.
-
-
- esxi_hostname - -
- string -
-
- -
ESXi hostname.
-
Service settings are applied to this ESXi host system.
-
If cluster_name is not given, this parameter is required.
-
-
- 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.
-
-
- service_name - -
- string - / required -
-
- -
Name of Service to be managed. This is a brief identifier for the service, for example, ntpd, vxsyslogd etc.
-
This value should be a valid ESXi service name.
-
-
- service_policy - -
- string -
-
-
    Choices: -
  • automatic
  • -
  • off
  • -
  • on
  • -
-
-
Set of valid service policy strings.
-
If set on, then service should be started when the host starts up.
-
If set automatic, then service should run if and only if it has open firewall ports.
-
If set off, then Service should not be started when the host starts up.
-
-
- state - -
- string -
-
-
    Choices: -
  • absent
  • -
  • present
  • -
  • restart
  • -
  • start ←
  • -
  • stop
  • -
  • unchanged
  • -
-
-
Desired state of service.
-
State value 'start' and 'present' has same effect.
-
State value 'stop' and 'absent' has same effect.
-
State value unchanged is added in version 1.14.0 to allow defining startup policy without defining or changing service state.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

cluster_name

+ +

+ string +

+
+

Name of the cluster.

+

Service settings are applied to every ESXi host system/s in given cluster.

+

If esxi_hostname is not given, this parameter is required.

+
+
+

esxi_hostname

+ +

+ string +

+
+

ESXi hostname.

+

Service settings are applied to this ESXi host system.

+

If cluster_name is not given, this parameter is required.

+
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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.

+
+
+

service_name

+ +

+ string + / required +

+
+

Name of Service to be managed. This is a brief identifier for the service, for example, ntpd, vxsyslogd etc.

+

This value should be a valid ESXi service name.

+
+
+

service_policy

+ +

+ string +

+
+

Set of valid service policy strings.

+

If set on, then service should be started when the host starts up.

+

If set automatic, then service should run if and only if it has open firewall ports.

+

If set off, then Service should not be started when the host starts up.

+

Choices:

+
    +
  • "automatic"

  • +
  • "off"

  • +
  • "on"

  • +
+ +
+
+

state

+ +

+ string +

+
+

Desired state of service.

+

State value 'start' and 'present' has same effect.

+

State value 'stop' and 'absent' has same effect.

+

State value unchanged is added in version 1.14.0 to allow defining startup policy without defining or changing service state.

+

Choices:

+
    +
  • "absent"

  • +
  • "present"

  • +
  • "restart"

  • +
  • "start" ← (default)

  • +
  • "stop"

  • +
  • "unchanged"

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -278,6 +272,7 @@ Examples .. code-block:: yaml + - name: Start ntpd service setting for all ESXi Host in given Cluster community.vmware.vmware_host_service_manager: hostname: '{{ vcenter_hostname }}' @@ -322,11 +317,20 @@ Examples -Status ------- + Authors ~~~~~~~ - Abhijeet Kasurde (@Akasurde) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_host_snmp_module.rst b/docs/community.vmware.vmware_host_snmp_module.rst index 86f861b04..448b8f8f8 100644 --- a/docs/community.vmware.vmware_host_snmp_module.rst +++ b/docs/community.vmware.vmware_host_snmp_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_host_snmp_module: -********************************* -community.vmware.vmware_host_snmp -********************************* +community.vmware.vmware_host_snmp module -- Configures SNMP on an ESXi host system +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Configures SNMP on an ESXi host system** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_host_snmp`. .. contents:: @@ -16,339 +17,326 @@ community.vmware.vmware_host_snmp Synopsis -------- + - This module can be used to configure the embedded SNMP agent on an ESXi host. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- community - -
- list - / elements=string -
-
- Default:
[]
-
-
List of SNMP community strings.
-
-
- 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.
-
-
- hw_source - -
- string -
-
-
    Choices: -
  • indications ←
  • -
  • sensors
  • -
-
-
Source hardware events from IPMI sensors or CIM Indications.
-
The embedded SNMP agent receives hardware events either from IPMI sensors sensors or CIM indications indications.
-
-
- log_level - -
- string -
-
-
    Choices: -
  • debug
  • -
  • info ←
  • -
  • warning
  • -
  • error
  • -
-
-
Syslog logging level.
-
-
- 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.
-
-
- send_trap - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Send a test trap to validate the configuration.
-
-
- snmp_port - -
- integer -
-
- Default:
161
-
-
Port used by the SNMP agent.
-
-
- state - -
- string -
-
-
    Choices: -
  • disabled ←
  • -
  • enabled
  • -
  • reset
  • -
-
-
Enable, disable, or reset the SNMP agent.
-
-
- sys_contact - -
- string -
-
- -
System contact who manages the system.
-
-
- sys_location - -
- string -
-
- -
System location.
-
-
- trap_filter - -
- list - / elements=string -
-
- -
A list of trap oids for traps not to be sent by agent, e.g. [ 1.3.6.1.4.1.6876.4.1.1.0, 1.3.6.1.4.1.6876.4.1.1.1 ]
-
Use value reset to clear settings.
-
-
- trap_targets - -
- list - / elements=dictionary -
-
- Default:
[]
-
-
A list of trap targets.
-
You need to use hostname, port, and community for each trap target.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

community

+ +

+ list + / elements=string +

+
+

List of SNMP community strings.

+

Default: []

+
+
+

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.

+
+
+

hw_source

+ +

+ string +

+
+

Source hardware events from IPMI sensors or CIM Indications.

+

The embedded SNMP agent receives hardware events either from IPMI sensors sensors or CIM indications indications.

+

Choices:

+
    +
  • "indications" ← (default)

  • +
  • "sensors"

  • +
+ +
+
+

log_level

+ +

+ string +

+
+

Syslog logging level.

+

Choices:

+
    +
  • "debug"

  • +
  • "info" ← (default)

  • +
  • "warning"

  • +
  • "error"

  • +
+ +
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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.

+
+
+

send_trap

+ +

+ boolean +

+
+

Send a test trap to validate the configuration.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

snmp_port

+ +

+ integer +

+
+

Port used by the SNMP agent.

+

Default: 161

+
+
+

state

+ +

+ string +

+
+

Enable, disable, or reset the SNMP agent.

+

Choices:

+
    +
  • "disabled" ← (default)

  • +
  • "enabled"

  • +
  • "reset"

  • +
+ +
+
+

sys_contact

+ +

+ string +

+
+

System contact who manages the system.

+
+
+

sys_location

+ +

+ string +

+
+

System location.

+
+
+

trap_filter

+ +

+ list + / elements=string +

+
+

A list of trap oids for traps not to be sent by agent, e.g. [ 1.3.6.1.4.1.6876.4.1.1.0, 1.3.6.1.4.1.6876.4.1.1.1 ]

+

Use value reset to clear settings.

+
+
+

trap_targets

+ +

+ list + / elements=dictionary +

+
+

A list of trap targets.

+

You need to use hostname, port, and community for each trap target.

+

Default: []

+
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - You need to reset the agent (to factory defaults) if you want to clear all community strings, trap targets, or filters - - SNMP v3 configuration isn't implemented yet - - All modules requires API write access and hence is not supported on a free ESXi license. - +- You need to reset the agent (to factory defaults) if you want to clear all community strings, trap targets, or filters +- SNMP v3 configuration isn't implemented yet +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -356,6 +344,7 @@ Examples .. code-block:: yaml + - name: Enable and configure SNMP community community.vmware.vmware_host_snmp: hostname: '{{ esxi_hostname }}' @@ -404,44 +393,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- results - -
- dictionary -
-
always -
metadata about host system's SNMP configuration
-
-
Sample:
-
{'esxi01': {'changed': False, 'community': ['test'], 'hw_source': 'indications', 'msg': 'SNMP already configured properly', 'port': 161, 'state': 'enabled', 'trap_targets': []}}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

results

+ +

+ dictionary +

+
+

metadata about host system's SNMP configuration

+

Returned: always

+

Sample: {"esxi01": {"changed": false, "community": ["test"], "hw_source": "indications", "msg": "SNMP already configured properly", "port": 161, "state": "enabled", "trap_targets": []}}

+
+ + Authors ~~~~~~~ - Christian Kotte (@ckotte) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_host_sriov_module.rst b/docs/community.vmware.vmware_host_sriov_module.rst index f4645203c..493854347 100644 --- a/docs/community.vmware.vmware_host_sriov_module.rst +++ b/docs/community.vmware.vmware_host_sriov_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_host_sriov_module: -********************************** -community.vmware.vmware_host_sriov -********************************** +community.vmware.vmware_host_sriov module -- Manage SR-IOV settings on host ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Manage SR-IOV settings on host** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_host_sriov`. .. contents:: @@ -16,6 +17,7 @@ community.vmware.vmware_host_sriov Synopsis -------- + - This module can be used to configure, enable or disable SR-IOV functions on ESXi host. - Module does not reboot the host after changes, but puts it in output "rebootRequired" state. - User can specify an ESXi hostname or Cluster name. In case of cluster name, all ESXi hosts are updated. @@ -23,241 +25,231 @@ Synopsis + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- cluster_name - -
- string -
-
- -
Name of the cluster from which all host systems will be used.
-
This parameter is required if esxi_hostname is not specified.
-
-
- esxi_hostname - -
- string -
-
- -
Name of the host system to work with.
-
This parameter is required if cluster_name is not specified.
-
User can specify specific host from the cluster.
-
-
- 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.
-
-
- num_virt_func - -
- integer - / required -
-
- -
number of functions to activate on interface.
-
0 means SR-IOV disabled.
-
number greater than 0 means SR-IOV enabled.
-
-
- 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.
-
-
- sriov_on - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
optional parameter, related to num_virt_func.
-
SR-IOV can be enabled only if num_virt_func > 0.
-
-
- 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.
-
-
- vmnic - -
- string - / required -
-
- -
Interface name, like vmnic0.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

cluster_name

+ +

+ string +

+
+

Name of the cluster from which all host systems will be used.

+

This parameter is required if esxi_hostname is not specified.

+
+
+

esxi_hostname

+ +

+ string +

+
+

Name of the host system to work with.

+

This parameter is required if cluster_name is not specified.

+

User can specify specific host from the cluster.

+
+
+

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.

+
+
+

num_virt_func

+ +

+ integer + / required +

+
+

number of functions to activate on interface.

+

0 means SR-IOV disabled.

+

number greater than 0 means SR-IOV enabled.

+
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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.

+
+
+

sriov_on

+ +

+ boolean +

+
+

optional parameter, related to num_virt_func.

+

SR-IOV can be enabled only if num_virt_func > 0.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

vmnic

+ +

+ string + / required +

+
+

Interface name, like vmnic0.

+
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -265,6 +257,7 @@ Examples .. code-block:: yaml + - name: enable SR-IOV on vmnic0 with 8 functions community.vmware.vmware_host_sriov: hostname: "{{ vcenter_hostname }}" @@ -308,45 +301,55 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- host_sriov_diff - -
- dictionary -
-
always -
contains info about SR-IOV status on vmnic before, after and requested changes
-
sometimes vCenter slowly update info, as result "after" contains same info as "before" need to run again in check_mode or reboot host, as ESXi requested
-
-
Sample:
-
{'changed': True, 'diff': {'after': {'host_test': {'sriovActive': False, 'sriovEnabled': True, 'maxVirtualFunctionSupported': 63, 'numVirtualFunction': 0, 'numVirtualFunctionRequested': 8, 'rebootRequired': True, 'sriovCapable': True}}, 'before': {'host_test': {'sriovActive': False, 'sriovEnabled': False, 'maxVirtualFunctionSupported': 63, 'numVirtualFunction': 0, 'numVirtualFunctionRequested': 0, 'rebootRequired': False, 'sriovCapable': True}}, 'changes': {'host_test': {'numVirtualFunction': 8, 'rebootRequired': True, 'sriovEnabled': True}}}}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

host_sriov_diff

+ +

+ dictionary +

+
+

contains info about SR-IOV status on vmnic before, after and requested changes

+

sometimes vCenter slowly update info, as result "after" contains same info as "before" need to run again in check_mode or reboot host, as ESXi requested

+

Returned: always

+

Sample: {"changed": true, "diff": {"after": {"host_test": {"maxVirtualFunctionSupported": 63, "numVirtualFunction": 0, "numVirtualFunctionRequested": 8, "rebootRequired": true, "sriovActive": false, "sriovCapable": true, "sriovEnabled": true}}, "before": {"host_test": {"maxVirtualFunctionSupported": 63, "numVirtualFunction": 0, "numVirtualFunctionRequested": 0, "rebootRequired": false, "sriovActive": false, "sriovCapable": true, "sriovEnabled": false}}, "changes": {"host_test": {"numVirtualFunction": 8, "rebootRequired": true, "sriovEnabled": true}}}}

+
+ + Authors ~~~~~~~ - Viktor Tsymbalyuk (@victron) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_host_ssl_info_module.rst b/docs/community.vmware.vmware_host_ssl_info_module.rst index 5ea83fe11..0722ab01f 100644 --- a/docs/community.vmware.vmware_host_ssl_info_module.rst +++ b/docs/community.vmware.vmware_host_ssl_info_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_host_ssl_info_module: -************************************* -community.vmware.vmware_host_ssl_info -************************************* +community.vmware.vmware_host_ssl_info module -- Gather info of ESXi host system about SSL ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Gather info of ESXi host system about SSL** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_host_ssl_info`. .. contents:: @@ -16,193 +17,188 @@ community.vmware.vmware_host_ssl_info Synopsis -------- + - This module can be used to gather information of the SSL thumbprint information for a host. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- cluster_name - -
- string -
-
- -
Name of the cluster.
-
SSL thumbprint information about all ESXi host system in the given cluster will be reported.
-
If esxi_hostname is not given, this parameter is required.
-
-
- esxi_hostname - -
- string -
-
- -
ESXi hostname.
-
SSL thumbprint information of this ESXi host system will be reported.
-
If cluster_name is not given, this parameter is required.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

cluster_name

+ +

+ string +

+
+

Name of the cluster.

+

SSL thumbprint information about all ESXi host system in the given cluster will be reported.

+

If esxi_hostname is not given, this parameter is required.

+
+
+

esxi_hostname

+ +

+ string +

+
+

ESXi hostname.

+

SSL thumbprint information of this ESXi host system will be reported.

+

If cluster_name is not given, this parameter is required.

+
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -210,6 +206,7 @@ Examples .. code-block:: yaml + - name: Gather SSL thumbprint information about all ESXi Hosts in given Cluster community.vmware.vmware_host_ssl_info: hostname: '{{ vcenter_hostname }}' @@ -245,44 +242,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- host_ssl_info - -
- dictionary -
-
info -
dict with hostname as key and dict with SSL thumbprint related info
-
-
Sample:
-
{'10.76.33.215': {'owner_tag': '', 'principal': 'vpxuser', 'ssl_thumbprints': ['E3:E8:A9:20:8D:32:AE:59:C6:8D:A5:91:B0:20:EF:00:A2:7C:27:EE', 'F1:AC:DA:6E:D8:1E:37:36:4A:5C:07:E5:04:0B:87:C8:75:FB:42:01']}}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

host_ssl_info

+ +

+ dictionary +

+
+

dict with hostname as key and dict with SSL thumbprint related info

+

Returned: info

+

Sample: {"10.76.33.215": {"owner_tag": "", "principal": "vpxuser", "ssl_thumbprints": ["E3:E8:A9:20:8D:32:AE:59:C6:8D:A5:91:B0:20:EF:00:A2:7C:27:EE", "F1:AC:DA:6E:D8:1E:37:36:4A:5C:07:E5:04:0B:87:C8:75:FB:42:01"]}}

+
+ + Authors ~~~~~~~ - Abhijeet Kasurde (@Akasurde) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_host_tcpip_stacks_module.rst b/docs/community.vmware.vmware_host_tcpip_stacks_module.rst index 9134999e2..3a985f794 100644 --- a/docs/community.vmware.vmware_host_tcpip_stacks_module.rst +++ b/docs/community.vmware.vmware_host_tcpip_stacks_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_host_tcpip_stacks_module: -***************************************** -community.vmware.vmware_host_tcpip_stacks -***************************************** +community.vmware.vmware_host_tcpip_stacks module -- Manage the TCP/IP Stacks configuration of ESXi host ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Manage the TCP/IP Stacks configuration of ESXi host** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_host_tcpip_stacks`. .. contents:: @@ -16,600 +17,560 @@ community.vmware.vmware_host_tcpip_stacks Synopsis -------- + - This module can be used to modify the TCP/IP stacks configuration. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- default - -
- dictionary -
-
- -
The TCP/IP stacks configuration of the default.
-
-
- alternate_dns - -
- string -
-
- -
The IP address of the alternate dns server.
-
-
- congestion_algorithm - -
- string -
-
-
    Choices: -
  • newreno ←
  • -
  • cubic
  • -
-
-
The TCP congest control algorithm.
-
-
- domain - -
- string - / required -
-
- -
The domain name portion of the DNS name.
-
-
- gateway - -
- string -
-
- -
The ipv4 gateway address.
-
-
- hostname - -
- string - / required -
-
- -
The host name of the ESXi host.
-
-
- ipv6_gateway - -
- string -
-
- -
The ipv6 gateway address.
-
-
- max_num_connections - -
- integer -
-
- Default:
11000
-
-
The maximum number of socket connection that are requested.
-
-
- preferred_dns - -
- string -
-
- -
The IP address of the preferred dns server.
-
-
- search_domains - -
- list - / elements=string -
-
- Default:
[]
-
-
The domain in which to search for hosts, placed in order of preference.
-
-
- esxi_hostname - -
- string - / required -
-
- -
Name of the ESXi host.
-
-
- 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.
-
-
- provisioning - -
- dictionary -
-
- -
The TCP/IP stacks configuration of the provisioning.
-
-
- congestion_algorithm - -
- string -
-
-
    Choices: -
  • newreno ←
  • -
  • cubic
  • -
-
-
The TCP congest control algorithm.
-
-
- gateway - -
- string -
-
- -
The ipv4 gateway address.
-
-
- ipv6_gateway - -
- string -
-
- -
The ipv6 gateway address.
-
-
- max_num_connections - -
- integer -
-
- Default:
11000
-
-
The maximum number of socket connection that are requested.
-
-
- 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.
-
-
- vmotion - -
- dictionary -
-
- -
The TCP/IP stacks configuration of the vmotion.
-
-
- congestion_algorithm - -
- string -
-
-
    Choices: -
  • newreno ←
  • -
  • cubic
  • -
-
-
The TCP congest control algorithm.
-
-
- gateway - -
- string -
-
- -
The ipv4 gateway address.
-
-
- ipv6_gateway - -
- string -
-
- -
The ipv6 gateway address.
-
-
- max_num_connections - -
- integer -
-
- Default:
11000
-
-
The maximum number of socket connection that are requested.
-
-
- vxlan - -
- dictionary -
-
- -
The TCP/IP stacks configuration of the vxlan.
-

aliases: nsx_overlay
-
-
- congestion_algorithm - -
- string -
-
-
    Choices: -
  • newreno ←
  • -
  • cubic
  • -
-
-
The TCP congest control algorithm.
-
-
- gateway - -
- string -
-
- -
The ipv4 gateway address.
-
-
- ipv6_gateway - -
- string -
-
- -
The ipv6 gateway address.
-
-
- max_num_connections - -
- integer -
-
- Default:
11000
-
-
The maximum number of socket connection that are requested.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

default

+ +

+ dictionary +

+
+

The TCP/IP stacks configuration of the default.

+
+
+

alternate_dns

+ +

+ string +

+
+

The IP address of the alternate dns server.

+
+
+

congestion_algorithm

+ +

+ string +

+
+

The TCP congest control algorithm.

+

Choices:

+
    +
  • "newreno" ← (default)

  • +
  • "cubic"

  • +
+ +
+
+

domain

+ +

+ string + / required +

+
+

The domain name portion of the DNS name.

+
+
+

gateway

+ +

+ string +

+
+

The ipv4 gateway address.

+
+
+

hostname

+ +

+ string + / required +

+
+

The host name of the ESXi host.

+
+
+

ipv6_gateway

+ +

+ string +

+
+

The ipv6 gateway address.

+
+
+

max_num_connections

+ +

+ integer +

+
+

The maximum number of socket connection that are requested.

+

Default: 11000

+
+
+

preferred_dns

+ +

+ string +

+
+

The IP address of the preferred dns server.

+
+
+

search_domains

+ +

+ list + / elements=string +

+
+

The domain in which to search for hosts, placed in order of preference.

+

Default: []

+
+
+

esxi_hostname

+ +

+ string + / required +

+
+

Name of the ESXi host.

+
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

provisioning

+ +

+ dictionary +

+
+

The TCP/IP stacks configuration of the provisioning.

+
+
+

congestion_algorithm

+ +

+ string +

+
+

The TCP congest control algorithm.

+

Choices:

+
    +
  • "newreno" ← (default)

  • +
  • "cubic"

  • +
+ +
+
+

gateway

+ +

+ string +

+
+

The ipv4 gateway address.

+
+
+

ipv6_gateway

+ +

+ string +

+
+

The ipv6 gateway address.

+
+
+

max_num_connections

+ +

+ integer +

+
+

The maximum number of socket connection that are requested.

+

Default: 11000

+
+
+

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

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

vmotion

+ +

+ dictionary +

+
+

The TCP/IP stacks configuration of the vmotion.

+
+
+

congestion_algorithm

+ +

+ string +

+
+

The TCP congest control algorithm.

+

Choices:

+
    +
  • "newreno" ← (default)

  • +
  • "cubic"

  • +
+ +
+
+

gateway

+ +

+ string +

+
+

The ipv4 gateway address.

+
+
+

ipv6_gateway

+ +

+ string +

+
+

The ipv6 gateway address.

+
+
+

max_num_connections

+ +

+ integer +

+
+

The maximum number of socket connection that are requested.

+

Default: 11000

+
+
+
+

vxlan

+ +

aliases: nsx_overlay

+

+ dictionary +

+
+

The TCP/IP stacks configuration of the vxlan.

+
+
+
+

congestion_algorithm

+ +

+ string +

+
+

The TCP congest control algorithm.

+

Choices:

+
    +
  • "newreno" ← (default)

  • +
  • "cubic"

  • +
+ +
+
+
+

gateway

+ +

+ string +

+
+

The ipv4 gateway address.

+
+
+
+

ipv6_gateway

+ +

+ string +

+
+

The ipv6 gateway address.

+
+
+
+

max_num_connections

+ +

+ integer +

+
+

The maximum number of socket connection that are requested.

+

Default: 11000

+
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -617,6 +578,7 @@ Examples .. code-block:: yaml + - name: Update the TCP/IP stack configuration of the default community.vmware.vmware_host_tcpip_stacks: hostname: "{{ vcenter_hostname }}" @@ -683,123 +645,99 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- default - -
- dictionary -
-
always -
dict of the TCP/IP stack configuration of the default.
-
-
Sample:
-
{ - "alternate_dns": "192.168.20.1", - "congestion_algorithm": "cubic", - "domain": "example.com", - "gateway": "192.168.10.1", - "ipv6_gateway", null, - "hostname": "esxi-test03", - "max_num_connections": 12000, - "preferred_dns": "192.168.10.1", - "search_domains": [ - "hoge.com", - "fuga.com" - ] - }
-
-
- provisioning - -
- dictionary -
-
always -
dict of the TCP/IP stack configuration of the provisioning.
-
-
Sample:
-
{ - "congestion_algorithm": "newreno", - "gateway": "10.10.10.254", - "ipv6_gateway": null, - "max_num_connections": 12000 - }
-
-
- vmotion - -
- dictionary -
-
always -
dict of the TCP/IP stack configuration of the vmotion.
-
-
Sample:
-
{ - "congestion_algorithm": "newreno", - "gateway": null, - "ipv6_gateway": null, - "max_num_connections": 11000 - }
-
-
- vxlan - -
- dictionary -
-
always -
dict of the TCP/IP stack configuration of the vxlan.
-
-
Sample:
-
{ - "congestion_algorithm": "newreno", - "gateway": null, - "ipv6_gateway": null, - "max_num_connections": 11000 - }
-
-

- - -Status ------- + + + + + + + + + + + + + + + + + + + + + + + + + +

Key

Description

+
+

default

+ +

+ dictionary +

+
+

dict of the TCP/IP stack configuration of the default.

+

Returned: always

+

Sample: "{\n \"alternate_dns\": \"192.168.20.1\",\n \"congestion_algorithm\": \"cubic\",\n \"domain\": \"example.com\",\n \"gateway\": \"192.168.10.1\",\n \"ipv6_gateway\", null,\n \"hostname\": \"esxi-test03\",\n \"max_num_connections\": 12000,\n \"preferred_dns\": \"192.168.10.1\",\n \"search_domains\": [\n \"hoge.com\",\n \"fuga.com\"\n ]\n}"

+
+
+

provisioning

+ +

+ dictionary +

+
+

dict of the TCP/IP stack configuration of the provisioning.

+

Returned: always

+

Sample: {"congestion_algorithm": "newreno", "gateway": "10.10.10.254", "ipv6_gateway": null, "max_num_connections": 12000}

+
+
+

vmotion

+ +

+ dictionary +

+
+

dict of the TCP/IP stack configuration of the vmotion.

+

Returned: always

+

Sample: {"congestion_algorithm": "newreno", "gateway": null, "ipv6_gateway": null, "max_num_connections": 11000}

+
+
+

vxlan

+ +

+ dictionary +

+
+

dict of the TCP/IP stack configuration of the vxlan.

+

Returned: always

+

Sample: {"congestion_algorithm": "newreno", "gateway": null, "ipv6_gateway": null, "max_num_connections": 11000}

+
+ + Authors ~~~~~~~ - sky-joker (@sky-joker) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_host_user_manager_module.rst b/docs/community.vmware.vmware_host_user_manager_module.rst index 9f7f6b322..a63a1e274 100644 --- a/docs/community.vmware.vmware_host_user_manager_module.rst +++ b/docs/community.vmware.vmware_host_user_manager_module.rst @@ -1,14 +1,15 @@ -.. _community.vmware.vmware_host_user_manager_module: -***************************************** -community.vmware.vmware_host_user_manager -***************************************** +community.vmware.vmware_host_user_manager module -- Manage users of ESXi +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Manage users of ESXi** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. -Version added: 2.1.0 +To use it in a playbook, specify: :code:`community.vmware.vmware_host_user_manager`. + +New in community.vmware 2.1.0 .. contents:: :local: @@ -17,264 +18,258 @@ Version added: 2.1.0 Synopsis -------- + - This module can add, update or delete local users on ESXi host. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- esxi_hostname - -
- string - / required -
-
- -
Name of the ESXi host that is managing the local user.
-
-
- 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.
-
-
- override_user_password - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
If the local user exists and updates the password, change this parameter value 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.
-
-
- 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, add a new local user or update information.
-
If set to absent, delete the local user.
-
-
- user_description - -
- string -
-
- -
The local user description.
-

aliases: local_user_description
-
-
- user_name - -
- string - / required -
-
- -
Name of the local user.
-

aliases: local_user_name
-
-
- user_password - -
- string -
-
- -
The local user password.
-
If you'd like to update the password, require the override_user_password is true.
-

aliases: local_user_password
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

esxi_hostname

+ +

+ string + / required +

+
+

Name of the ESXi host that is managing the local user.

+
+
+

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.

+
+
+

override_user_password

+ +

+ boolean +

+
+

If the local user exists and updates the password, change this parameter value is true.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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 +

+
+

If set to present, add a new local user or update information.

+

If set to absent, delete the local user.

+

Choices:

+
    +
  • "present" ← (default)

  • +
  • "absent"

  • +
+ +
+
+
+

user_description

+ +

aliases: local_user_description

+

+ string +

+
+

The local user description.

+
+
+
+

user_name

+ +

aliases: local_user_name

+

+ string + / required +

+
+

Name of the local user.

+
+
+
+

user_password

+ +

aliases: local_user_password

+

+ string +

+
+

The local user password.

+

If you'd like to update the password, require the override_user_password is true.

+
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -282,6 +277,7 @@ Examples .. code-block:: yaml + - name: Add new local user to ESXi host community.vmware.vmware_host_user_manager: hostname: "{{ vcenter_hostname }}" @@ -319,46 +315,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- msg - -
- string -
-
always -
The executed result for the module.
-
-
Sample:
-
{ - "msg": "Added the new user. - }
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

msg

+ +

+ string +

+
+

The executed result for the module.

+

Returned: always

+

Sample: "{\n \"msg\": \"Added the new user.\n}"

+
+ + Authors ~~~~~~~ - sky-joker (@sky-joker) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_host_vmhba_info_module.rst b/docs/community.vmware.vmware_host_vmhba_info_module.rst index f817bb845..f2aebfc6e 100644 --- a/docs/community.vmware.vmware_host_vmhba_info_module.rst +++ b/docs/community.vmware.vmware_host_vmhba_info_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_host_vmhba_info_module: -*************************************** -community.vmware.vmware_host_vmhba_info -*************************************** +community.vmware.vmware_host_vmhba_info module -- Gathers info about vmhbas available on the given ESXi host +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Gathers info about vmhbas available on the given ESXi host** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_host_vmhba_info`. .. contents:: @@ -16,9 +17,14 @@ community.vmware.vmware_host_vmhba_info Synopsis -------- + - This module can be used to gather information about vmhbas available on the given ESXi host. -- If ``cluster_name`` is provided, then vmhba information about all hosts from given cluster will be returned. -- If ``esxi_hostname`` is provided, then vmhba information about given host system will be returned. +- If \ :literal:`cluster\_name`\ is provided, then vmhba information about all hosts from given cluster will be returned. +- If \ :literal:`esxi\_hostname`\ is provided, then vmhba information about given host system will be returned. + + + + @@ -28,183 +34,173 @@ Parameters .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- cluster_name - -
- string -
-
- -
Name of the cluster from which all host systems will be used.
-
Vmhba information about each ESXi server will be returned for the given cluster.
-
This parameter is required if esxi_hostname is not specified.
-
-
- esxi_hostname - -
- string -
-
- -
Name of the host system to work with.
-
Vmhba information about this ESXi server will be returned.
-
This parameter is required if cluster_name is not specified.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

cluster_name

+ +

+ string +

+
+

Name of the cluster from which all host systems will be used.

+

Vmhba information about each ESXi server will be returned for the given cluster.

+

This parameter is required if esxi_hostname is not specified.

+
+
+

esxi_hostname

+ +

+ string +

+
+

Name of the host system to work with.

+

Vmhba information about this ESXi server will be returned.

+

This parameter is required if cluster_name is not specified.

+
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -212,6 +208,7 @@ Examples .. code-block:: yaml + - name: Gather info about vmhbas of all ESXi Host in the given Cluster community.vmware.vmware_host_vmhba_info: hostname: '{{ vcenter_hostname }}' @@ -232,44 +229,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- hosts_vmhbas_info - -
- dictionary -
-
hosts_vmhbas_info -
dict with hostname as key and dict with vmhbas information as value.
-
-
Sample:
-
{'10.76.33.204': {'vmhba_details': [{'adapter': 'HPE Smart Array P440ar', 'bus': 3, 'device': 'vmhba0', 'driver': 'nhpsa', 'location': '0000:03:00.0', 'model': 'Smart Array P440ar', 'node_wwn': '50:01:43:80:37:18:9e:a0', 'status': 'unknown', 'type': 'SAS'}, {'adapter': 'QLogic Corp ISP2532-based 8Gb Fibre Channel to PCI Express HBA', 'bus': 5, 'device': 'vmhba1', 'driver': 'qlnativefc', 'location': '0000:05:00.0', 'model': 'ISP2532-based 8Gb Fibre Channel to PCI Express HBA', 'node_wwn': '57:64:96:32:15:90:23:95:82', 'port_type': 'unknown', 'port_wwn': '57:64:96:32:15:90:23:95:82', 'speed': 8, 'status': 'online', 'type': 'Fibre Channel'}, {'adapter': 'QLogic Corp ISP2532-based 8Gb Fibre Channel to PCI Express HBA', 'bus': 8, 'device': 'vmhba2', 'driver': 'qlnativefc', 'location': '0000:08:00.0', 'model': 'ISP2532-based 8Gb Fibre Channel to PCI Express HBA', 'node_wwn': '57:64:96:32:15:90:23:95:21', 'port_type': 'unknown', 'port_wwn': '57:64:96:32:15:90:23:95:21', 'speed': 8, 'status': 'online', 'type': 'Fibre Channel'}]}}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

hosts_vmhbas_info

+ +

+ dictionary +

+
+

dict with hostname as key and dict with vmhbas information as value.

+

Returned: hosts_vmhbas_info

+

Sample: {"10.76.33.204": {"vmhba_details": [{"adapter": "HPE Smart Array P440ar", "bus": 3, "device": "vmhba0", "driver": "nhpsa", "location": "0000:03:00.0", "model": "Smart Array P440ar", "node_wwn": "50:01:43:80:37:18:9e:a0", "status": "unknown", "type": "SAS"}, {"adapter": "QLogic Corp ISP2532-based 8Gb Fibre Channel to PCI Express HBA", "bus": 5, "device": "vmhba1", "driver": "qlnativefc", "location": "0000:05:00.0", "model": "ISP2532-based 8Gb Fibre Channel to PCI Express HBA", "node_wwn": "57:64:96:32:15:90:23:95:82", "port_type": "unknown", "port_wwn": "57:64:96:32:15:90:23:95:82", "speed": 8, "status": "online", "type": "Fibre Channel"}, {"adapter": "QLogic Corp ISP2532-based 8Gb Fibre Channel to PCI Express HBA", "bus": 8, "device": "vmhba2", "driver": "qlnativefc", "location": "0000:08:00.0", "model": "ISP2532-based 8Gb Fibre Channel to PCI Express HBA", "node_wwn": "57:64:96:32:15:90:23:95:21", "port_type": "unknown", "port_wwn": "57:64:96:32:15:90:23:95:21", "speed": 8, "status": "online", "type": "Fibre Channel"}]}}

+
+ + Authors ~~~~~~~ - Christian Kotte (@ckotte) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_host_vmnic_info_module.rst b/docs/community.vmware.vmware_host_vmnic_info_module.rst index c76f45259..31844ecc9 100644 --- a/docs/community.vmware.vmware_host_vmnic_info_module.rst +++ b/docs/community.vmware.vmware_host_vmnic_info_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_host_vmnic_info_module: -*************************************** -community.vmware.vmware_host_vmnic_info -*************************************** +community.vmware.vmware_host_vmnic_info module -- Gathers info about vmnics available on the given ESXi host +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Gathers info about vmnics available on the given ESXi host** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_host_vmnic_info`. .. contents:: @@ -16,254 +17,249 @@ community.vmware.vmware_host_vmnic_info Synopsis -------- + - This module can be used to gather information about vmnics available on the given ESXi host. -- If ``cluster_name`` is provided, then vmnic information about all hosts from given cluster will be returned. -- If ``esxi_hostname`` is provided, then vmnic information about given host system will be returned. +- If \ :literal:`cluster\_name`\ is provided, then vmnic information about all hosts from given cluster will be returned. +- If \ :literal:`esxi\_hostname`\ is provided, then vmnic information about given host system will be returned. - Additional details about vswitch and dvswitch with respective vmnic is also provided which is added in 2.7 version. - Additional details about lldp added in 1.11.0 + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- capabilities - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Gather information about general capabilities (Auto negotiation, Wake On LAN, and Network I/O Control).
-
-
- cluster_name - -
- string -
-
- -
Name of the cluster from which all host systems will be used.
-
Vmnic information about each ESXi server will be returned for the given cluster.
-
This parameter is required if esxi_hostname is not specified.
-
-
- directpath_io - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Gather information about DirectPath I/O capabilities and configuration.
-
-
- esxi_hostname - -
- string -
-
- -
Name of the host system to work with.
-
Vmnic information about this ESXi server will be returned.
-
This parameter is required if cluster_name is not specified.
-
-
- 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.
-
-
- sriov - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Gather information about SR-IOV capabilities and configuration.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

capabilities

+ +

+ boolean +

+
+

Gather information about general capabilities (Auto negotiation, Wake On LAN, and Network I/O Control).

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

cluster_name

+ +

+ string +

+
+

Name of the cluster from which all host systems will be used.

+

Vmnic information about each ESXi server will be returned for the given cluster.

+

This parameter is required if esxi_hostname is not specified.

+
+
+

directpath_io

+ +

+ boolean +

+
+

Gather information about DirectPath I/O capabilities and configuration.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

esxi_hostname

+ +

+ string +

+
+

Name of the host system to work with.

+

Vmnic information about this ESXi server will be returned.

+

This parameter is required if cluster_name is not specified.

+
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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.

+
+
+

sriov

+ +

+ boolean +

+
+

Gather information about SR-IOV capabilities and configuration.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -271,6 +267,7 @@ Examples .. code-block:: yaml + - name: Gather info about vmnics of all ESXi Host in the given Cluster community.vmware.vmware_host_vmnic_info: hostname: '{{ vcenter_hostname }}' @@ -291,45 +288,45 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- hosts_vmnics_info - -
- dictionary -
-
hosts_vmnics_info -
dict with hostname as key and dict with vmnics information as value.
-
for num_vmnics, only NICs starting with vmnic are counted. NICs like vusb* are not counted.
-
details about vswitch and dvswitch was added in version 2.7.
-
details about vmnics was added in version 2.8.
-
details about lldp was added in version 1.11.0
-
-
Sample:
-
{'10.76.33.204': {'all': ['vmnic0', 'vmnic1'], 'available': [], 'dvswitch': {'dvs_0002': ['vmnic1']}, 'num_vmnics': 2, 'used': ['vmnic1', 'vmnic0'], 'vmnic_details': [{'actual_duplex': 'Full Duplex', 'actual_speed': 10000, 'adapter': 'Intel(R) 82599 10 Gigabit Dual Port Network Connection', 'configured_duplex': 'Auto negotiate', 'configured_speed': 'Auto negotiate', 'device': 'vmnic0', 'driver': 'ixgbe', 'lldp_info': {'Aggregated Port ID': '0', 'Aggregation Status': '1', 'Enabled Capabilities': {'_vimtype': 'vim.host.PhysicalNic.CdpDeviceCapability', 'host': False, 'igmpEnabled': False, 'networkSwitch': False, 'repeater': False, 'router': True, 'sourceRouteBridge': False, 'transparentBridge': True}, 'MTU': '9216', 'Port Description': 'switch port description', 'Samples': 18814, 'System Description': 'omitted from output', 'System Name': 'sw1', 'TimeOut': 30, 'Vlan ID': '1'}, 'location': '0000:01:00.0', 'mac': 'aa:bb:cc:dd:ee:ff', 'status': 'Connected'}, {'actual_duplex': 'Full Duplex', 'actual_speed': 10000, 'adapter': 'Intel(R) 82599 10 Gigabit Dual Port Network Connection', 'configured_duplex': 'Auto negotiate', 'configured_speed': 'Auto negotiate', 'device': 'vmnic1', 'driver': 'ixgbe', 'lldp_info': 'N/A', 'location': '0000:01:00.1', 'mac': 'ab:ba:cc:dd:ee:ff', 'status': 'Connected'}], 'vswitch': {'vSwitch0': ['vmnic0']}}}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

hosts_vmnics_info

+ +

+ dictionary +

+
+

dict with hostname as key and dict with vmnics information as value.

+

for num_vmnics, only NICs starting with vmnic are counted. NICs like vusb* are not counted.

+

details about vswitch and dvswitch was added in version 2.7.

+

details about vmnics was added in version 2.8.

+

details about lldp was added in version 1.11.0

+

Returned: hosts_vmnics_info

+

Sample: {"10.76.33.204": {"all": ["vmnic0", "vmnic1"], "available": [], "dvswitch": {"dvs_0002": ["vmnic1"]}, "num_vmnics": 2, "used": ["vmnic1", "vmnic0"], "vmnic_details": [{"actual_duplex": "Full Duplex", "actual_speed": 10000, "adapter": "Intel(R) 82599 10 Gigabit Dual Port Network Connection", "configured_duplex": "Auto negotiate", "configured_speed": "Auto negotiate", "device": "vmnic0", "driver": "ixgbe", "lldp_info": {"Aggregated Port ID": "0", "Aggregation Status": "1", "Enabled Capabilities": {"_vimtype": "vim.host.PhysicalNic.CdpDeviceCapability", "host": false, "igmpEnabled": false, "networkSwitch": false, "repeater": false, "router": true, "sourceRouteBridge": false, "transparentBridge": true}, "MTU": "9216", "Port Description": "switch port description", "Samples": 18814, "System Description": "omitted from output", "System Name": "sw1", "TimeOut": 30, "Vlan ID": "1"}, "location": "0000:01:00.0", "mac": "aa:bb:cc:dd:ee:ff", "status": "Connected"}, {"actual_duplex": "Full Duplex", "actual_speed": 10000, "adapter": "Intel(R) 82599 10 Gigabit Dual Port Network Connection", "configured_duplex": "Auto negotiate", "configured_speed": "Auto negotiate", "device": "vmnic1", "driver": "ixgbe", "lldp_info": "N/A", "location": "0000:01:00.1", "mac": "ab:ba:cc:dd:ee:ff", "status": "Connected"}], "vswitch": {"vSwitch0": ["vmnic0"]}}}

+
+ + Authors @@ -337,3 +334,13 @@ Authors - Abhijeet Kasurde (@Akasurde) - Christian Kotte (@ckotte) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_httpapi.rst b/docs/community.vmware.vmware_httpapi.rst index a00609b77..8227bce6b 100644 --- a/docs/community.vmware.vmware_httpapi.rst +++ b/docs/community.vmware.vmware_httpapi.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_httpapi: -*********************** -community.vmware.vmware -*********************** +community.vmware.vmware httpapi -- HttpApi Plugin for VMware REST API ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**HttpApi Plugin for VMware REST API** +This httpapi plugin is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware`. .. contents:: @@ -16,6 +17,7 @@ community.vmware.vmware Synopsis -------- + - This HttpApi plugin provides methods to connect to VMware vCenter over a HTTP(S)-based APIs. @@ -28,8 +30,10 @@ Synopsis -Status ------- + + + + Authors @@ -40,3 +44,11 @@ Authors .. hint:: Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up. + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_local_role_info_module.rst b/docs/community.vmware.vmware_local_role_info_module.rst index 7c6febcb0..c9b6f758f 100644 --- a/docs/community.vmware.vmware_local_role_info_module.rst +++ b/docs/community.vmware.vmware_local_role_info_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_local_role_info_module: -*************************************** -community.vmware.vmware_local_role_info -*************************************** +community.vmware.vmware_local_role_info module -- Gather info about local roles on an ESXi host or vCenter +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Gather info about local roles on an ESXi host or vCenter** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_local_role_info`. .. contents:: @@ -16,161 +17,160 @@ community.vmware.vmware_local_role_info Synopsis -------- + - This module can be used to gather information about local role info on an ESXi host or vCenter + + + + 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.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - Be sure that the user used for login, has the appropriate rights to view roles - - The module returns a list of dict in version 2.8 and above. - - All modules requires API write access and hence is not supported on a free ESXi license. - +- Be sure that the user used for login, has the appropriate rights to view roles +- The module returns a list of dict in version 2.8 and above. +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -178,6 +178,7 @@ Examples .. code-block:: yaml + - name: Gather info about local role from an ESXi (or vCenter) community.vmware.vmware_local_role_info: hostname: '{{ esxi_hostname }}' @@ -193,44 +194,55 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- local_role_info - -
- list -
-
always -
A list of dict about role information present on ESXi host
-
-
Sample:
-
[{'privileges': ['Alarm.Acknowledge', 'Alarm.Create', 'Alarm.Delete', 'Alarm.DisableActions'], 'role_id': -12, 'role_info_label': 'Ansible User', 'role_info_summary': 'Ansible Automation user', 'role_name': 'AnsiUser1', 'role_system': True}, {'privileges': [], 'role_id': -5, 'role_info_label': 'No access', 'role_info_summary': 'Used for restricting granted access', 'role_name': 'NoAccess', 'role_system': True}, {'privileges': ['System.Anonymous', 'System.View'], 'role_id': -3, 'role_info_label': 'View', 'role_info_summary': 'Visibility access (cannot be granted)', 'role_name': 'View', 'role_system': True}]
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

local_role_info

+ +

+ list + / elements=string +

+
+

A list of dict about role information present on ESXi host

+

Returned: always

+

Sample: [{"privileges": ["Alarm.Acknowledge", "Alarm.Create", "Alarm.Delete", "Alarm.DisableActions"], "role_id": -12, "role_info_label": "Ansible User", "role_info_summary": "Ansible Automation user", "role_name": "AnsiUser1", "role_system": true}, {"privileges": [], "role_id": -5, "role_info_label": "No access", "role_info_summary": "Used for restricting granted access", "role_name": "NoAccess", "role_system": true}, {"privileges": ["System.Anonymous", "System.View"], "role_id": -3, "role_info_label": "View", "role_info_summary": "Visibility access (cannot be granted)", "role_name": "View", "role_system": true}]

+
+ + Authors ~~~~~~~ - Abhijeet Kasurde (@Akasurde) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_local_role_manager_module.rst b/docs/community.vmware.vmware_local_role_manager_module.rst index 05014bdd1..6f8504b04 100644 --- a/docs/community.vmware.vmware_local_role_manager_module.rst +++ b/docs/community.vmware.vmware_local_role_manager_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_local_role_manager_module: -****************************************** -community.vmware.vmware_local_role_manager -****************************************** +community.vmware.vmware_local_role_manager module -- Manage local roles on an ESXi host or vCenter +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Manage local roles on an ESXi host or vCenter** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_local_role_manager`. .. contents:: @@ -16,256 +17,251 @@ community.vmware.vmware_local_role_manager Synopsis -------- + - This module can be used to manage local roles on an ESXi host or vCenter. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- action - -
- string -
-
-
    Choices: -
  • add
  • -
  • remove
  • -
  • set ←
  • -
-
-
This parameter is only valid while updating an existing role with privileges.
-
add will add the privileges to the existing privilege list.
-
remove will remove the privileges from the existing privilege list.
-
set will replace the privileges of the existing privileges with user defined list of privileges.
-
-
- force_remove - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
If set to false then prevents the role from being removed if any permissions are using it.
-
-
- 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.
-
-
- local_privilege_ids - -
- list - / elements=string -
-
- Default:
[]
-
-
The list of privileges that role needs to have.
- -
-
- local_role_name - -
- string - / required -
-
- -
The local role name to be managed.
-
-
- 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
  • -
-
-
Indicate desired state of the role.
-
If the role already exists when state=present, the role info is updated.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

action

+ +

+ string +

+
+

This parameter is only valid while updating an existing role with privileges.

+

add will add the privileges to the existing privilege list.

+

remove will remove the privileges from the existing privilege list.

+

set will replace the privileges of the existing privileges with user defined list of privileges.

+

Choices:

+
    +
  • "add"

  • +
  • "remove"

  • +
  • "set" ← (default)

  • +
+ +
+
+

force_remove

+ +

+ boolean +

+
+

If set to false then prevents the role from being removed if any permissions are using it.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

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.

+
+
+

local_privilege_ids

+ +

+ list + / elements=string +

+
+

The list of privileges that role needs to have.

+

Please see https://docs.vmware.com/en/VMware-vSphere/6.0/com.vmware.vsphere.security.doc/GUID-ED56F3C4-77D0-49E3-88B6-B99B8B437B62.html

+

Default: []

+
+
+

local_role_name

+ +

+ string + / required +

+
+

The local role name to be managed.

+
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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 +

+
+

Indicate desired state of the role.

+

If the role already exists when state=present, the role info is updated.

+

Choices:

+
    +
  • "present" ← (default)

  • +
  • "absent"

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - Be sure that the user used for login, has the appropriate rights to create / delete / edit roles - - All modules requires API write access and hence is not supported on a free ESXi license. - +- Be sure that the user used for login, has the appropriate rights to create / delete / edit roles +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -273,6 +269,7 @@ Examples .. code-block:: yaml + - name: Add local role to ESXi community.vmware.vmware_local_role_manager: hostname: '{{ esxi_hostname }}' @@ -333,129 +330,128 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- local_role_name - -
- string -
-
always -
Name of local role
-
-
-
- new_privileges - -
- list -
-
always -
List of privileges
-
-
-
- old_privileges - -
- list -
-
on update -
List of privileges of role before the update
-
-
-
- privileges - -
- list -
-
always -
List of privileges
-
-
-
- privileges_previous - -
- list -
-
on update -
List of privileges of role before the update
-
-
-
- role_id - -
- integer -
-
always -
Generated local role id
-
-
-
- role_name - -
- string -
-
always -
Name of local role
-
-
-

- - -Status ------- + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Key

Description

+
+

local_role_name

+ +

+ string +

+
+

Name of local role

+

Returned: always

+
+
+

new_privileges

+ +

+ list + / elements=string +

+
+

List of privileges

+

Returned: always

+
+
+

old_privileges

+ +

+ list + / elements=string +

+
+

List of privileges of role before the update

+

Returned: on update

+
+
+

privileges

+ +

+ list + / elements=string +

+
+

List of privileges

+

Returned: always

+
+
+

privileges_previous

+ +

+ list + / elements=string +

+
+

List of privileges of role before the update

+

Returned: on update

+
+
+

role_id

+ +

+ integer +

+
+

Generated local role id

+

Returned: always

+
+
+

role_name

+ +

+ string +

+
+

Name of local role

+

Returned: always

+
+ + Authors @@ -463,3 +459,13 @@ Authors - Abhijeet Kasurde (@Akasurde) - Christian Kotte (@ckotte) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_local_user_info_module.rst b/docs/community.vmware.vmware_local_user_info_module.rst index d2123d7bf..8580386a7 100644 --- a/docs/community.vmware.vmware_local_user_info_module.rst +++ b/docs/community.vmware.vmware_local_user_info_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_local_user_info_module: -*************************************** -community.vmware.vmware_local_user_info -*************************************** +community.vmware.vmware_local_user_info module -- Gather info about users on the given ESXi host +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Gather info about users on the given ESXi host** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_local_user_info`. .. contents:: @@ -16,6 +17,7 @@ community.vmware.vmware_local_user_info Synopsis -------- + - This module can be used to gather information about users present on the given ESXi host system in VMware infrastructure. - All variables and VMware object names are case sensitive. - User must hold the 'Authorization.ModifyPermissions' privilege to invoke this module. @@ -23,154 +25,152 @@ Synopsis + + + + 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.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -178,6 +178,7 @@ Examples .. code-block:: yaml + - name: Gather info about all Users on given ESXi host system community.vmware.vmware_local_user_info: hostname: '{{ esxi_hostname }}' @@ -188,41 +189,41 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- local_user_info - -
- dictionary -
-
always -
metadata about all local users
-
-
Sample:
-
[{'role': 'admin', 'description': 'Administrator', 'group': False, 'user_id': 0, 'user_name': 'root', 'shell_access': True}, {'role': 'admin', 'description': 'DCUI User', 'group': False, 'user_id': 100, 'user_name': 'dcui', 'shell_access': False}]
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

local_user_info

+ +

+ dictionary +

+
+

metadata about all local users

+

Returned: always

+

Sample: [{"description": "Administrator", "group": false, "role": "admin", "shell_access": true, "user_id": 0, "user_name": "root"}, {"description": "DCUI User", "group": false, "role": "admin", "shell_access": false, "user_id": 100, "user_name": "dcui"}]

+
+ + Authors @@ -230,3 +231,13 @@ Authors - Abhijeet Kasurde (@Akasurde) - Christian Kotte (@ckotte) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_local_user_manager_module.rst b/docs/community.vmware.vmware_local_user_manager_module.rst index 431e048bc..abe0e96eb 100644 --- a/docs/community.vmware.vmware_local_user_manager_module.rst +++ b/docs/community.vmware.vmware_local_user_manager_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_local_user_manager_module: -****************************************** -community.vmware.vmware_local_user_manager -****************************************** +community.vmware.vmware_local_user_manager module -- Manage local users on an ESXi host ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Manage local users on an ESXi host** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_local_user_manager`. .. contents:: @@ -16,225 +17,218 @@ community.vmware.vmware_local_user_manager Synopsis -------- + - Manage local users on an ESXi host + + + + 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.
-
-
- local_user_description - -
- string -
-
- -
Description for the user.
-
-
- local_user_name - -
- string - / required -
-
- -
The local user name to be changed.
-
-
- local_user_password - -
- string -
-
- -
The password to be 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
  • -
-
-
Indicate desired state of the user. If the user already exists when state=present, the user info is updated
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

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.

+
+
+

local_user_description

+ +

+ string +

+
+

Description for the user.

+
+
+

local_user_name

+ +

+ string + / required +

+
+

The local user name to be changed.

+
+
+

local_user_password

+ +

+ string +

+
+

The password to be set.

+
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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 +

+
+

Indicate desired state of the user. If the user already exists when state=present, the user info is updated

+

Choices:

+
    +
  • "present" ← (default)

  • +
  • "absent"

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - Be sure that the ESXi user used for login, has the appropriate rights to create / delete / edit users - - All modules requires API write access and hence is not supported on a free ESXi license. - +- Be sure that the ESXi user used for login, has the appropriate rights to create / delete / edit users +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -242,6 +236,7 @@ Examples .. code-block:: yaml + - name: Add local user to ESXi community.vmware.vmware_local_user_manager: hostname: esxi_hostname @@ -254,11 +249,20 @@ Examples -Status ------- + Authors ~~~~~~~ - Andreas Nafpliotis (@nafpliot-ibm) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_maintenancemode_module.rst b/docs/community.vmware.vmware_maintenancemode_module.rst index 265dcb808..10ab9aa98 100644 --- a/docs/community.vmware.vmware_maintenancemode_module.rst +++ b/docs/community.vmware.vmware_maintenancemode_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_maintenancemode_module: -*************************************** -community.vmware.vmware_maintenancemode -*************************************** +community.vmware.vmware_maintenancemode module -- Place a host into maintenance mode +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Place a host into maintenance mode** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_maintenancemode`. .. contents:: @@ -16,251 +17,247 @@ community.vmware.vmware_maintenancemode Synopsis -------- + - This module can be used for placing a ESXi host into maintenance mode. - Support for VSAN compliant maintenance mode when selected. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- esxi_hostname - -
- string - / required -
-
- -
Name of the host as defined in vCenter.
-
-
- evacuate - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
If set to true, evacuate all powered off VMs.
-
-
- 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
  • -
-
-
Enter or exit maintenance mode.
-
-
- timeout - -
- integer -
-
- Default:
0
-
-
Specify a timeout for the operation.
-
-
- 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.
-
-
- vsan - -
- string -
-
-
    Choices: -
  • ensureObjectAccessibility
  • -
  • evacuateAllData
  • -
  • noAction
  • -
-
-
Specify which VSAN compliant mode to enter.
-

aliases: vsan_mode
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

esxi_hostname

+ +

+ string + / required +

+
+

Name of the host as defined in vCenter.

+
+
+

evacuate

+ +

+ boolean +

+
+

If set to true, evacuate all powered off VMs.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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 +

+
+

Enter or exit maintenance mode.

+

Choices:

+
    +
  • "present" ← (default)

  • +
  • "absent"

  • +
+ +
+
+

timeout

+ +

+ integer +

+
+

Specify a timeout for the operation.

+

Default: 0

+
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+
+

vsan

+ +

aliases: vsan_mode

+

+ string +

+
+

Specify which VSAN compliant mode to enter.

+

Choices:

+
    +
  • "ensureObjectAccessibility"

  • +
  • "evacuateAllData"

  • +
  • "noAction"

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -268,6 +265,7 @@ Examples .. code-block:: yaml + - name: Enter VSAN-Compliant Maintenance Mode community.vmware.vmware_maintenancemode: hostname: "{{ vcenter_hostname }}" @@ -282,79 +280,85 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- hostname - -
- string -
-
always -
Name of host in vCenter
-
-
Sample:
-
esxi.local.domain
-
-
- hostsystem - -
- string -
-
always -
Name of vim reference
-
-
Sample:
-
'vim.HostSystem:host-236'
-
-
- status - -
- string -
-
always -
Action taken
-
-
Sample:
-
ENTER
-
-

- - -Status ------- + + + + + + + + + + + + + + + + + + + + + +

Key

Description

+
+

hostname

+ +

+ string +

+
+

Name of host in vCenter

+

Returned: always

+

Sample: "esxi.local.domain"

+
+
+

hostsystem

+ +

+ string +

+
+

Name of vim reference

+

Returned: always

+

Sample: "'vim.HostSystem:host-236'"

+
+
+

status

+ +

+ string +

+
+

Action taken

+

Returned: always

+

Sample: "ENTER"

+
+ + Authors ~~~~~~~ -- Jay Jahns (@jjahns) +- Jay Jahns (@jjahns) - Abhijeet Kasurde (@Akasurde) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_migrate_vmk_module.rst b/docs/community.vmware.vmware_migrate_vmk_module.rst index 626a07975..3b0ff1eb9 100644 --- a/docs/community.vmware.vmware_migrate_vmk_module.rst +++ b/docs/community.vmware.vmware_migrate_vmk_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_migrate_vmk_module: -*********************************** -community.vmware.vmware_migrate_vmk -*********************************** +community.vmware.vmware_migrate_vmk module -- Migrate a VMK interface from VSS to VDS ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Migrate a VMK interface from VSS to VDS** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_migrate_vmk`. .. contents:: @@ -16,272 +17,257 @@ community.vmware.vmware_migrate_vmk Synopsis -------- + - Migrate a VMK interface from VSS to VDS + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- current_portgroup_name - -
- string - / required -
-
- -
Portgroup name VMK interface is currently on
-
-
- current_switch_name - -
- string - / required -
-
- -
Switch VMK interface is currently on
-
-
- device - -
- string - / required -
-
- -
VMK interface name
-
-
- esxi_hostname - -
- string - / required -
-
- -
ESXi hostname to be managed
-
-
- 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.
-
-
- migrate_portgroup_name - -
- string - / required -
-
- -
Portgroup name to migrate VMK interface to
-
-
- migrate_switch_name - -
- string - / required -
-
- -
Switch name to migrate VMK interface to
-
-
- migrate_vlan_id - -
- integer -
-
added in 2.4.0
-
- -
VLAN to use for the VMK interface when migrating from VDS to VSS
-
Will be ignored when migrating from VSS to VDS
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

current_portgroup_name

+ +

+ string + / required +

+
+

Portgroup name VMK interface is currently on

+
+
+

current_switch_name

+ +

+ string + / required +

+
+

Switch VMK interface is currently on

+
+
+

device

+ +

+ string + / required +

+
+

VMK interface name

+
+
+

esxi_hostname

+ +

+ string + / required +

+
+

ESXi hostname to be managed

+
+
+

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.

+
+
+

migrate_portgroup_name

+ +

+ string + / required +

+
+

Portgroup name to migrate VMK interface to

+
+
+

migrate_switch_name

+ +

+ string + / required +

+
+

Switch name to migrate VMK interface to

+
+
+

migrate_vlan_id

+ +

+ integer +

+

added in community.vmware 2.4.0

+
+

VLAN to use for the VMK interface when migrating from VDS to VSS

+

Will be ignored when migrating from VSS to VDS

+
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -289,6 +275,7 @@ Examples .. code-block:: yaml + - name: Migrate Management vmk community.vmware.vmware_migrate_vmk: hostname: "{{ vcenter_hostname }}" @@ -305,8 +292,7 @@ Examples -Status ------- + Authors @@ -314,3 +300,13 @@ Authors - Joseph Callen (@jcpowermac) - Russell Teague (@mtnbikenc) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_object_custom_attributes_info_module.rst b/docs/community.vmware.vmware_object_custom_attributes_info_module.rst index 70cfd1f2b..c9d31c194 100644 --- a/docs/community.vmware.vmware_object_custom_attributes_info_module.rst +++ b/docs/community.vmware.vmware_object_custom_attributes_info_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_object_custom_attributes_info_module: -***************************************************** -community.vmware.vmware_object_custom_attributes_info -***************************************************** +community.vmware.vmware_object_custom_attributes_info module -- Gather custom attributes of an object ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Gather custom attributes of an object** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_object_custom_attributes_info`. .. contents:: @@ -16,219 +17,215 @@ community.vmware.vmware_object_custom_attributes_info Synopsis -------- + - This module can be gathered custom attributes of an object. + + + + 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 get if known, this is a unique identifier only within a single vCenter instance.
-
This is required if object_name is not supplied.
-
-
- object_name - -
- string -
-
- -
Name of the object to work with.
-

aliases: name
-
-
- object_type - -
- string - / required -
-
-
    Choices: -
  • Datacenter
  • -
  • Cluster
  • -
  • HostSystem
  • -
  • ResourcePool
  • -
  • Folder
  • -
  • VirtualMachine
  • -
  • DistributedVirtualSwitch
  • -
  • DistributedVirtualPortgroup
  • -
  • Datastore
  • -
-
-
Type of an object to work with.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

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 get if known, this is a unique identifier only within a single vCenter instance.

+

This is required if object_name is not supplied.

+
+
+
+

object_name

+ +

aliases: name

+

+ string +

+
+

Name of the object to work with.

+
+
+

object_type

+ +

+ string + / required +

+
+

Type of an object to work with.

+

Choices:

+
    +
  • "Datacenter"

  • +
  • "Cluster"

  • +
  • "HostSystem"

  • +
  • "ResourcePool"

  • +
  • "Folder"

  • +
  • "VirtualMachine"

  • +
  • "DistributedVirtualSwitch"

  • +
  • "DistributedVirtualPortgroup"

  • +
  • "Datastore"

  • +
+ +
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - Supports ``check_mode``. - - All modules requires API write access and hence is not supported on a free ESXi license. - +- Supports \ :literal:`check\_mode`\ . +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -236,6 +233,7 @@ Examples .. code-block:: yaml + - name: Gather custom attributes of a virtual machine community.vmware.vmware_object_custom_attributes_info: hostname: "{{ vcenter_hostname }}" @@ -258,63 +256,55 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- custom_attributes - -
- list -
-
always -
list of custom attributes of an object.
-
-
Sample:
-
[ - { - "attribute": "example01", - "key": 132, - "type": "VirtualMachine", - "value": "10" - }, - { - "attribute": "example02", - "key": 131, - "type": "VirtualMachine", - "value": "20" - }, - { - "attribute": "example03", - "key": 130, - "type": "VirtualMachine", - "value": null - } - ]
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

custom_attributes

+ +

+ list + / elements=string +

+
+

list of custom attributes of an object.

+

Returned: always

+

Sample: ["[\n {\n \"attribute\": \"example01\"", "\n \"key\": 132", "\n \"type\": \"VirtualMachine\"", "\n \"value\": \"10\"\n }", "\n {\n \"attribute\": \"example02\"", "\n \"key\": 131", "\n \"type\": \"VirtualMachine\"", "\n \"value\": \"20\"\n }", "\n {\n \"attribute\": \"example03\"", "\n \"key\": 130", "\n \"type\": \"VirtualMachine\"", "\n \"value\": null\n }\n]"]

+
+ + Authors ~~~~~~~ - sky-joker (@sky-joker) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_object_rename_module.rst b/docs/community.vmware.vmware_object_rename_module.rst index fad6d8a0f..460918659 100644 --- a/docs/community.vmware.vmware_object_rename_module.rst +++ b/docs/community.vmware.vmware_object_rename_module.rst @@ -1,12 +1,15 @@ -.. _community.vmware.vmware_object_rename_module: -************************************* -community.vmware.vmware_object_rename -************************************* +community.vmware.vmware_object_rename module -- Renames VMware objects +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Renames VMware objects** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. +You need further requirements to be able to use this module, +see `Requirements `_ for details. + +To use it in a playbook, specify: :code:`community.vmware.vmware_object_rename`. .. contents:: @@ -16,12 +19,15 @@ community.vmware.vmware_object_rename Synopsis -------- + - This module can be used to rename VMware objects. - All variables and VMware object names are case sensitive. - Renaming Host and Network is not supported by VMware APIs. +.. _ansible_collections.community.vmware.vmware_object_rename_module_requirements: + Requirements ------------ The below requirements are needed on the host that executes this module. @@ -29,236 +35,231 @@ The below requirements are needed on the host that executes this module. - vSphere Automation SDK + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- hostname - -
- string -
-
- -
The hostname or IP address of the vSphere vCenter server.
-
If the value is not specified in the task, the value of environment variable VMWARE_HOST will be used instead.
-
-
- new_name - -
- string - / required -
-
- -
New name for VMware object.
-

aliases: object_new_name
-
-
- object_moid - -
- string -
-
- -
Managed object id of the VMware object to work with.
-
Mutually exclusive with object_name.
-
-
- object_name - -
- string -
-
- -
Name of the object to work with.
-
Mutually exclusive with object_moid.
-
-
- object_type - -
- string - / required -
-
-
    Choices: -
  • ClusterComputeResource
  • -
  • Cluster
  • -
  • Datacenter
  • -
  • Datastore
  • -
  • Folder
  • -
  • Network
  • -
  • ResourcePool
  • -
  • VM
  • -
  • VirtualMachine
  • -
-
-
Type of object to work with.
-
Valid options are Cluster, ClusterComputeResource, Datacenter, Datastore, Folder, ResourcePool, VM or VirtualMachine.
-
-
- password - -
- string -
-
- -
The password of the vSphere vCenter server.
-
If the value is not specified in the task, the value of environment variable VMWARE_PASSWORD will be used instead.
-

aliases: pass, pwd
-
-
- port - -
- integer -
-
- Default:
443
-
-
The port number of the vSphere vCenter.
-
If the value is not specified in the task, the value of environment variable VMWARE_PORT will be used instead.
-
-
- protocol - -
- string -
-
-
    Choices: -
  • http
  • -
  • https ←
  • -
-
-
The connection to protocol.
-
-
- 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.
-
-
- 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 server.
-
If the value is not specified in the task, the value of environment variable VMWARE_USER will be used instead.
-

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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

hostname

+ +

+ string +

+
+

The hostname or IP address of the vSphere vCenter server.

+

If the value is not specified in the task, the value of environment variable VMWARE_HOST will be used instead.

+
+
+
+

new_name

+ +

aliases: object_new_name

+

+ string + / required +

+
+

New name for VMware object.

+
+
+

object_moid

+ +

+ string +

+
+

Managed object id of the VMware object to work with.

+

Mutually exclusive with object_name.

+
+
+

object_name

+ +

+ string +

+
+

Name of the object to work with.

+

Mutually exclusive with object_moid.

+
+
+

object_type

+ +

+ string + / required +

+
+

Type of object to work with.

+

Valid options are Cluster, ClusterComputeResource, Datacenter, Datastore, Folder, ResourcePool, VM or VirtualMachine.

+

Choices:

+
    +
  • "ClusterComputeResource"

  • +
  • "Cluster"

  • +
  • "Datacenter"

  • +
  • "Datastore"

  • +
  • "Folder"

  • +
  • "Network"

  • +
  • "ResourcePool"

  • +
  • "VM"

  • +
  • "VirtualMachine"

  • +
+ +
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ string +

+
+

The password of the vSphere vCenter server.

+

If the value is not specified in the task, the value of environment variable VMWARE_PASSWORD will be used instead.

+
+
+

port

+ +

+ integer +

+
+

The port number of the vSphere vCenter.

+

If the value is not specified in the task, the value of environment variable VMWARE_PORT will be used instead.

+

Default: 443

+
+
+

protocol

+ +

+ string +

+
+

The connection to protocol.

+

Choices:

+
    +
  • "http"

  • +
  • "https" ← (default)

  • +
+ +
+
+

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.

+
+
+

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

+ +

aliases: admin, user

+

+ string +

+
+

The username of the vSphere vCenter server.

+

If the value is not specified in the task, the value of environment variable VMWARE_USER will be used instead.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + @@ -268,6 +269,7 @@ Examples .. code-block:: yaml + - name: Rename a virtual machine community.vmware.vmware_object_rename: hostname: '{{ vcenter_hostname }}' @@ -320,44 +322,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- rename_status - -
- dictionary -
-
on success -
metadata about VMware object rename operation
-
-
Sample:
-
{'current_name': 'Fedora_31', 'desired_name': 'Fedora_31', 'previous_name': 'Fedora_VM'}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

rename_status

+ +

+ dictionary +

+
+

metadata about VMware object rename operation

+

Returned: on success

+

Sample: {"current_name": "Fedora_31", "desired_name": "Fedora_31", "previous_name": "Fedora_VM"}

+
+ + Authors ~~~~~~~ - Abhijeet Kasurde (@Akasurde) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_object_role_permission_info_module.rst b/docs/community.vmware.vmware_object_role_permission_info_module.rst index 1343a8493..e03c56391 100644 --- a/docs/community.vmware.vmware_object_role_permission_info_module.rst +++ b/docs/community.vmware.vmware_object_role_permission_info_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_object_role_permission_info_module: -*************************************************** -community.vmware.vmware_object_role_permission_info -*************************************************** +community.vmware.vmware_object_role_permission_info module -- Gather information about object's permissions ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Gather information about object's permissions** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_object_role_permission_info`. .. contents:: @@ -16,239 +17,233 @@ community.vmware.vmware_object_role_permission_info Synopsis -------- + - This module can be used to gather object permissions on the given VMware object. + + + + 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 for the given object.
-
Mutually exclusive with object_name.
-

aliases: object_moid
-
-
- object_name - -
- string -
-
- -
The object name to assigned permission.
-
Mutually exclusive with moid.
-
-
- object_type - -
- string -
-
-
    Choices: -
  • Folder ←
  • -
  • VirtualMachine
  • -
  • Datacenter
  • -
  • ResourcePool
  • -
  • Datastore
  • -
  • Network
  • -
  • HostSystem
  • -
  • ComputeResource
  • -
  • ClusterComputeResource
  • -
  • DistributedVirtualSwitch
  • -
  • DistributedVirtualPortgroup
  • -
  • StoragePod
  • -
-
-
The object type being targeted.
-
-
- 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.
-
-
- principal - -
- string -
-
- -
The optional name of an entity, such as a user, assigned permissions on an object.
-
If provided, actual permissions on the specified object are returned for the principal, instead of roles.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

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

+ +

aliases: object_moid

+

+ string +

+
+

Managed object ID for the given object.

+

Mutually exclusive with object_name.

+
+
+

object_name

+ +

+ string +

+
+

The object name to assigned permission.

+

Mutually exclusive with moid.

+
+
+

object_type

+ +

+ string +

+
+

The object type being targeted.

+

Choices:

+
    +
  • "Folder" ← (default)

  • +
  • "VirtualMachine"

  • +
  • "Datacenter"

  • +
  • "ResourcePool"

  • +
  • "Datastore"

  • +
  • "Network"

  • +
  • "HostSystem"

  • +
  • "ComputeResource"

  • +
  • "ClusterComputeResource"

  • +
  • "DistributedVirtualSwitch"

  • +
  • "DistributedVirtualPortgroup"

  • +
  • "StoragePod"

  • +
+ +
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

principal

+ +

+ string +

+
+

The optional name of an entity, such as a user, assigned permissions on an object.

+

If provided, actual permissions on the specified object are returned for the principal, instead of roles.

+
+
+

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

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - The ESXi or vCenter login user must have the appropriate rights to administer permissions. - - Supports check mode. - - All modules requires API write access and hence is not supported on a free ESXi license. - +- The ESXi or vCenter login user must have the appropriate rights to administer permissions. +- Supports check mode. +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -256,6 +251,7 @@ Examples .. code-block:: yaml + - name: Gather role information about Datastore community.vmware.vmware_object_role_permission_info: hostname: "{{ vcenter_hostname }}" @@ -277,44 +273,55 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- permission_info - -
- list -
-
always -
information about object's permission
-
-
Sample:
-
[{'principal': 'VSPHERE.LOCAL\\vpxd-extension-12e0b667-892c-4694-8a5e-f13147e45dbd', 'propagate': True, 'role_id': -1, 'role_name': 'Admin'}]
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

permission_info

+ +

+ list + / elements=string +

+
+

information about object's permission

+

Returned: always

+

Sample: [{"principal": "VSPHERE.LOCAL\\vpxd-extension-12e0b667-892c-4694-8a5e-f13147e45dbd", "propagate": true, "role_id": -1, "role_name": "Admin"}]

+
+ + Authors ~~~~~~~ - Abhijeet Kasurde (@Akasurde) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_object_role_permission_module.rst b/docs/community.vmware.vmware_object_role_permission_module.rst index 0b8f74b91..54b0fb936 100644 --- a/docs/community.vmware.vmware_object_role_permission_module.rst +++ b/docs/community.vmware.vmware_object_role_permission_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_object_role_permission_module: -********************************************** -community.vmware.vmware_object_role_permission -********************************************** +community.vmware.vmware_object_role_permission module -- Manage local roles on an ESXi host or vCenter +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Manage local roles on an ESXi host or vCenter** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_object_role_permission`. .. contents:: @@ -16,296 +17,287 @@ community.vmware.vmware_object_role_permission Synopsis -------- + - This module can be used to manage object permissions on the given host or vCenter. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- group - -
- string -
-
- -
The group to be assigned permission.
-
Required if principal is not specified.
-
-
- 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.
-
-
- object_name - -
- string - / required -
-
- -
The object name to assigned permission.
-
-
- object_type - -
- string -
-
-
    Choices: -
  • Folder ←
  • -
  • VirtualMachine
  • -
  • Datacenter
  • -
  • ResourcePool
  • -
  • Datastore
  • -
  • Network
  • -
  • HostSystem
  • -
  • ComputeResource
  • -
  • ClusterComputeResource
  • -
  • DistributedVirtualSwitch
  • -
  • DistributedVirtualPortgroup
  • -
  • StoragePod
  • -
-
-
The object type being targeted.
-
-
- 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.
-
-
- principal - -
- string -
-
- -
The user to be assigned permission.
-
Required if group is not specified.
-
If specifying domain user, required separator of domain uses backslash.
-
-
- 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.
-
-
- recursive - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Should the permissions be recursively applied.
-
-
- role - -
- string - / required -
-
- -
The role to be assigned permission.
-
User can also specify role name presented in Web UI. Supported added in 1.5.0.
-
-
- state - -
- string -
-
-
    Choices: -
  • present ←
  • -
  • absent
  • -
-
-
Indicate desired state of the object's permission.
-
When state=present, the permission will be added if it doesn't already exist.
-
When state=absent, the permission is removed if it exists.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

group

+ +

+ string +

+
+

The group to be assigned permission.

+

Required if principal is not specified.

+
+
+

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.

+
+
+

object_name

+ +

+ string + / required +

+
+

The object name to assigned permission.

+
+
+

object_type

+ +

+ string +

+
+

The object type being targeted.

+

Choices:

+
    +
  • "Folder" ← (default)

  • +
  • "VirtualMachine"

  • +
  • "Datacenter"

  • +
  • "ResourcePool"

  • +
  • "Datastore"

  • +
  • "Network"

  • +
  • "HostSystem"

  • +
  • "ComputeResource"

  • +
  • "ClusterComputeResource"

  • +
  • "DistributedVirtualSwitch"

  • +
  • "DistributedVirtualPortgroup"

  • +
  • "StoragePod"

  • +
+ +
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

principal

+ +

+ string +

+
+

The user to be assigned permission.

+

Required if group is not specified.

+

If specifying domain user, required separator of domain uses backslash.

+
+
+

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.

+
+
+

recursive

+ +

+ boolean +

+
+

Should the permissions be recursively applied.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

role

+ +

+ string + / required +

+
+

The role to be assigned permission.

+

User can also specify role name presented in Web UI. Supported added in 1.5.0.

+
+
+

state

+ +

+ string +

+
+

Indicate desired state of the object's permission.

+

When state=present, the permission will be added if it doesn't already exist.

+

When state=absent, the permission is removed if it exists.

+

Choices:

+
    +
  • "present" ← (default)

  • +
  • "absent"

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - The login user must have the appropriate rights to administer permissions. - - Permissions for a distributed switch must be defined and managed on either the datacenter or a folder containing the switch. - - All modules requires API write access and hence is not supported on a free ESXi license. - +- The login user must have the appropriate rights to administer permissions. +- Permissions for a distributed switch must be defined and managed on either the datacenter or a folder containing the switch. +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -313,6 +305,7 @@ Examples .. code-block:: yaml + - name: Assign user to VM folder community.vmware.vmware_object_role_permission: hostname: '{{ esxi_hostname }}' @@ -371,39 +364,40 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- changed - -
- boolean -
-
always -
whether or not a change was made to the object's role
-
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

changed

+ +

+ boolean +

+
+

whether or not a change was made to the object's role

+

Returned: always

+
+ + Authors @@ -411,3 +405,13 @@ Authors - Derek Rushing (@kryptsi) - Joseph Andreatta (@vmwjoseph) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_portgroup_info_module.rst b/docs/community.vmware.vmware_portgroup_info_module.rst index edf3ad7d2..6f63c24da 100644 --- a/docs/community.vmware.vmware_portgroup_info_module.rst +++ b/docs/community.vmware.vmware_portgroup_info_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_portgroup_info_module: -************************************** -community.vmware.vmware_portgroup_info -************************************** +community.vmware.vmware_portgroup_info module -- Gathers info about an ESXi host's Port Group configuration ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Gathers info about an ESXi host's Port Group configuration** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_portgroup_info`. .. contents:: @@ -16,212 +17,207 @@ community.vmware.vmware_portgroup_info Synopsis -------- + - This module can be used to gather information about an ESXi host's Port Group configuration when ESXi hostname or Cluster name is given. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- cluster_name - -
- string -
-
- -
Name of the cluster.
-
Info will be returned for all hostsystem belonging to this cluster name.
-
If esxi_hostname is not given, this parameter is required.
-
-
- esxi_hostname - -
- string -
-
- -
ESXi hostname to gather information from.
-
If cluster_name is not given, this parameter is required.
-
-
- 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
-
-
- policies - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Gather information about Security, Traffic Shaping, as well as Teaming and failover.
-
The property ts stands for Traffic Shaping and lb for Load Balancing.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

cluster_name

+ +

+ string +

+
+

Name of the cluster.

+

Info will be returned for all hostsystem belonging to this cluster name.

+

If esxi_hostname is not given, this parameter is required.

+
+
+

esxi_hostname

+ +

+ string +

+
+

ESXi hostname to gather information from.

+

If cluster_name is not given, this parameter is required.

+
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

policies

+ +

+ boolean +

+
+

Gather information about Security, Traffic Shaping, as well as Teaming and failover.

+

The property ts stands for Traffic Shaping and lb for Load Balancing.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -229,6 +225,7 @@ Examples .. code-block:: yaml + - name: Gather portgroup info about all ESXi Host in given Cluster community.vmware.vmware_portgroup_info: hostname: '{{ vcenter_hostname }}' @@ -247,41 +244,41 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- hosts_portgroup_info - -
- dictionary -
-
on success -
metadata about host's portgroup configuration
-
-
Sample:
-
{'esx01': [{'failback': True, 'failover_active': ['vmnic0', 'vmnic1'], 'failover_standby': [], 'failure_detection': 'link_status_only', 'lb': 'loadbalance_srcid', 'notify': True, 'portgroup': 'Management Network', 'security': [False, False, False], 'ts': 'No override', 'vlan_id': 0, 'vswitch': 'vSwitch0'}, {'failback': True, 'failover_active': ['vmnic2'], 'failover_standby': ['vmnic3'], 'failure_detection': 'No override', 'lb': 'No override', 'notify': True, 'portgroup': 'vMotion', 'security': [False, False, False], 'ts': 'No override', 'vlan_id': 33, 'vswitch': 'vSwitch1'}]}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

hosts_portgroup_info

+ +

+ dictionary +

+
+

metadata about host's portgroup configuration

+

Returned: on success

+

Sample: {"esx01": [{"failback": true, "failover_active": ["vmnic0", "vmnic1"], "failover_standby": [], "failure_detection": "link_status_only", "lb": "loadbalance_srcid", "notify": true, "portgroup": "Management Network", "security": [false, false, false], "ts": "No override", "vlan_id": 0, "vswitch": "vSwitch0"}, {"failback": true, "failover_active": ["vmnic2"], "failover_standby": ["vmnic3"], "failure_detection": "No override", "lb": "No override", "notify": true, "portgroup": "vMotion", "security": [false, false, false], "ts": "No override", "vlan_id": 33, "vswitch": "vSwitch1"}]}

+
+ + Authors @@ -289,3 +286,13 @@ Authors - Abhijeet Kasurde (@Akasurde) - Christian Kotte (@ckotte) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_portgroup_module.rst b/docs/community.vmware.vmware_portgroup_module.rst index cb7e67684..878993f76 100644 --- a/docs/community.vmware.vmware_portgroup_module.rst +++ b/docs/community.vmware.vmware_portgroup_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_portgroup_module: -********************************* -community.vmware.vmware_portgroup -********************************* +community.vmware.vmware_portgroup module -- Create a VMware portgroup ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Create a VMware portgroup** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_portgroup`. .. contents:: @@ -16,564 +17,560 @@ community.vmware.vmware_portgroup Synopsis -------- + - Create a VMware Port Group on a VMware Standard Switch (vSS) for given ESXi host(s) or hosts of given cluster. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- cluster_name - -
- string -
-
- -
Name of cluster name for host membership.
-
Portgroup will be created on all hosts of the given cluster.
-
This option is required if hosts is not specified.
-

aliases: cluster
-
-
- 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 name of host or hosts on which portgroup needs to be added.
-
This option is required if cluster_name is not specified.
-

aliases: esxi_hostname
-
-
- 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.
-
-
- portgroup - -
- string - / required -
-
- -
Portgroup name to add.
-

aliases: portgroup_name
-
-
- 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.
-
-
- security - -
- dictionary -
-
- -
Network policy specifies layer 2 security settings for a portgroup such as promiscuous mode, where guest adapter listens to all the packets, MAC address changes and forged transmits.
-
Dict which configures the different security values for portgroup.
-

aliases: security_policy, network_policy
-
-
- 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_mode - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Indicates whether promiscuous mode is allowed.
-
-
- state - -
- string -
-
-
    Choices: -
  • present ←
  • -
  • absent
  • -
-
-
Determines if the portgroup should be present or not.
-
-
- switch - -
- string - / required -
-
- -
vSwitch to modify.
-

aliases: switch_name, vswitch
-
-
- teaming - -
- dictionary -
-
- -
Dictionary which configures the different teaming values for portgroup.
-

aliases: teaming_policy
-
-
- active_adapters - -
- list - / elements=string -
-
- -
List of active adapters used for load balancing.
-
All vmnics are used as active adapters if active_adapters and standby_adapters are not defined.
-
-
- failback - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Indicate whether or not to use a failback when restoring links.
-
-
- load_balancing - -
- string -
-
-
    Choices: -
  • loadbalance_ip
  • -
  • loadbalance_srcmac
  • -
  • loadbalance_srcid
  • -
  • failover_explicit
  • -
-
-
Network adapter teaming policy.
-

aliases: load_balance_policy
-
-
- network_failure_detection - -
- string -
-
-
    Choices: -
  • link_status_only
  • -
  • beacon_probing
  • -
-
-
Network failure detection.
-
-
- notify_switches - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Indicate whether or not to notify the physical switch if a link fails.
-
-
- standby_adapters - -
- list - / elements=string -
-
- -
List of standby adapters used for failover.
-
All vmnics are used as active adapters if active_adapters and standby_adapters are not defined.
-
-
- traffic_shaping - -
- dictionary -
-
- -
Dictionary which configures traffic shaping for the switch.
-
-
- average_bandwidth - -
- integer -
-
- -
Average bandwidth (kbit/s).
-
-
- burst_size - -
- integer -
-
- -
Burst size (KB).
-
-
- enabled - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Status of Traffic Shaping Policy.
-
-
- peak_bandwidth - -
- integer -
-
- -
Peak bandwidth (kbit/s).
-
-
- 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 - -
- integer -
-
- Default:
0
-
-
VLAN ID to assign to portgroup.
-
Set to 0 (no VLAN tagging) by default.
-

aliases: vlan
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+
+

cluster_name

+ +

aliases: cluster

+

+ string +

+
+

Name of cluster name for host membership.

+

Portgroup will be created on all hosts of the given cluster.

+

This option is required if hosts is not specified.

+
+
+

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

+ +

aliases: esxi_hostname

+

+ list + / elements=string +

+
+

List of name of host or hosts on which portgroup needs to be added.

+

This option is required if cluster_name is not specified.

+
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+
+

portgroup

+ +

aliases: portgroup_name

+

+ string + / required +

+
+

Portgroup name to add.

+
+
+

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.

+
+
+
+
+

security

+ +

aliases: security_policy, network_policy

+

+ dictionary +

+
+

Network policy specifies layer 2 security settings for a portgroup such as promiscuous mode, where guest adapter listens to all the packets, MAC address changes and forged transmits.

+

Dict which configures the different security values for portgroup.

+
+
+
+
+

forged_transmits

+ +

+ boolean +

+
+

Indicates whether forged transmits are allowed.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+ +
+
+
+
+

mac_changes

+ +

+ boolean +

+
+

Indicates whether mac changes are allowed.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+ +
+
+
+
+

promiscuous_mode

+ +

+ boolean +

+
+

Indicates whether promiscuous mode is allowed.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+ +
+
+

state

+ +

+ string +

+
+

Determines if the portgroup should be present or not.

+

Choices:

+
    +
  • "present" ← (default)

  • +
  • "absent"

  • +
+ +
+
+
+
+

switch

+ +

aliases: switch_name, vswitch

+

+ string + / required +

+
+

vSwitch to modify.

+
+
+
+

teaming

+ +

aliases: teaming_policy

+

+ dictionary +

+
+

Dictionary which configures the different teaming values for portgroup.

+
+
+
+

active_adapters

+ +

+ list + / elements=string +

+
+

List of active adapters used for load balancing.

+

All vmnics are used as active adapters if active_adapters and standby_adapters are not defined.

+
+
+
+

failback

+ +

+ boolean +

+
+

Indicate whether or not to use a failback when restoring links.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+ +
+
+
+
+
+

load_balancing

+ +

aliases: load_balance_policy

+

+ string +

+
+

Network adapter teaming policy.

+

Choices:

+
    +
  • "loadbalance_ip"

  • +
  • "loadbalance_srcmac"

  • +
  • "loadbalance_srcid"

  • +
  • "failover_explicit"

  • +
+ +
+
+
+

network_failure_detection

+ +

+ string +

+
+

Network failure detection.

+

Choices:

+
    +
  • "link_status_only"

  • +
  • "beacon_probing"

  • +
+ +
+
+
+

notify_switches

+ +

+ boolean +

+
+

Indicate whether or not to notify the physical switch if a link fails.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+ +
+
+
+

standby_adapters

+ +

+ list + / elements=string +

+
+

List of standby adapters used for failover.

+

All vmnics are used as active adapters if active_adapters and standby_adapters are not defined.

+
+
+

traffic_shaping

+ +

+ dictionary +

+
+

Dictionary which configures traffic shaping for the switch.

+
+
+

average_bandwidth

+ +

+ integer +

+
+

Average bandwidth (kbit/s).

+
+
+

burst_size

+ +

+ integer +

+
+

Burst size (KB).

+
+
+

enabled

+ +

+ boolean +

+
+

Status of Traffic Shaping Policy.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+ +
+
+

peak_bandwidth

+ +

+ integer +

+
+

Peak bandwidth (kbit/s).

+
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+
+

vlan_id

+ +

aliases: vlan

+

+ integer +

+
+

VLAN ID to assign to portgroup.

+

Set to 0 (no VLAN tagging) by default.

+

Default: 0

+
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -581,6 +578,7 @@ Examples .. code-block:: yaml + - name: Add Management Network VM Portgroup community.vmware.vmware_portgroup: hostname: "{{ esxi_hostname }}" @@ -668,41 +666,41 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- result - -
- dictionary -
-
always -
metadata about the portgroup
-
-
Sample:
-
{'esxi01.example.com': {'changed': True, 'failback': 'No override', 'failover_active': 'No override', 'failover_standby': 'No override', 'failure_detection': 'No override', 'load_balancing': 'No override', 'msg': 'Port Group added', 'notify_switches': 'No override', 'portgroup': 'vMotion', 'sec_forged_transmits': False, 'sec_mac_changes': False, 'sec_promiscuous_mode': False, 'traffic_shaping': 'No override', 'vlan_id': 33, 'vswitch': 'vSwitch1'}}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

result

+ +

+ dictionary +

+
+

metadata about the portgroup

+

Returned: always

+

Sample: {"esxi01.example.com": {"changed": true, "failback": "No override", "failover_active": "No override", "failover_standby": "No override", "failure_detection": "No override", "load_balancing": "No override", "msg": "Port Group added", "notify_switches": "No override", "portgroup": "vMotion", "sec_forged_transmits": false, "sec_mac_changes": false, "sec_promiscuous_mode": false, "traffic_shaping": "No override", "vlan_id": 33, "vswitch": "vSwitch1"}}

+
+ + Authors @@ -712,3 +710,13 @@ Authors - Russell Teague (@mtnbikenc) - Abhijeet Kasurde (@Akasurde) - Christian Kotte (@ckotte) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_recommended_datastore_module.rst b/docs/community.vmware.vmware_recommended_datastore_module.rst index 441e65b1c..2d2614b6d 100644 --- a/docs/community.vmware.vmware_recommended_datastore_module.rst +++ b/docs/community.vmware.vmware_recommended_datastore_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_recommended_datastore_module: -********************************************* -community.vmware.vmware_recommended_datastore -********************************************* +community.vmware.vmware_recommended_datastore module -- Returns the recommended datastore from a SDRS-enabled datastore cluster ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Returns the recommended datastore from a SDRS-enabled datastore cluster** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_recommended_datastore`. .. contents:: @@ -16,192 +17,187 @@ community.vmware.vmware_recommended_datastore Synopsis -------- + - This module provides the recommended datastore name from a datastore cluster only if the SDRS is enabled for the specified datastore cluster + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- datacenter - -
- string - / required -
-
- -
Name of the datacenter.
-
-
- datastore_cluster - -
- string - / required -
-
- -
Name of the datastore cluster.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

datacenter

+ +

+ string + / required +

+
+

Name of the datacenter.

+
+
+

datastore_cluster

+ +

+ string + / required +

+
+

Name of the datastore cluster.

+
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - Supports Check mode. - - All modules requires API write access and hence is not supported on a free ESXi license. - +- Supports Check mode. +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -209,6 +205,7 @@ Examples .. code-block:: yaml + - name: Get recommended datastore from a Storage DRS-enabled datastore cluster community.vmware.vmware_recommended_datastore: hostname: '{{ vcenter_hostname }}' @@ -221,41 +218,41 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- recommended_datastore - -
- string -
-
always -
metadata about the recommended datastore
-
-
Sample:
-
{'recommended_datastore': 'datastore-01'}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+ +

recommended_datastore

+ +

+ string +

+
+

metadata about the recommended datastore

+

Returned: always

+

Sample: "{'recommended_datastore': 'datastore-01'}"

+
+ + Authors @@ -264,3 +261,13 @@ Authors - Unknown (@MalfuncEddie) - Alina Buzachis (@alinabuzachis) - Abhijeet Kasurde (@Akasurde) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_resource_pool_info_module.rst b/docs/community.vmware.vmware_resource_pool_info_module.rst index e7cab3b28..1dd7c55cf 100644 --- a/docs/community.vmware.vmware_resource_pool_info_module.rst +++ b/docs/community.vmware.vmware_resource_pool_info_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_resource_pool_info_module: -****************************************** -community.vmware.vmware_resource_pool_info -****************************************** +community.vmware.vmware_resource_pool_info module -- Gathers info about resource pool information ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Gathers info about resource pool information** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_resource_pool_info`. .. contents:: @@ -16,159 +17,158 @@ community.vmware.vmware_resource_pool_info Synopsis -------- + - This module can be used to gather information about all resource configuration information. + + + + 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.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -176,6 +176,7 @@ Examples .. code-block:: yaml + - name: Gather resource pool info about all resource pools available community.vmware.vmware_resource_pool_info: hostname: '{{ vcenter_hostname }}' @@ -186,44 +187,55 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- resource_pool_info - -
- list -
-
on success -
metadata about resource pool configuration
-
-
Sample:
-
[{'cpu_allocation_expandable_reservation': False, 'cpu_allocation_limit': 4121, 'cpu_allocation_overhead_limit': None, 'cpu_allocation_reservation': 4121, 'cpu_allocation_shares': 9000, 'cpu_allocation_shares_level': 'custom', 'mem_allocation_expandable_reservation': False, 'mem_allocation_limit': 961, 'mem_allocation_overhead_limit': None, 'mem_allocation_reservation': 961, 'mem_allocation_shares': 9000, 'mem_allocation_shares_level': 'custom', 'name': 'Resources', 'overall_status': 'green', 'owner': 'DC0_H0', 'runtime_cpu_max_usage': 4121, 'runtime_cpu_overall_usage': 0, 'runtime_cpu_reservation_used': 0, 'runtime_cpu_reservation_used_vm': 0, 'runtime_cpu_unreserved_for_pool': 4121, 'runtime_cpu_unreserved_for_vm': 4121, 'runtime_memory_max_usage': 1007681536, 'runtime_memory_overall_usage': 0, 'runtime_memory_reservation_used': 0, 'runtime_memory_reservation_used_vm': 0, 'runtime_memory_unreserved_for_pool': 1007681536, 'runtime_memory_unreserved_for_vm': 1007681536}]
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

resource_pool_info

+ +

+ list + / elements=string +

+
+

metadata about resource pool configuration

+

Returned: on success

+

Sample: [{"cpu_allocation_expandable_reservation": false, "cpu_allocation_limit": 4121, "cpu_allocation_overhead_limit": null, "cpu_allocation_reservation": 4121, "cpu_allocation_shares": 9000, "cpu_allocation_shares_level": "custom", "mem_allocation_expandable_reservation": false, "mem_allocation_limit": 961, "mem_allocation_overhead_limit": null, "mem_allocation_reservation": 961, "mem_allocation_shares": 9000, "mem_allocation_shares_level": "custom", "name": "Resources", "overall_status": "green", "owner": "DC0_H0", "runtime_cpu_max_usage": 4121, "runtime_cpu_overall_usage": 0, "runtime_cpu_reservation_used": 0, "runtime_cpu_reservation_used_vm": 0, "runtime_cpu_unreserved_for_pool": 4121, "runtime_cpu_unreserved_for_vm": 4121, "runtime_memory_max_usage": 1007681536, "runtime_memory_overall_usage": 0, "runtime_memory_reservation_used": 0, "runtime_memory_reservation_used_vm": 0, "runtime_memory_unreserved_for_pool": 1007681536, "runtime_memory_unreserved_for_vm": 1007681536}]

+
+ + Authors ~~~~~~~ - Abhijeet Kasurde (@Akasurde) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_resource_pool_module.rst b/docs/community.vmware.vmware_resource_pool_module.rst index 11748a5fc..6399fdb81 100644 --- a/docs/community.vmware.vmware_resource_pool_module.rst +++ b/docs/community.vmware.vmware_resource_pool_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_resource_pool_module: -************************************* -community.vmware.vmware_resource_pool -************************************* +community.vmware.vmware_resource_pool module -- Add/remove resource pools to/from vCenter ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Add/remove resource pools to/from vCenter** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_resource_pool`. .. contents:: @@ -16,442 +17,419 @@ community.vmware.vmware_resource_pool Synopsis -------- + - This module can be used to add/remove a resource pool to/from vCenter + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- cluster - -
- string -
-
- -
Name of the cluster to configure the resource pool.
-
This parameter is required if esxi_hostname or parent_resource_pool is not specified.
-
The cluster, esxi_hostname and parent_resource_pool parameters are mutually exclusive.
-
-
- cpu_allocation_shares - -
- integer -
-
- Default:
4000
-
-
The number of cpu shares allocated.
-
This value is only set if cpu_shares is set to custom.
-
-
- cpu_expandable_reservations - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
In a resource pool with an expandable reservation, the reservation on a resource pool can grow beyond the specified value.
-
-
- cpu_limit - -
- integer -
-
- Default:
-1
-
-
The utilization of a virtual machine/resource pool will not exceed this limit, even if there are available resources.
-
The default value -1 indicates no limit.
-
-
- cpu_reservation - -
- integer -
-
- Default:
0
-
-
Amount of resource that is guaranteed available to the virtual machine or resource pool.
-
-
- cpu_shares - -
- string -
-
-
    Choices: -
  • high
  • -
  • custom
  • -
  • low
  • -
  • normal ←
  • -
-
-
Memory shares are used in case of resource contention.
-
-
- datacenter - -
- string - / required -
-
- -
Name of the datacenter.
-
-
- esxi_hostname - -
- string -
-
- -
Name of the host to configure the resource pool.
-
The host must not be member of a cluster.
-
This parameter is required if cluster or parent_resource_pool is not specified.
-
The cluster, esxi_hostname and parent_resource_pool parameters are mutually exclusive.
-
-
- 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.
-
-
- mem_allocation_shares - -
- integer -
-
- Default:
163840
-
-
The number of memory shares allocated.
-
This value is only set if mem_shares is set to custom.
-
-
- mem_expandable_reservations - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
In a resource pool with an expandable reservation, the reservation on a resource pool can grow beyond the specified value.
-
-
- mem_limit - -
- integer -
-
- Default:
-1
-
-
The utilization of a virtual machine/resource pool will not exceed this limit, even if there are available resources.
-
The default value -1 indicates no limit.
-
-
- mem_reservation - -
- integer -
-
- Default:
0
-
-
Amount of resource that is guaranteed available to the virtual machine or resource pool.
-
-
- mem_shares - -
- string -
-
-
    Choices: -
  • high
  • -
  • custom
  • -
  • low
  • -
  • normal ←
  • -
-
-
Memory shares are used in case of resource contention.
-
-
- parent_resource_pool - -
- string -
-
- -
Name of the parent resource pool.
-
This parameter is required if cluster or esxi_hostname is not specified.
-
The cluster, esxi_hostname and parent_resource_pool parameters are mutually exclusive.
-
-
- 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 - / required -
-
- -
Resource pool name to manage.
-
-
- state - -
- string -
-
-
    Choices: -
  • present ←
  • -
  • absent
  • -
-
-
Add or remove the resource pool
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

cluster

+ +

+ string +

+
+

Name of the cluster to configure the resource pool.

+

This parameter is required if esxi_hostname or parent_resource_pool is not specified.

+

The cluster, esxi_hostname and parent_resource_pool parameters are mutually exclusive.

+
+
+

cpu_allocation_shares

+ +

+ integer +

+
+

The number of cpu shares allocated.

+

This value is only set if cpu_shares is set to custom.

+

Default: 4000

+
+
+

cpu_expandable_reservations

+ +

+ boolean +

+
+

In a resource pool with an expandable reservation, the reservation on a resource pool can grow beyond the specified value.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

cpu_limit

+ +

+ integer +

+
+

The utilization of a virtual machine/resource pool will not exceed this limit, even if there are available resources.

+

The default value -1 indicates no limit.

+

Default: -1

+
+
+

cpu_reservation

+ +

+ integer +

+
+

Amount of resource that is guaranteed available to the virtual machine or resource pool.

+

Default: 0

+
+
+

cpu_shares

+ +

+ string +

+
+

Memory shares are used in case of resource contention.

+

Choices:

+
    +
  • "high"

  • +
  • "custom"

  • +
  • "low"

  • +
  • "normal" ← (default)

  • +
+ +
+
+

datacenter

+ +

+ string + / required +

+
+

Name of the datacenter.

+
+
+

esxi_hostname

+ +

+ string +

+
+

Name of the host to configure the resource pool.

+

The host must not be member of a cluster.

+

This parameter is required if cluster or parent_resource_pool is not specified.

+

The cluster, esxi_hostname and parent_resource_pool parameters are mutually exclusive.

+
+
+

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.

+
+
+

mem_allocation_shares

+ +

+ integer +

+
+

The number of memory shares allocated.

+

This value is only set if mem_shares is set to custom.

+

Default: 163840

+
+
+

mem_expandable_reservations

+ +

+ boolean +

+
+

In a resource pool with an expandable reservation, the reservation on a resource pool can grow beyond the specified value.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

mem_limit

+ +

+ integer +

+
+

The utilization of a virtual machine/resource pool will not exceed this limit, even if there are available resources.

+

The default value -1 indicates no limit.

+

Default: -1

+
+
+

mem_reservation

+ +

+ integer +

+
+

Amount of resource that is guaranteed available to the virtual machine or resource pool.

+

Default: 0

+
+
+

mem_shares

+ +

+ string +

+
+

Memory shares are used in case of resource contention.

+

Choices:

+
    +
  • "high"

  • +
  • "custom"

  • +
  • "low"

  • +
  • "normal" ← (default)

  • +
+ +
+
+

parent_resource_pool

+ +

+ string +

+
+

Name of the parent resource pool.

+

This parameter is required if cluster or esxi_hostname is not specified.

+

The cluster, esxi_hostname and parent_resource_pool parameters are mutually exclusive.

+
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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 + / required +

+
+

Resource pool name to manage.

+
+
+

state

+ +

+ string +

+
+

Add or remove the resource pool

+

Choices:

+
    +
  • "present" ← (default)

  • +
  • "absent"

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -459,6 +437,7 @@ Examples .. code-block:: yaml + - name: Add resource pool to vCenter community.vmware.vmware_resource_pool: hostname: '{{ vcenter_hostname }}' @@ -480,92 +459,69 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- instance - -
- dictionary -
-
always -
metadata about the new resource pool
-
-
Sample:
-
None
-
-
- resource_pool_config - -
- dictionary -
-
always -
config data about the resource pool, version added 1.4.0
-
-
Sample:
-
{ - "_vimtype": "vim.ResourceConfigSpec", - "changeVersion": null, - "cpuAllocation": { - "_vimtype": "vim.ResourceAllocationInfo", - "expandableReservation": true, - "limit": -1, - "overheadLimit": null, - "reservation": 0, - "shares": { - "_vimtype": "vim.SharesInfo", - "level": "normal", - "shares": 4000 - } - }, - "entity": "vim.ResourcePool:resgroup-1108", - "lastModified": null, - "memoryAllocation": { - "_vimtype": "vim.ResourceAllocationInfo", - "expandableReservation": true, - "limit": -1, - "overheadLimit": null, - "reservation": 0, - "shares": { - "_vimtype": "vim.SharesInfo", - "level": "high", - "shares": 327680 - } - }, - "name": "test_pr1", - "scaleDescendantsShares": null - }
-
-

- - -Status ------- + + + + + + + + + + + + + + + + + +

Key

Description

+
+

instance

+ +

+ dictionary +

+
+

metadata about the new resource pool

+

Returned: always

+

Sample: "None"

+
+
+

resource_pool_config

+ +

+ dictionary +

+
+

config data about the resource pool, version added 1.4.0

+

Returned: always

+

Sample: {"_vimtype": "vim.ResourceConfigSpec", "changeVersion": null, "cpuAllocation": {"_vimtype": "vim.ResourceAllocationInfo", "expandableReservation": true, "limit": -1, "overheadLimit": null, "reservation": 0, "shares": {"_vimtype": "vim.SharesInfo", "level": "normal", "shares": 4000}}, "entity": "vim.ResourcePool:resgroup-1108", "lastModified": null, "memoryAllocation": {"_vimtype": "vim.ResourceAllocationInfo", "expandableReservation": true, "limit": -1, "overheadLimit": null, "reservation": 0, "shares": {"_vimtype": "vim.SharesInfo", "level": "high", "shares": 327680}}, "name": "test_pr1", "scaleDescendantsShares": null}

+
+ + Authors ~~~~~~~ - Davis Phillips (@dav1x) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_tag_info_module.rst b/docs/community.vmware.vmware_tag_info_module.rst index aaeaa9563..400faf942 100644 --- a/docs/community.vmware.vmware_tag_info_module.rst +++ b/docs/community.vmware.vmware_tag_info_module.rst @@ -1,12 +1,15 @@ -.. _community.vmware.vmware_tag_info_module: -******************************** -community.vmware.vmware_tag_info -******************************** +community.vmware.vmware_tag_info module -- Manage VMware tag info ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Manage VMware tag info** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. +You need further requirements to be able to use this module, +see `Requirements `_ for details. + +To use it in a playbook, specify: :code:`community.vmware.vmware_tag_info`. .. contents:: @@ -16,12 +19,15 @@ community.vmware.vmware_tag_info Synopsis -------- + - This module can be used to collect information about VMware tags. - Tag feature is introduced in vSphere 6 version, so this module is not supported in the earlier versions of vSphere. - All variables and VMware object names are case sensitive. +.. _ansible_collections.community.vmware.vmware_tag_info_module_requirements: + Requirements ------------ The below requirements are needed on the host that executes this module. @@ -29,159 +35,159 @@ The below requirements are needed on the host that executes this module. - vSphere Automation SDK + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- hostname - -
- string -
-
- -
The hostname or IP address of the vSphere vCenter server.
-
If the value is not specified in the task, the value of environment variable VMWARE_HOST will be used instead.
-
-
- password - -
- string -
-
- -
The password of the vSphere vCenter server.
-
If the value is not specified in the task, the value of environment variable VMWARE_PASSWORD will be used instead.
-

aliases: pass, pwd
-
-
- port - -
- integer -
-
- Default:
443
-
-
The port number of the vSphere vCenter.
-
If the value is not specified in the task, the value of environment variable VMWARE_PORT will be used instead.
-
-
- protocol - -
- string -
-
-
    Choices: -
  • http
  • -
  • https ←
  • -
-
-
The connection to protocol.
-
-
- 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.
-
-
- 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 server.
-
If the value is not specified in the task, the value of environment variable VMWARE_USER will be used instead.
-

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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

hostname

+ +

+ string +

+
+

The hostname or IP address of the vSphere vCenter server.

+

If the value is not specified in the task, the value of environment variable VMWARE_HOST will be used instead.

+
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ string +

+
+

The password of the vSphere vCenter server.

+

If the value is not specified in the task, the value of environment variable VMWARE_PASSWORD will be used instead.

+
+
+

port

+ +

+ integer +

+
+

The port number of the vSphere vCenter.

+

If the value is not specified in the task, the value of environment variable VMWARE_PORT will be used instead.

+

Default: 443

+
+
+

protocol

+ +

+ string +

+
+

The connection to protocol.

+

Choices:

+
    +
  • "http"

  • +
  • "https" ← (default)

  • +
+ +
+
+

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.

+
+
+

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

+ +

aliases: admin, user

+

+ string +

+
+

The username of the vSphere vCenter server.

+

If the value is not specified in the task, the value of environment variable VMWARE_USER will be used instead.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + @@ -191,6 +197,7 @@ Examples .. code-block:: yaml + - name: Get info about tag community.vmware.vmware_tag_info: hostname: '{{ vcenter_hostname }}' @@ -224,61 +231,70 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- tag_facts - -
- dictionary -
-
on success -
dictionary of tag metadata
-
-
Sample:
-
{'Sample_Tag_0002': {'tag_category_id': 'urn:vmomi:InventoryServiceCategory:6de17f28-7694-43ec-a783-d09c141819ae:GLOBAL', 'tag_description': 'Sample Description', 'tag_id': 'urn:vmomi:InventoryServiceTag:a141f212-0f82-4f05-8eb3-c49647c904c5:GLOBAL', 'tag_used_by': []}, 'fedora_machines': {'tag_category_id': 'urn:vmomi:InventoryServiceCategory:baa90bae-951b-4e87-af8c-be681a1ba30c:GLOBAL', 'tag_description': '', 'tag_id': 'urn:vmomi:InventoryServiceTag:7d27d182-3ecd-4200-9d72-410cc6398a8a:GLOBAL', 'tag_used_by': []}, 'ubuntu_machines': {'tag_category_id': 'urn:vmomi:InventoryServiceCategory:89573410-29b4-4cac-87a4-127c084f3d50:GLOBAL', 'tag_description': '', 'tag_id': 'urn:vmomi:InventoryServiceTag:7f3516d5-a750-4cb9-8610-6747eb39965d:GLOBAL', 'tag_used_by': []}}
-
-
- tag_info - -
- list -
-
on success -
list of tag metadata
-
-
Sample:
-
[{'tag_name': 'Sample_Tag_0002', 'tag_category_id': 'urn:vmomi:InventoryServiceCategory:6de17f28-7694-43ec-a783-d09c141819ae:GLOBAL', 'tag_description': 'Sample Description', 'tag_id': 'urn:vmomi:InventoryServiceTag:a141f212-0f82-4f05-8eb3-c49647c904c5:GLOBAL', 'tag_used_by': []}, {'tag_name': 'Sample_Tag_0002', 'tag_category_id': 'urn:vmomi:InventoryServiceCategory:6de17f28-7694-43ec-a783-d09c141819ae:GLOBAL', 'tag_description': '', 'tag_id': 'urn:vmomi:InventoryServiceTag:7d27d182-3ecd-4200-9d72-410cc6398a8a:GLOBAL', 'tag_used_by': []}, {'tag_name': 'ubuntu_machines', 'tag_category_id': 'urn:vmomi:InventoryServiceCategory:89573410-29b4-4cac-87a4-127c084f3d50:GLOBAL', 'tag_description': '', 'tag_id': 'urn:vmomi:InventoryServiceTag:7f3516d5-a750-4cb9-8610-6747eb39965d:GLOBAL', 'tag_used_by': []}]
-
-

- - -Status ------- + + + + + + + + + + + + + + + + + +

Key

Description

+
+

tag_facts

+ +

+ dictionary +

+
+

dictionary of tag metadata

+

Returned: on success

+

Sample: {"Sample_Tag_0002": {"tag_category_id": "urn:vmomi:InventoryServiceCategory:6de17f28-7694-43ec-a783-d09c141819ae:GLOBAL", "tag_description": "Sample Description", "tag_id": "urn:vmomi:InventoryServiceTag:a141f212-0f82-4f05-8eb3-c49647c904c5:GLOBAL", "tag_used_by": []}, "fedora_machines": {"tag_category_id": "urn:vmomi:InventoryServiceCategory:baa90bae-951b-4e87-af8c-be681a1ba30c:GLOBAL", "tag_description": "", "tag_id": "urn:vmomi:InventoryServiceTag:7d27d182-3ecd-4200-9d72-410cc6398a8a:GLOBAL", "tag_used_by": []}, "ubuntu_machines": {"tag_category_id": "urn:vmomi:InventoryServiceCategory:89573410-29b4-4cac-87a4-127c084f3d50:GLOBAL", "tag_description": "", "tag_id": "urn:vmomi:InventoryServiceTag:7f3516d5-a750-4cb9-8610-6747eb39965d:GLOBAL", "tag_used_by": []}}

+
+
+

tag_info

+ +

+ list + / elements=string +

+
+

list of tag metadata

+

Returned: on success

+

Sample: [{"tag_category_id": "urn:vmomi:InventoryServiceCategory:6de17f28-7694-43ec-a783-d09c141819ae:GLOBAL", "tag_description": "Sample Description", "tag_id": "urn:vmomi:InventoryServiceTag:a141f212-0f82-4f05-8eb3-c49647c904c5:GLOBAL", "tag_name": "Sample_Tag_0002", "tag_used_by": []}, {"tag_category_id": "urn:vmomi:InventoryServiceCategory:6de17f28-7694-43ec-a783-d09c141819ae:GLOBAL", "tag_description": "", "tag_id": "urn:vmomi:InventoryServiceTag:7d27d182-3ecd-4200-9d72-410cc6398a8a:GLOBAL", "tag_name": "Sample_Tag_0002", "tag_used_by": []}, {"tag_category_id": "urn:vmomi:InventoryServiceCategory:89573410-29b4-4cac-87a4-127c084f3d50:GLOBAL", "tag_description": "", "tag_id": "urn:vmomi:InventoryServiceTag:7f3516d5-a750-4cb9-8610-6747eb39965d:GLOBAL", "tag_name": "ubuntu_machines", "tag_used_by": []}]

+
+ + Authors ~~~~~~~ - Abhijeet Kasurde (@Akasurde) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_tag_manager_module.rst b/docs/community.vmware.vmware_tag_manager_module.rst index fef1a255f..fb5207843 100644 --- a/docs/community.vmware.vmware_tag_manager_module.rst +++ b/docs/community.vmware.vmware_tag_manager_module.rst @@ -1,12 +1,15 @@ -.. _community.vmware.vmware_tag_manager_module: -*********************************** -community.vmware.vmware_tag_manager -*********************************** +community.vmware.vmware_tag_manager module -- Manage association of VMware tags with VMware objects ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Manage association of VMware tags with VMware objects** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. +You need further requirements to be able to use this module, +see `Requirements `_ for details. + +To use it in a playbook, specify: :code:`community.vmware.vmware_tag_manager`. .. contents:: @@ -16,12 +19,15 @@ community.vmware.vmware_tag_manager Synopsis -------- + - This module can be used to assign / remove VMware tags from the given VMware objects. - Tag feature is introduced in vSphere 6 version, so this module is not supported in the earlier versions of vSphere. - All variables and VMware object names are case sensitive. +.. _ansible_collections.community.vmware.vmware_tag_manager_module_requirements: + Requirements ------------ The below requirements are needed on the host that executes this module. @@ -29,264 +35,258 @@ The below requirements are needed on the host that executes this module. - vSphere Automation SDK + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- hostname - -
- string -
-
- -
The hostname or IP address of the vSphere vCenter server.
-
If the value is not specified in the task, the value of environment variable VMWARE_HOST will be used instead.
-
-
- moid - -
- string -
-
- -
Managed object ID for the given object.
-
Required if object_name is not set.
-
-
- object_name - -
- string -
-
- -
Name of the object to work with.
-
For DistributedVirtualPortgroups the format should be "switch_name:portgroup_name"
-
Required if moid is not set.
-
-
- object_type - -
- string - / required -
-
-
    Choices: -
  • VirtualMachine
  • -
  • Datacenter
  • -
  • ClusterComputeResource
  • -
  • HostSystem
  • -
  • DistributedVirtualSwitch
  • -
  • DistributedVirtualPortgroup
  • -
  • Datastore
  • -
  • DatastoreCluster
  • -
  • ResourcePool
  • -
  • Folder
  • -
-
-
Type of object to work with.
-
-
- password - -
- string -
-
- -
The password of the vSphere vCenter server.
-
If the value is not specified in the task, the value of environment variable VMWARE_PASSWORD will be used instead.
-

aliases: pass, pwd
-
-
- port - -
- integer -
-
- Default:
443
-
-
The port number of the vSphere vCenter.
-
If the value is not specified in the task, the value of environment variable VMWARE_PORT will be used instead.
-
-
- protocol - -
- string -
-
-
    Choices: -
  • http
  • -
  • https ←
  • -
-
-
The connection to protocol.
-
-
- 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.
-
-
- 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
  • -
  • add ←
  • -
  • remove
  • -
  • set
  • -
-
-
If state is set to add or present will add the tags to the existing tag list of the given object.
-
If state is set to remove or absent will remove the tags from the existing tag list of the given object.
-
If state is set to set will replace the tags of the given objects with the user defined list of tags.
-
-
- tag_names - -
- list - / elements=raw - / required -
-
- -
List of tag(s) to be managed.
-
User can also specify category name by specifying colon separated value. For example, "category_name:tag_name".
-
User can also specify tag and category as dict, when tag or category contains colon. See example for more information. Added in version 2.10.
-
User can skip category name if you have unique tag names.
-
-
- username - -
- string -
-
- -
The username of the vSphere vCenter server.
-
If the value is not specified in the task, the value of environment variable VMWARE_USER will be used instead.
-

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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

hostname

+ +

+ string +

+
+

The hostname or IP address of the vSphere vCenter server.

+

If the value is not specified in the task, the value of environment variable VMWARE_HOST will be used instead.

+
+
+

moid

+ +

+ string +

+
+

Managed object ID for the given object.

+

Required if object_name is not set.

+
+
+

object_name

+ +

+ string +

+
+

Name of the object to work with.

+

For DistributedVirtualPortgroups the format should be "switch_name:portgroup_name"

+

Required if moid is not set.

+
+
+

object_type

+ +

+ string + / required +

+
+

Type of object to work with.

+

Choices:

+
    +
  • "VirtualMachine"

  • +
  • "Datacenter"

  • +
  • "ClusterComputeResource"

  • +
  • "HostSystem"

  • +
  • "DistributedVirtualSwitch"

  • +
  • "DistributedVirtualPortgroup"

  • +
  • "Datastore"

  • +
  • "DatastoreCluster"

  • +
  • "ResourcePool"

  • +
  • "Folder"

  • +
+ +
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ string +

+
+

The password of the vSphere vCenter server.

+

If the value is not specified in the task, the value of environment variable VMWARE_PASSWORD will be used instead.

+
+
+

port

+ +

+ integer +

+
+

The port number of the vSphere vCenter.

+

If the value is not specified in the task, the value of environment variable VMWARE_PORT will be used instead.

+

Default: 443

+
+
+

protocol

+ +

+ string +

+
+

The connection to protocol.

+

Choices:

+
    +
  • "http"

  • +
  • "https" ← (default)

  • +
+ +
+
+

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.

+
+
+

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 +

+
+

If state is set to add or present will add the tags to the existing tag list of the given object.

+

If state is set to remove or absent will remove the tags from the existing tag list of the given object.

+

If state is set to set will replace the tags of the given objects with the user defined list of tags.

+

Choices:

+
    +
  • "present"

  • +
  • "absent"

  • +
  • "add" ← (default)

  • +
  • "remove"

  • +
  • "set"

  • +
+ +
+
+

tag_names

+ +

+ list + / elements=any + / required +

+
+

List of tag(s) to be managed.

+

User can also specify category name by specifying colon separated value. For example, "category_name:tag_name".

+

User can also specify tag and category as dict, when tag or category contains colon. See example for more information. Added in version 2.10.

+

User can skip category name if you have unique tag names.

+
+
+
+
+

username

+ +

aliases: admin, user

+

+ string +

+
+

The username of the vSphere vCenter server.

+

If the value is not specified in the task, the value of environment variable VMWARE_USER will be used instead.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + @@ -296,6 +296,7 @@ Examples .. code-block:: yaml + - name: Add tags to a virtual machine community.vmware.vmware_tag_manager: hostname: '{{ vcenter_hostname }}' @@ -386,41 +387,43 @@ Examples + + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- tag_status - -
- list -
-
on success -
metadata about tags related to object configuration
-
-
Sample:
-
{'attached_tags': ['urn:vmomi:InventoryServiceCategory:76f69e84-f6b9-4e64-954c-fac545d2c0ba:GLOBAL:security'], 'current_tags': ['urn:vmomi:InventoryServiceCategory:927f5ff8-62e6-4364-bc94-23e3bfd7dee7:GLOBAL:backup', 'urn:vmomi:InventoryServiceCategory:76f69e84-f6b9-4e64-954c-fac545d2c0ba:GLOBAL:security'], 'detached_tags': [], 'previous_tags': ['urn:vmomi:InventoryServiceCategory:927f5ff8-62e6-4364-bc94-23e3bfd7dee7:GLOBAL:backup']}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

tag_status

+ +

+ list + / elements=string +

+
+

metadata about tags related to object configuration

+

Returned: on success

+

Sample: {"attached_tags": ["urn:vmomi:InventoryServiceCategory:76f69e84-f6b9-4e64-954c-fac545d2c0ba:GLOBAL:security"], "current_tags": ["urn:vmomi:InventoryServiceCategory:927f5ff8-62e6-4364-bc94-23e3bfd7dee7:GLOBAL:backup", "urn:vmomi:InventoryServiceCategory:76f69e84-f6b9-4e64-954c-fac545d2c0ba:GLOBAL:security"], "detached_tags": [], "previous_tags": ["urn:vmomi:InventoryServiceCategory:927f5ff8-62e6-4364-bc94-23e3bfd7dee7:GLOBAL:backup"]}

+
+ + Authors @@ -428,3 +431,13 @@ Authors - Abhijeet Kasurde (@Akasurde) - Frederic Van Reet (@GBrawl) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_tag_module.rst b/docs/community.vmware.vmware_tag_module.rst index 85307aa9f..31d3748e0 100644 --- a/docs/community.vmware.vmware_tag_module.rst +++ b/docs/community.vmware.vmware_tag_module.rst @@ -1,12 +1,15 @@ -.. _community.vmware.vmware_tag_module: -*************************** -community.vmware.vmware_tag -*************************** +community.vmware.vmware_tag module -- Manage VMware tags +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Manage VMware tags** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. +You need further requirements to be able to use this module, +see `Requirements `_ for details. + +To use it in a playbook, specify: :code:`community.vmware.vmware_tag`. .. contents:: @@ -16,12 +19,15 @@ community.vmware.vmware_tag Synopsis -------- + - This module can be used to create / delete / update VMware tags. - Tag feature is introduced in vSphere 6 version, so this module is not supported in the earlier versions of vSphere. - All variables and VMware object names are case sensitive. +.. _ansible_collections.community.vmware.vmware_tag_module_requirements: + Requirements ------------ The below requirements are needed on the host that executes this module. @@ -29,254 +35,250 @@ The below requirements are needed on the host that executes this module. - vSphere Automation SDK + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- category_id - -
- string -
-
- -
The unique ID generated by vCenter should be used to.
-
User can get this unique ID from facts module.
-
Required if category_name is not set.
-
-
- category_name - -
- string -
-
added in 3.5.0
-
- -
The name of category.
-
Required if category_id is not set.
-

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

aliases: pass, pwd
-
-
- port - -
- integer -
-
- Default:
443
-
-
The port number of the vSphere vCenter.
-
If the value is not specified in the task, the value of environment variable VMWARE_PORT will be used instead.
-
-
- protocol - -
- string -
-
-
    Choices: -
  • http
  • -
  • https ←
  • -
-
-
The connection to protocol.
-
-
- 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.
-
-
- 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
  • -
-
-
The state of tag.
-
If set to present and tag does not exists, then tag is created.
-
If set to present and tag exists, then tag is updated.
-
If set to absent and tag exists, then tag is deleted.
-
If set to absent and tag does not exists, no action is taken.
-
-
- tag_description - -
- string -
-
- Default:
""
-
-
The tag description.
-
This is required only if state is set to present.
-
This parameter is ignored, when state is set to absent.
-
Process of updating tag only allows description change.
-

aliases: description
-
-
- tag_name - -
- string - / required -
-
- -
The name of tag to manage.
-

aliases: tag, name
-
-
- username - -
- string -
-
- -
The username of the vSphere vCenter server.
-
If the value is not specified in the task, the value of environment variable VMWARE_USER will be used instead.
-

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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

category_id

+ +

+ string +

+
+

The unique ID generated by vCenter should be used to.

+

User can get this unique ID from facts module.

+

Required if category_name is not set.

+
+
+
+

category_name

+ +

aliases: category

+

+ string +

+

added in community.vmware 3.5.0

+
+

The name of category.

+

Required if category_id is not set.

+
+
+

hostname

+ +

+ string +

+
+

The hostname or IP address of the vSphere vCenter server.

+

If the value is not specified in the task, the value of environment variable VMWARE_HOST will be used instead.

+
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ string +

+
+

The password of the vSphere vCenter server.

+

If the value is not specified in the task, the value of environment variable VMWARE_PASSWORD will be used instead.

+
+
+

port

+ +

+ integer +

+
+

The port number of the vSphere vCenter.

+

If the value is not specified in the task, the value of environment variable VMWARE_PORT will be used instead.

+

Default: 443

+
+
+

protocol

+ +

+ string +

+
+

The connection to protocol.

+

Choices:

+
    +
  • "http"

  • +
  • "https" ← (default)

  • +
+ +
+
+

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.

+
+
+

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 +

+
+

The state of tag.

+

If set to present and tag does not exists, then tag is created.

+

If set to present and tag exists, then tag is updated.

+

If set to absent and tag exists, then tag is deleted.

+

If set to absent and tag does not exists, no action is taken.

+

Choices:

+
    +
  • "present" ← (default)

  • +
  • "absent"

  • +
+ +
+
+
+

tag_description

+ +

aliases: description

+

+ string +

+
+

The tag description.

+

This is required only if state is set to present.

+

This parameter is ignored, when state is set to absent.

+

Process of updating tag only allows description change.

+

Default: ""

+
+
+
+
+

tag_name

+ +

aliases: tag, name

+

+ string + / required +

+
+

The name of tag to manage.

+
+
+
+
+

username

+ +

aliases: admin, user

+

+ string +

+
+

The username of the vSphere vCenter server.

+

If the value is not specified in the task, the value of environment variable VMWARE_USER will be used instead.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + @@ -286,6 +288,7 @@ Examples .. code-block:: yaml + - name: Create a tag community.vmware.vmware_tag: hostname: '{{ vcenter_hostname }}' @@ -318,44 +321,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- tag_status - -
- dictionary -
-
on success -
dictionary of tag metadata
-
-
Sample:
-
{'msg': "Tag 'Sample_Tag_0002' created.", 'tag_id': 'urn:vmomi:InventoryServiceTag:bff91819-f529-43c9-80ca-1c9dfda09441:GLOBAL'}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

tag_status

+ +

+ dictionary +

+
+

dictionary of tag metadata

+

Returned: on success

+

Sample: {"msg": "Tag 'Sample_Tag_0002' created.", "tag_id": "urn:vmomi:InventoryServiceTag:bff91819-f529-43c9-80ca-1c9dfda09441:GLOBAL"}

+
+ + Authors ~~~~~~~ - Abhijeet Kasurde (@Akasurde) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_target_canonical_info_module.rst b/docs/community.vmware.vmware_target_canonical_info_module.rst index 326bdbb74..f5b2ce863 100644 --- a/docs/community.vmware.vmware_target_canonical_info_module.rst +++ b/docs/community.vmware.vmware_target_canonical_info_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_target_canonical_info_module: -********************************************* -community.vmware.vmware_target_canonical_info -********************************************* +community.vmware.vmware_target_canonical_info module -- Return canonical (NAA) from an ESXi host system ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Return canonical (NAA) from an ESXi host system** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_target_canonical_info`. .. contents:: @@ -16,209 +17,202 @@ community.vmware.vmware_target_canonical_info Synopsis -------- + - This module can be used to gather information about canonical (NAA) from an ESXi host based on SCSI target ID. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- cluster_name - -
- string -
-
- -
Name of the cluster.
-
Info about all SCSI devices for all host system in the given cluster is returned.
-
This parameter is required, if esxi_hostname is not provided.
-
-
- esxi_hostname - -
- string -
-
- -
Name of the ESXi host system.
-
Info about all SCSI devices for the given ESXi host system is returned.
-
This parameter is required, if cluster_name is not provided.
-
-
- 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.
-
-
- target_id - -
- integer -
-
- -
The target id based on order of scsi device.
-
version 2.6 onwards, this parameter is optional.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

cluster_name

+ +

+ string +

+
+

Name of the cluster.

+

Info about all SCSI devices for all host system in the given cluster is returned.

+

This parameter is required, if esxi_hostname is not provided.

+
+
+

esxi_hostname

+ +

+ string +

+
+

Name of the ESXi host system.

+

Info about all SCSI devices for the given ESXi host system is returned.

+

This parameter is required, if cluster_name is not provided.

+
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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.

+
+
+

target_id

+ +

+ integer +

+
+

The target id based on order of scsi device.

+

version 2.6 onwards, this parameter is optional.

+
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -226,6 +220,7 @@ Examples .. code-block:: yaml + - name: Get Canonical name of particular target on particular ESXi host system community.vmware.vmware_target_canonical_info: hostname: '{{ vcenter_hostname }}' @@ -253,58 +248,56 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- canonical - -
- string -
-
if host system and target id is given -
metadata about SCSI Target device
-
-
Sample:
-
mpx.vmhba0:C0:T0:L0
-
-
- scsi_tgt_info - -
- dictionary -
-
if host system or cluster is given -
metadata about all SCSI Target devices
-
-
Sample:
-
{'DC0_C0_H0': {'scsilun_canonical': {'key-vim.host.ScsiDisk-0000000000766d686261303a303a30': 'mpx.vmhba0:C0:T0:L0', 'key-vim.host.ScsiLun-0005000000766d686261313a303a30': 'mpx.vmhba1:C0:T0:L0'}, 'target_lun_uuid': {'0': 'key-vim.host.ScsiDisk-0000000000766d686261303a303a30'}}, 'DC0_C0_H1': {'scsilun_canonical': {'key-vim.host.ScsiDisk-0000000000766d686261303a303a30': 'mpx.vmhba0:C0:T0:L0', 'key-vim.host.ScsiLun-0005000000766d686261313a303a30': 'mpx.vmhba1:C0:T0:L0'}, 'target_lun_uuid': {'0': 'key-vim.host.ScsiDisk-0000000000766d686261303a303a30'}}}
-
-

- - -Status ------- + + + + + + + + + + + + + + + + + +

Key

Description

+
+

canonical

+ +

+ string +

+
+

metadata about SCSI Target device

+

Returned: if host system and target id is given

+

Sample: "mpx.vmhba0:C0:T0:L0"

+
+
+

scsi_tgt_info

+ +

+ dictionary +

+
+

metadata about all SCSI Target devices

+

Returned: if host system or cluster is given

+

Sample: {"DC0_C0_H0": {"scsilun_canonical": {"key-vim.host.ScsiDisk-0000000000766d686261303a303a30": "mpx.vmhba0:C0:T0:L0", "key-vim.host.ScsiLun-0005000000766d686261313a303a30": "mpx.vmhba1:C0:T0:L0"}, "target_lun_uuid": {"0": "key-vim.host.ScsiDisk-0000000000766d686261303a303a30"}}, "DC0_C0_H1": {"scsilun_canonical": {"key-vim.host.ScsiDisk-0000000000766d686261303a303a30": "mpx.vmhba0:C0:T0:L0", "key-vim.host.ScsiLun-0005000000766d686261313a303a30": "mpx.vmhba1:C0:T0:L0"}, "target_lun_uuid": {"0": "key-vim.host.ScsiDisk-0000000000766d686261303a303a30"}}}

+
+ + Authors @@ -312,3 +305,13 @@ Authors - Joseph Callen (@jcpowermac) - Abhijeet Kasurde (@Akasurde) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_tools_connection.rst b/docs/community.vmware.vmware_tools_connection.rst index 80e6cd333..97fe93be7 100644 --- a/docs/community.vmware.vmware_tools_connection.rst +++ b/docs/community.vmware.vmware_tools_connection.rst @@ -1,12 +1,15 @@ -.. _community.vmware.vmware_tools_connection: -***************************** -community.vmware.vmware_tools -***************************** +community.vmware.vmware_tools connection -- Execute tasks inside a VM via VMware Tools +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Execute tasks inside a VM via VMware Tools** +This connection plugin is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. +You need further requirements to be able to use this connection plugin, +see `Requirements `_ for details. + +To use it in a playbook, specify: :code:`community.vmware.vmware_tools`. .. contents:: @@ -16,311 +19,412 @@ community.vmware.vmware_tools Synopsis -------- + - Use VMware tools to run tasks in, or put/fetch files to guest operating systems running in VMware infrastructure. -- In case of Windows VMs, set ``ansible_shell_type`` to ``powershell``. +- In case of Windows VMs, set \ :literal:`ansible\_shell\_type`\ to \ :literal:`powershell`\ . - Does not work with 'become'. +.. _ansible_collections.community.vmware.vmware_tools_connection_requirements: + Requirements ------------ -The below requirements are needed on the local Ansible controller node that executes this connection. +The below requirements are needed on the local controller node that executes this connection. - requests (Python library) + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsConfigurationComments
-
- exec_command_sleep_interval - -
- float -
-
- Default:
0.5
-
-
var: ansible_vmware_tools_exec_command_sleep_interval
-
-
Time in seconds to sleep between execution of command.
-
-
- executable - -
- - -
-
- Default:
"/bin/sh"
-
-
ini entries: -

[defaults]
executable = /bin/sh

-
-
env:ANSIBLE_EXECUTABLE
-
var: ansible_executable
-
var: ansible_vmware_tools_executable
-
-
shell to use for execution inside container
-
-
- file_chunk_size - -
- integer -
-
- Default:
128
-
-
var: ansible_vmware_tools_file_chunk_size
-
-
File chunk size.
-
(Applicable when writing a file to disk, example: using the fetch module.)
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
env:VMWARE_VALIDATE_CERTS
-
var: ansible_vmware_validate_certs
-
-
Verify SSL for the connection.
-
Note: This will validate certs for both vmware_host and the ESXi host running the VM.
-
-
- vm_password - -
- - - / required -
-
- -
var: ansible_password
-
var: ansible_vmware_tools_password
-
-
Password for the user in guest operating system.
-
-
- vm_path - -
- - -
-
- -
var: ansible_vmware_guest_path
-
-
Mutually exclusive with vm_uuid
-
VM path absolute to the connection.
-
vCenter Example: Datacenter/vm/Discovered virtual machine/testVM.
-
ESXi Host Example: ha-datacenter/vm/testVM.
-
Must include VM name, appended to 'folder' as would be passed to community.vmware.vmware_guest.
-
Needs to include vm between the Datacenter and the rest of the VM path.
-
Datacenter default value for ESXi server is ha-datacenter.
-
Folder vm is not visible in the vSphere Web Client but necessary for VMware API to work.
-
-
- vm_user - -
- - - / required -
-
- -
var: ansible_user
-
var: ansible_vmware_tools_user
-
-
VM username.
-
ansible_vmware_tools_user is used for connecting to the VM.
-
ansible_user is used by Ansible on the VM.
-
-
- vm_uuid - -
- - -
-
- -
var: ansible_vmware_guest_uuid
-
-
Mutually exclusive with vm_path
-
VM UUID to the connection.
-
UUID of the virtual machine from property config.uuid of vmware_vm_inventory plugin
-
-
- vmware_host - -
- - - / required -
-
- -
env:VI_SERVER
-
env:VMWARE_HOST
-
var: ansible_host
-
var: ansible_vmware_host
-
-
FQDN or IP Address for the connection (vCenter or ESXi Host).
-
-
- vmware_password - -
- - - / required -
-
- -
env:VI_PASSWORD
-
env:VMWARE_PASSWORD
-
var: ansible_vmware_password
-
-
Password for the connection.
-
-
- vmware_port - -
- - -
-
- Default:
443
-
-
env:VI_PORTNUMBER
-
env:VMWARE_PORT
-
var: ansible_port
-
var: ansible_vmware_port
-
-
Port for the connection.
-
-
- vmware_user - -
- - - / required -
-
- -
env:VI_USERNAME
-
env:VMWARE_USER
-
var: ansible_vmware_user
-
-
Username for the connection.
-
Requires the following permissions on the VM: - VirtualMachine.GuestOperations.Execute - VirtualMachine.GuestOperations.Modify - VirtualMachine.GuestOperations.Query
-
-
- - - - - - - - -Status ------- + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

exec_command_sleep_interval

+ +

+ float +

+ +
+

Time in seconds to sleep between execution of command.

+

Default: 0.5

+

Configuration:

+
    +
  • +

    Variable: ansible_vmware_tools_exec_command_sleep_interval

    + +
  • +
+
+
+

executable

+ +

+ string +

+ +
+

shell to use for execution inside container

+

Default: "/bin/sh"

+

Configuration:

+
    +
  • +

    INI entry

    +
    [defaults]
    +  executable = /bin/sh
    + +
  • +
  • +

    Environment variable: ANSIBLE_EXECUTABLE

    + +
  • +
  • +

    Variable: ansible_executable

    + +
  • +
  • +

    Variable: ansible_vmware_tools_executable

    + +
  • +
+
+
+

file_chunk_size

+ +

+ integer +

+ +
+

File chunk size.

+

(Applicable when writing a file to disk, example: using the fetch module.)

+

Default: 128

+

Configuration:

+
    +
  • +

    Variable: ansible_vmware_tools_file_chunk_size

    + +
  • +
+
+
+

validate_certs

+ +

+ boolean +

+ +
+

Verify SSL for the connection.

+

Note: This will validate certs for both vmware_host and the ESXi host running the VM.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +

Configuration:

+
    +
  • +

    Environment variable: VMWARE_VALIDATE_CERTS

    + +
  • +
  • +

    Variable: ansible_vmware_validate_certs

    + +
  • +
+
+
+

vm_password

+ +

+ string + / required +

+ +
+

Password for the user in guest operating system.

+

Configuration:

+
    +
  • +

    Variable: ansible_password

    + +
  • +
  • +

    Variable: ansible_vmware_tools_password

    + +
  • +
+
+
+

vm_path

+ +

+ string +

+ +
+

Mutually exclusive with vm_uuid

+

VM path absolute to the connection.

+

vCenter Example: Datacenter/vm/Discovered virtual machine/testVM.

+

ESXi Host Example: ha-datacenter/vm/testVM.

+

Must include VM name, appended to 'folder' as would be passed to community.vmware.vmware_guest.

+

Needs to include vm between the Datacenter and the rest of the VM path.

+

Datacenter default value for ESXi server is ha-datacenter.

+

Folder vm is not visible in the vSphere Web Client but necessary for VMware API to work.

+

Configuration:

+
    +
  • +

    Variable: ansible_vmware_guest_path

    + +
  • +
+
+
+

vm_user

+ +

+ string + / required +

+ +
+

VM username.

+

ansible_vmware_tools_user is used for connecting to the VM.

+

ansible_user is used by Ansible on the VM.

+

Configuration:

+
    +
  • +

    Variable: ansible_user

    + +
  • +
  • +

    Variable: ansible_vmware_tools_user

    + +
  • +
+
+
+

vm_uuid

+ +

+ string +

+ +
+

Mutually exclusive with vm_path

+

VM UUID to the connection.

+

UUID of the virtual machine from property config.uuid of vmware_vm_inventory plugin

+

Configuration:

+
    +
  • +

    Variable: ansible_vmware_guest_uuid

    + +
  • +
+
+
+

vmware_host

+ +

+ string + / required +

+ +
+

FQDN or IP Address for the connection (vCenter or ESXi Host).

+

Configuration:

+
    +
  • +

    Environment variable: VI_SERVER

    + +
  • +
  • +

    Environment variable: VMWARE_HOST

    + +
  • +
  • +

    Variable: ansible_host

    + +
  • +
  • +

    Variable: ansible_vmware_host

    + +
  • +
+
+
+

vmware_password

+ +

+ string + / required +

+ +
+

Password for the connection.

+

Configuration:

+
    +
  • +

    Environment variable: VI_PASSWORD

    + +
  • +
  • +

    Environment variable: VMWARE_PASSWORD

    + +
  • +
  • +

    Variable: ansible_vmware_password

    + +
  • +
+
+
+

vmware_port

+ +

+ string +

+ +
+

Port for the connection.

+

Default: 443

+

Configuration:

+
    +
  • +

    Environment variable: VI_PORTNUMBER

    + +
  • +
  • +

    Environment variable: VMWARE_PORT

    + +
  • +
  • +

    Variable: ansible_port

    + +
  • +
  • +

    Variable: ansible_vmware_port

    + +
  • +
+
+
+

vmware_user

+ +

+ string + / required +

+ +
+

Username for the connection.

+

Requires the following permissions on the VM: - VirtualMachine.GuestOperations.Execute - VirtualMachine.GuestOperations.Modify - VirtualMachine.GuestOperations.Query

+

Configuration:

+
    +
  • +

    Environment variable: VI_USERNAME

    + +
  • +
  • +

    Environment variable: VMWARE_USER

    + +
  • +
  • +

    Variable: ansible_vmware_user

    + +
  • +
+
+ + + + + + + + + Authors ~~~~~~~ -- Deric Crago (@dericcrago) +- Deric Crago (@dericcrago) .. hint:: Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up. + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_vasa_info_module.rst b/docs/community.vmware.vmware_vasa_info_module.rst new file mode 100644 index 000000000..5949b8ed2 --- /dev/null +++ b/docs/community.vmware.vmware_vasa_info_module.rst @@ -0,0 +1,242 @@ + + +community.vmware.vmware_vasa_info module -- Gather information about vSphere VASA providers. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +This module is part of the `community.vmware collection `_. + +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_vasa_info`. + +New in community.vmware 3.8.0 + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +- Returns basic information on the vSphere VASA providers registered in the vcenter. + + + + + + + + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + + + +Notes +----- + +- All modules requires API write access and hence is not supported on a free ESXi license. + + +Examples +-------- + +.. code-block:: yaml + + + - name: Get VASA providers info + community.vmware.vmware_vasa_info: + hostname: '{{ vcenter_hostname }}' + username: '{{ vcenter_username }}' + password: '{{ vcenter_password }}' + delegate_to: localhost + register: providers + + + + + +Return Values +------------- +The following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + +

Key

Description

+
+

vasa_providers

+ +

+ list + / elements=string +

+
+

list of dictionary of VASA info

+

Returned: success

+

Sample: [{"certificate_status": "valid", "description": "IOFILTER VASA Provider on host host01.domain.local", "name": "IOFILTER Provider host01.domain.local", "related_storage_array": [{"active": "True", "array_id": "IOFILTERS:616d4715-7de2-7be2-997a-10f920c5fdbe", "manageable": "True", "priority": "1"}], "status": "online", "uid": "02e10bc5-dd77-4ce4-9100-5aee44e7abaa", "url": "https://host01.domain.local:9080/version.xml", "version": "1.0"}]

+
+ + + + +Authors +~~~~~~~ + +- Eugenio Grosso (@genegr) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_vasa_module.rst b/docs/community.vmware.vmware_vasa_module.rst new file mode 100644 index 000000000..a9c089595 --- /dev/null +++ b/docs/community.vmware.vmware_vasa_module.rst @@ -0,0 +1,318 @@ + + +community.vmware.vmware_vasa module -- Manage VMware Virtual Volumes storage provider ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +This module is part of the `community.vmware collection `_. + +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_vasa`. + +New in community.vmware 3.8.0 + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +- This module can be used to register and unregister a VASA provider + + + + + + + + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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 +

+
+

Create present or remove absent a VASA provider.

+

Choices:

+
    +
  • "absent"

  • +
  • "present" ← (default)

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

vasa_certificate

+ +

+ string +

+
+

The SSL certificate of the VASA provider.

+

This parameter is required if state=present

+
+
+

vasa_name

+ +

+ string + / required +

+
+

The name of the VASA provider to be managed.

+
+
+

vasa_password

+ +

+ string +

+
+

The password of the user account to connect to the VASA provider.

+

This parameter is required if state=present

+
+
+

vasa_url

+ +

+ string + / required +

+
+

The url of the VASA provider to be managed.

+

This parameter is required if state=present

+
+
+

vasa_username

+ +

+ string +

+
+

The user account to connect to the VASA provider.

+

This parameter is required if state=present

+
+ + + + +Notes +----- + +- All modules requires API write access and hence is not supported on a free ESXi license. + +See Also +-------- + +* \ `community.vmware.vmware\_vasa\_info `__\ + + Gather information about vSphere VASA providers. + +Examples +-------- + +.. code-block:: yaml + + + - name: Create Cluster + community.vmware.vmware_cluster: + hostname: "{{ vcenter_hostname }}" + username: "{{ vcenter_username }}" + password: "{{ vcenter_password }}" + vasa_name: "{{ vasa_name }}" + vasa_url: "{{ vasa_url }}" + vasa_username: "{{ vasa_username }}" + vasa_password: "{{ vasa_password }}" + vasa_certificate: "{{ vasa_certificate }}" + state: present + delegate_to: localhost + + - name: Unregister VASA provider + community.vmware.vmware_vasa: + hostname: "{{ vcenter_hostname }}" + username: "{{ vcenter_username }}" + password: "{{ vcenter_password }}" + vasa_name: "{{ vasa_name }}" + state: absent + delegate_to: localhost + + + + + + + +Authors +~~~~~~~ + +- Eugenio Grosso (@genegr) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_vc_infraprofile_info_module.rst b/docs/community.vmware.vmware_vc_infraprofile_info_module.rst index df6801e22..5b4927751 100644 --- a/docs/community.vmware.vmware_vc_infraprofile_info_module.rst +++ b/docs/community.vmware.vmware_vc_infraprofile_info_module.rst @@ -1,12 +1,15 @@ -.. _community.vmware.vmware_vc_infraprofile_info_module: -******************************************** -community.vmware.vmware_vc_infraprofile_info -******************************************** +community.vmware.vmware_vc_infraprofile_info module -- List and Export VMware vCenter infra profile configs. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**List and Export VMware vCenter infra profile configs.** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. +You need further requirements to be able to use this module, +see `Requirements `_ for details. + +To use it in a playbook, specify: :code:`community.vmware.vmware_vc_infraprofile_info`. .. contents:: @@ -16,12 +19,15 @@ community.vmware.vmware_vc_infraprofile_info Synopsis -------- + - Module to manage VMware vCenter infra profile configs. - vCenter infra profile Library feature is introduced in vSphere 7.0 version, so this module is not supported in the earlier versions of vSphere. - All variables and VMware object names are case sensitive. +.. _ansible_collections.community.vmware.vmware_vc_infraprofile_info_module_requirements: + Requirements ------------ The below requirements are needed on the host that executes this module. @@ -29,257 +35,247 @@ The below requirements are needed on the host that executes this module. - vSphere Automation SDK + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- api - -
- string -
-
-
    Choices: -
  • export
  • -
  • import
  • -
  • list
  • -
  • validate
  • -
-
-
API which needs to be executed
-
-
- config_path - -
- string -
-
- -
Config file path which contains infra profile config JSON data, supports both relative and absolute path.
-
This parameter is required only when import,validate APIs are being used.
-
-
- decryption_key - -
- string -
-
- -
decryption_key argument for while doing import profile task as of now its not taken into account form API team.
-
-
- description - -
- string -
-
- -
Description of about encryption or decryption key.
-
-
- encryption_key - -
- string -
-
- -
encryption_key argument for while doing import profile task as of now its not taken into account form API team.
-
-
- hostname - -
- string -
-
- -
The hostname or IP address of the vSphere vCenter server.
-
If the value is not specified in the task, the value of environment variable VMWARE_HOST will be used instead.
-
-
- password - -
- string -
-
- -
The password of the vSphere vCenter server.
-
If the value is not specified in the task, the value of environment variable VMWARE_PASSWORD will be used instead.
-

aliases: pass, pwd
-
-
- port - -
- integer -
-
- Default:
443
-
-
The port number of the vSphere vCenter.
-
If the value is not specified in the task, the value of environment variable VMWARE_PORT will be used instead.
-
-
- profiles - -
- string -
-
- -
A list of profile names to be exported, imported, and validated.
-
This parameter is not required while running for List API, not for export,import and validate.
-
-
- protocol - -
- string -
-
-
    Choices: -
  • http
  • -
  • https ←
  • -
-
-
The connection to protocol.
-
-
- 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.
-
-
- 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 server.
-
If the value is not specified in the task, the value of environment variable VMWARE_USER will be used instead.
-

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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

api

+ +

+ string +

+
+

API which needs to be executed

+

Choices:

+
    +
  • "export"

  • +
  • "import"

  • +
  • "list"

  • +
  • "validate"

  • +
+ +
+
+

config_path

+ +

+ string +

+
+

Config file path which contains infra profile config JSON data, supports both relative and absolute path.

+

This parameter is required only when import,validate APIs are being used.

+
+
+

decryption_key

+ +

+ string +

+
+

decryption_key argument for while doing import profile task as of now its not taken into account form API team.

+
+
+

description

+ +

+ string +

+
+

Description of about encryption or decryption key.

+
+
+

encryption_key

+ +

+ string +

+
+

encryption_key argument for while doing import profile task as of now its not taken into account form API team.

+
+
+

hostname

+ +

+ string +

+
+

The hostname or IP address of the vSphere vCenter server.

+

If the value is not specified in the task, the value of environment variable VMWARE_HOST will be used instead.

+
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ string +

+
+

The password of the vSphere vCenter server.

+

If the value is not specified in the task, the value of environment variable VMWARE_PASSWORD will be used instead.

+
+
+

port

+ +

+ integer +

+
+

The port number of the vSphere vCenter.

+

If the value is not specified in the task, the value of environment variable VMWARE_PORT will be used instead.

+

Default: 443

+
+
+

profiles

+ +

+ string +

+
+

A list of profile names to be exported, imported, and validated.

+

This parameter is not required while running for List API, not for export,import and validate.

+
+
+

protocol

+ +

+ string +

+
+

The connection to protocol.

+

Choices:

+
    +
  • "http"

  • +
  • "https" ← (default)

  • +
+ +
+
+

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.

+
+
+

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

+ +

aliases: admin, user

+

+ string +

+
+

The username of the vSphere vCenter server.

+

If the value is not specified in the task, the value of environment variable VMWARE_USER will be used instead.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + @@ -289,6 +285,7 @@ Examples .. code-block:: yaml + - name: Get information about VC infraprofile vmware_vc_infraprofile_info: hostname: '{{ vcenter_hostname }}' @@ -323,98 +320,103 @@ Examples profiles: "ApplianceManagement" config_path: "import.json" delegate_to: localhost + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- export_infra - -
- dictionary -
-
On success with API set as "export" -
A message about the exported file
-
-
Sample:
-
{'export_config_json': 'json exported to file'}
-
-
- import_profile - -
- dictionary -
-
On success with API set as "import" -
A message about import on import_profile spec
-
-
Sample:
-
{'changed': True, 'failed': False, 'status': '0.0'}
-
-
- list_infra - -
- list -
-
on success with API as "list" -
A list of infra configs,
-
-
Sample:
-
[{'info': 'ApplianceManagement', 'name': 'ApplianceManagement'}, {'info': 'ApplianceNetwork', 'name': 'ApplianceNetwork'}, {'info': 'Authentication & Authorization Management', 'name': 'AuthManagement'}]
-
-
- validate_infra - -
- dictionary -
-
On success with API set as "validate" -
A message about validate on exported file
-
-
Sample:
-
{'changed': False, 'failed': False, 'status': 'VALID'}
-
-

- - -Status ------- + + + + + + + + + + + + + + + + + + + + + + + + + +

Key

Description

+
+

export_infra

+ +

+ dictionary +

+
+

A message about the exported file

+

Returned: On success with API set as "export"

+

Sample: {"export_config_json": "json exported to file"}

+
+
+

import_profile

+ +

+ dictionary +

+
+

A message about import on import_profile spec

+

Returned: On success with API set as "import"

+

Sample: {"changed": true, "failed": false, "status": "0.0"}

+
+
+

list_infra

+ +

+ list + / elements=string +

+
+

A list of infra configs,

+

Returned: on success with API as "list"

+

Sample: [{"info": "ApplianceManagement", "name": "ApplianceManagement"}, {"info": "ApplianceNetwork", "name": "ApplianceNetwork"}, {"info": "Authentication & Authorization Management", "name": "AuthManagement"}]

+
+
+

validate_infra

+ +

+ dictionary +

+
+

A message about validate on exported file

+

Returned: On success with API set as "validate"

+

Sample: {"changed": false, "failed": false, "status": "VALID"}

+
+ + Authors ~~~~~~~ - Naveenkumar G P (@ngp) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_vcenter_settings_info_module.rst b/docs/community.vmware.vmware_vcenter_settings_info_module.rst index 07f202253..8c9a88dd6 100644 --- a/docs/community.vmware.vmware_vcenter_settings_info_module.rst +++ b/docs/community.vmware.vmware_vcenter_settings_info_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_vcenter_settings_info_module: -********************************************* -community.vmware.vmware_vcenter_settings_info -********************************************* +community.vmware.vmware_vcenter_settings_info module -- Gather info vCenter settings +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Gather info vCenter settings** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_vcenter_settings_info`. .. contents:: @@ -16,201 +17,198 @@ community.vmware.vmware_vcenter_settings_info Synopsis -------- + - This module can be used to gather information about vCenter settings. + + + + 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.
-
-
- properties - -
- list - / elements=string -
-
- -
Specify the properties to retrieve.
-
Example:
-
properties: [
-
"config.workflow.port"
-
]
-
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.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

properties

+ +

+ list + / elements=string +

+
+

Specify the properties to retrieve.

+

Example:

+

properties: [

+

"config.workflow.port"

+

]

+

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 +

+
+

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.

+

Choices:

+
    +
  • "summary" ← (default)

  • +
  • "vsphere"

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -218,6 +216,7 @@ Examples .. code-block:: yaml + - name: "Gather info about vCenter settings" community.vmware.vmware_vcenter_settings_info: hostname: "{{ vcenter_hostname }}" @@ -237,79 +236,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- vcenter_config_info - -
- dictionary -
-
success -
dict of vCenter settings
-
-
Sample:
-
{ - "db_event_cleanup_previous": true, - "db_event_retention_previous": 30, - "db_max_connections_previous": 50, - "db_task_cleanup_previous": true, - "db_task_retention_previous": 30, - "directory_query_limit_previous": true, - "directory_query_limit_size_previous": 5000, - "directory_timeout_previous": 60, - "directory_validation_period_previous": 1440, - "directory_validation_previous": true, - "logging_options_previous": "info", - "mail_sender_previous": "", - "mail_server_previous": "", - "runtime_managed_address_previous": "", - "runtime_server_name_previous": "vcenter.local", - "runtime_unique_id_previous": 48, - "snmp_1_community_previous": "public", - "snmp_1_enabled_previous": true, - "snmp_1_url_previous": "localhost", - "snmp_2_community_previous": "", - "snmp_2_enabled_previous": false, - "snmp_2_url_previous": "", - "snmp_3_community_previous": "", - "snmp_3_enabled_previous": false, - "snmp_3_url_previous": "", - "snmp_4_community_previous": "", - "snmp_4_enabled_previous": false, - "snmp_4_url_previous": "", - "snmp_receiver_1_port_previous": 162, - "snmp_receiver_2_port_previous": 162, - "snmp_receiver_3_port_previous": 162, - "snmp_receiver_4_port_previous": 162, - "timeout_long_operations_previous": 120, - "timeout_normal_operations_previous": 30 - }
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

vcenter_config_info

+ +

+ dictionary +

+
+

dict of vCenter settings

+

Returned: success

+

Sample: {"db_event_cleanup_previous": true, "db_event_retention_previous": 30, "db_max_connections_previous": 50, "db_task_cleanup_previous": true, "db_task_retention_previous": 30, "directory_query_limit_previous": true, "directory_query_limit_size_previous": 5000, "directory_timeout_previous": 60, "directory_validation_period_previous": 1440, "directory_validation_previous": true, "logging_options_previous": "info", "mail_sender_previous": "", "mail_server_previous": "", "runtime_managed_address_previous": "", "runtime_server_name_previous": "vcenter.local", "runtime_unique_id_previous": 48, "snmp_1_community_previous": "public", "snmp_1_enabled_previous": true, "snmp_1_url_previous": "localhost", "snmp_2_community_previous": "", "snmp_2_enabled_previous": false, "snmp_2_url_previous": "", "snmp_3_community_previous": "", "snmp_3_enabled_previous": false, "snmp_3_url_previous": "", "snmp_4_community_previous": "", "snmp_4_enabled_previous": false, "snmp_4_url_previous": "", "snmp_receiver_1_port_previous": 162, "snmp_receiver_2_port_previous": 162, "snmp_receiver_3_port_previous": 162, "snmp_receiver_4_port_previous": 162, "timeout_long_operations_previous": 120, "timeout_normal_operations_previous": 30}

+
+ + Authors ~~~~~~~ - sky-joker (@sky-joker) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_vcenter_settings_module.rst b/docs/community.vmware.vmware_vcenter_settings_module.rst index 8c5307bad..008aabba3 100644 --- a/docs/community.vmware.vmware_vcenter_settings_module.rst +++ b/docs/community.vmware.vmware_vcenter_settings_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_vcenter_settings_module: -**************************************** -community.vmware.vmware_vcenter_settings -**************************************** +community.vmware.vmware_vcenter_settings module -- Configures general settings on a vCenter server +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Configures general settings on a vCenter server** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_vcenter_settings`. .. contents:: @@ -16,8 +17,13 @@ community.vmware.vmware_vcenter_settings Synopsis -------- + - This module can be used to configure the vCenter server general settings (except the statistics). -- The statistics can be configured with the module ``vmware_vcenter_statistics``. +- The statistics can be configured with the module \ :literal:`vmware\_vcenter\_statistics`\ . + + + + @@ -27,869 +33,799 @@ Parameters .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- advanced_settings - -
- dictionary -
-
- Default:
{}
-
-
A dictionary of advanced settings.
-
-
- database - -
- dictionary -
-
- Default:
{"event_cleanup": true, "event_retention": 30, "max_connections": 50, "task_cleanup": true, "task_retention": 30}
-
-
The database settings for vCenter server.
-
-
- event_cleanup - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Event cleanup.
-
-
- event_retention - -
- integer -
-
- Default:
30
-
-
Event retention in days.
-
-
- max_connections - -
- integer -
-
- Default:
50
-
-
Maximum connections.
-
-
- task_cleanup - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Task cleanup.
-
-
- task_retention - -
- integer -
-
- Default:
30
-
-
Task retention in days.
-
-
- 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.
-
-
- logging_options - -
- string -
-
-
    Choices: -
  • none
  • -
  • error
  • -
  • warning
  • -
  • info ←
  • -
  • verbose
  • -
  • trivia
  • -
-
-
The level of detail that vCenter server usesfor log files.
-
-
- mail - -
- dictionary -
-
- Default:
{"sender": "", "server": ""}
-
-
The settings vCenter server uses to send email alerts.
-
-
- sender - -
- string -
-
- -
Mail sender address.
-
-
- server - -
- string -
-
- -
Mail server.
-
-
- 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.
-
-
- runtime_settings - -
- dictionary -
-
- -
The unique runtime settings for vCenter server.
-
-
- managed_address - -
- string -
-
- -
vCenter server managed address.
-
-
- unique_id - -
- integer -
-
- -
vCenter server unique ID.
-
-
- vcenter_server_name - -
- string -
-
- -
vCenter server name. Default is FQDN.
-
-
- snmp_receivers - -
- dictionary -
-
- Default:
{"snmp_receiver_1_community": "public", "snmp_receiver_1_enabled": true, "snmp_receiver_1_port": 162, "snmp_receiver_1_url": "localhost", "snmp_receiver_2_community": "", "snmp_receiver_2_enabled": false, "snmp_receiver_2_port": 162, "snmp_receiver_2_url": "", "snmp_receiver_3_community": "", "snmp_receiver_3_enabled": false, "snmp_receiver_3_port": 162, "snmp_receiver_3_url": "", "snmp_receiver_4_community": "", "snmp_receiver_4_enabled": false, "snmp_receiver_4_port": 162, "snmp_receiver_4_url": ""}
-
-
SNMP trap destinations for vCenter server alerts.
-
-
- snmp_receiver_1_community - -
- string -
-
- Default:
"public"
-
-
Community string.
-
-
- snmp_receiver_1_enabled - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Enable receiver.
-
-
- snmp_receiver_1_port - -
- integer -
-
- Default:
162
-
-
Receiver port.
-
-
- snmp_receiver_1_url - -
- string -
-
- Default:
"localhost"
-
-
Primary Receiver ULR.
-
-
- snmp_receiver_2_community - -
- string -
-
- Default:
""
-
-
Community string.
-
-
- snmp_receiver_2_enabled - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Enable receiver.
-
-
- snmp_receiver_2_port - -
- integer -
-
- Default:
162
-
-
Receiver port.
-
-
- snmp_receiver_2_url - -
- string -
-
- Default:
""
-
-
Receiver 2 ULR.
-
-
- snmp_receiver_3_community - -
- string -
-
- Default:
""
-
-
Community string.
-
-
- snmp_receiver_3_enabled - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Enable receiver.
-
-
- snmp_receiver_3_port - -
- integer -
-
- Default:
162
-
-
Receiver port.
-
-
- snmp_receiver_3_url - -
- string -
-
- Default:
""
-
-
Receiver 3 ULR.
-
-
- snmp_receiver_4_community - -
- string -
-
- Default:
""
-
-
Community string.
-
-
- snmp_receiver_4_enabled - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Enable receiver.
-
-
- snmp_receiver_4_port - -
- integer -
-
- Default:
162
-
-
Receiver port.
-
-
- snmp_receiver_4_url - -
- string -
-
- Default:
""
-
-
Receiver 4 ULR.
-
-
- timeout_settings - -
- dictionary -
-
- Default:
{"long_operations": 120, "normal_operations": 30}
-
-
The vCenter server connection timeout for normal and long operations.
-
-
- long_operations - -
- integer -
-
- Default:
120
-
-
Long operation timeout.
-
-
- normal_operations - -
- integer -
-
- Default:
30
-
-
Normal operation timeout.
-
-
- user_directory - -
- dictionary -
-
- Default:
{"query_limit": true, "query_limit_size": 5000, "timeout": 60, "validation": true, "validation_period": 1440}
-
-
The user directory settings for the vCenter server installation.
-
-
- query_limit - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Query limit.
-
-
- query_limit_size - -
- integer -
-
- Default:
5000
-
-
Query limit size.
-
-
- timeout - -
- integer -
-
- Default:
60
-
-
User directory timeout.
-
-
- validation - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Mail Validation.
-
-
- validation_period - -
- integer -
-
- Default:
1440
-
-
Validation period.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

advanced_settings

+ +

+ dictionary +

+
+

A dictionary of advanced settings.

+

Default: {}

+
+
+

database

+ +

+ dictionary +

+
+

The database settings for vCenter server.

+

Default: {"event_cleanup": true, "event_retention": 30, "max_connections": 50, "task_cleanup": true, "task_retention": 30}

+
+
+

event_cleanup

+ +

+ boolean +

+
+

Event cleanup.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

event_retention

+ +

+ integer +

+
+

Event retention in days.

+

Default: 30

+
+
+

max_connections

+ +

+ integer +

+
+

Maximum connections.

+

Default: 50

+
+
+

task_cleanup

+ +

+ boolean +

+
+

Task cleanup.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

task_retention

+ +

+ integer +

+
+

Task retention in days.

+

Default: 30

+
+
+

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.

+
+
+

logging_options

+ +

+ string +

+
+

The level of detail that vCenter server usesfor log files.

+

Choices:

+
    +
  • "none"

  • +
  • "error"

  • +
  • "warning"

  • +
  • "info" ← (default)

  • +
  • "verbose"

  • +
  • "trivia"

  • +
+ +
+
+

mail

+ +

+ dictionary +

+
+

The settings vCenter server uses to send email alerts.

+

Default: {"sender": "", "server": ""}

+
+
+

sender

+ +

+ string +

+
+

Mail sender address.

+
+
+

server

+ +

+ string +

+
+

Mail server.

+
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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.

+
+
+

runtime_settings

+ +

+ dictionary +

+
+

The unique runtime settings for vCenter server.

+
+
+

managed_address

+ +

+ string +

+
+

vCenter server managed address.

+
+
+

unique_id

+ +

+ integer +

+
+

vCenter server unique ID.

+
+
+

vcenter_server_name

+ +

+ string +

+
+

vCenter server name. Default is FQDN.

+
+
+

snmp_receivers

+ +

+ dictionary +

+
+

SNMP trap destinations for vCenter server alerts.

+

Default: {"snmp_receiver_1_community": "public", "snmp_receiver_1_enabled": true, "snmp_receiver_1_port": 162, "snmp_receiver_1_url": "localhost", "snmp_receiver_2_community": "", "snmp_receiver_2_enabled": false, "snmp_receiver_2_port": 162, "snmp_receiver_2_url": "", "snmp_receiver_3_community": "", "snmp_receiver_3_enabled": false, "snmp_receiver_3_port": 162, "snmp_receiver_3_url": "", "snmp_receiver_4_community": "", "snmp_receiver_4_enabled": false, "snmp_receiver_4_port": 162, "snmp_receiver_4_url": ""}

+
+
+

snmp_receiver_1_community

+ +

+ string +

+
+

Community string.

+

Default: "public"

+
+
+

snmp_receiver_1_enabled

+ +

+ boolean +

+
+

Enable receiver.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

snmp_receiver_1_port

+ +

+ integer +

+
+

Receiver port.

+

Default: 162

+
+
+

snmp_receiver_1_url

+ +

+ string +

+
+

Primary Receiver ULR.

+

Default: "localhost"

+
+
+

snmp_receiver_2_community

+ +

+ string +

+
+

Community string.

+

Default: ""

+
+
+

snmp_receiver_2_enabled

+ +

+ boolean +

+
+

Enable receiver.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

snmp_receiver_2_port

+ +

+ integer +

+
+

Receiver port.

+

Default: 162

+
+
+

snmp_receiver_2_url

+ +

+ string +

+
+

Receiver 2 ULR.

+

Default: ""

+
+
+

snmp_receiver_3_community

+ +

+ string +

+
+

Community string.

+

Default: ""

+
+
+

snmp_receiver_3_enabled

+ +

+ boolean +

+
+

Enable receiver.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

snmp_receiver_3_port

+ +

+ integer +

+
+

Receiver port.

+

Default: 162

+
+
+

snmp_receiver_3_url

+ +

+ string +

+
+

Receiver 3 ULR.

+

Default: ""

+
+
+

snmp_receiver_4_community

+ +

+ string +

+
+

Community string.

+

Default: ""

+
+
+

snmp_receiver_4_enabled

+ +

+ boolean +

+
+

Enable receiver.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

snmp_receiver_4_port

+ +

+ integer +

+
+

Receiver port.

+

Default: 162

+
+
+

snmp_receiver_4_url

+ +

+ string +

+
+

Receiver 4 ULR.

+

Default: ""

+
+
+

timeout_settings

+ +

+ dictionary +

+
+

The vCenter server connection timeout for normal and long operations.

+

Default: {"long_operations": 120, "normal_operations": 30}

+
+
+

long_operations

+ +

+ integer +

+
+

Long operation timeout.

+

Default: 120

+
+
+

normal_operations

+ +

+ integer +

+
+

Normal operation timeout.

+

Default: 30

+
+
+

user_directory

+ +

+ dictionary +

+
+

The user directory settings for the vCenter server installation.

+

Default: {"query_limit": true, "query_limit_size": 5000, "timeout": 60, "validation": true, "validation_period": 1440}

+
+
+

query_limit

+ +

+ boolean +

+
+

Query limit.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

query_limit_size

+ +

+ integer +

+
+

Query limit size.

+

Default: 5000

+
+
+

timeout

+ +

+ integer +

+
+

User directory timeout.

+

Default: 60

+
+
+

validation

+ +

+ boolean +

+
+

Mail Validation.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

validation_period

+ +

+ integer +

+
+

Validation period.

+

Default: 1440

+
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -897,6 +833,7 @@ Examples .. code-block:: yaml + - name: Configure vCenter general settings community.vmware.vmware_vcenter_settings: hostname: '{{ vcenter_hostname }}' @@ -943,45 +880,55 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- results - -
- dictionary -
-
always -
metadata about vCenter settings
-
supported diff mode from version 1.8.0
-
-
Sample:
-
{'changed': False, 'db_event_cleanup': True, 'db_event_retention': 30, 'db_max_connections': 50, 'db_task_cleanup': True, 'db_task_retention': 30, 'directory_query_limit': True, 'directory_query_limit_size': 5000, 'directory_timeout': 60, 'directory_validation': True, 'directory_validation_period': 1440, 'logging_options': 'info', 'mail_sender': 'vcenter@vcenter01.example.com', 'mail_server': 'mail.example.com', 'msg': 'vCenter settings already configured properly', 'runtime_managed_address': '192.168.1.10', 'runtime_server_name': 'vcenter01.example.com', 'runtime_unique_id': 1, 'timeout_long_operations': 120, 'timeout_normal_operations': 30, 'diff': {'after': {'db_event_cleanup': True, 'db_event_retention': 30, 'db_max_connections': 50, 'db_task_cleanup': True, 'db_task_retention': 30, 'directory_query_limit': True, 'directory_query_limit_size': 5000, 'directory_timeout': 60, 'directory_validation': True, 'directory_validation_period': 1440, 'logging_options': 'info', 'mail_sender': 'vcenter@vcenter01.example.com', 'mail_server': 'mail.example.com', 'runtime_managed_address': '192.168.1.10', 'runtime_server_name': 'vcenter01.example.com', 'runtime_unique_id': 1, 'snmp_receiver_1_community': 'public', 'snmp_receiver_1_enabled': True, 'snmp_receiver_1_port': 162, 'snmp_receiver_1_url': 'localhost', 'snmp_receiver_2_community': '', 'snmp_receiver_2_enabled': False, 'snmp_receiver_2_port': 162, 'snmp_receiver_2_url': '', 'snmp_receiver_3_community': '', 'snmp_receiver_3_enabled': False, 'snmp_receiver_3_port': 162, 'snmp_receiver_3_url': '', 'snmp_receiver_4_community': '', 'snmp_receiver_4_enabled': False, 'snmp_receiver_4_port': 162, 'snmp_receiver_4_url': '', 'timeout_long_operations': 120, 'timeout_normal_operations': 30}, 'before': {'db_event_cleanup': True, 'db_event_retention': 30, 'db_max_connections': 50, 'db_task_cleanup': True, 'db_task_retention': 30, 'directory_query_limit': True, 'directory_query_limit_size': 5000, 'directory_timeout': 60, 'directory_validation': True, 'directory_validation_period': 1440, 'logging_options': 'info', 'mail_sender': 'vcenter@vcenter01.example.com', 'mail_server': 'mail.example.com', 'runtime_managed_address': '192.168.1.10', 'runtime_server_name': 'vcenter01.example.com', 'runtime_unique_id': 1, 'snmp_receiver_1_community': 'public', 'snmp_receiver_1_enabled': True, 'snmp_receiver_1_port': 162, 'snmp_receiver_1_url': 'localhost', 'snmp_receiver_2_community': '', 'snmp_receiver_2_enabled': False, 'snmp_receiver_2_port': 162, 'snmp_receiver_2_url': '', 'snmp_receiver_3_community': '', 'snmp_receiver_3_enabled': False, 'snmp_receiver_3_port': 162, 'snmp_receiver_3_url': '', 'snmp_receiver_4_community': '', 'snmp_receiver_4_enabled': False, 'snmp_receiver_4_port': 162, 'snmp_receiver_4_url': '', 'timeout_long_operations': 120, 'timeout_normal_operations': 30}}}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

results

+ +

+ dictionary +

+
+

metadata about vCenter settings

+

supported diff mode from version 1.8.0

+

Returned: always

+

Sample: {"changed": false, "db_event_cleanup": true, "db_event_retention": 30, "db_max_connections": 50, "db_task_cleanup": true, "db_task_retention": 30, "diff": {"after": {"db_event_cleanup": true, "db_event_retention": 30, "db_max_connections": 50, "db_task_cleanup": true, "db_task_retention": 30, "directory_query_limit": true, "directory_query_limit_size": 5000, "directory_timeout": 60, "directory_validation": true, "directory_validation_period": 1440, "logging_options": "info", "mail_sender": "vcenter@vcenter01.example.com", "mail_server": "mail.example.com", "runtime_managed_address": "192.168.1.10", "runtime_server_name": "vcenter01.example.com", "runtime_unique_id": 1, "snmp_receiver_1_community": "public", "snmp_receiver_1_enabled": true, "snmp_receiver_1_port": 162, "snmp_receiver_1_url": "localhost", "snmp_receiver_2_community": "", "snmp_receiver_2_enabled": false, "snmp_receiver_2_port": 162, "snmp_receiver_2_url": "", "snmp_receiver_3_community": "", "snmp_receiver_3_enabled": false, "snmp_receiver_3_port": 162, "snmp_receiver_3_url": "", "snmp_receiver_4_community": "", "snmp_receiver_4_enabled": false, "snmp_receiver_4_port": 162, "snmp_receiver_4_url": "", "timeout_long_operations": 120, "timeout_normal_operations": 30}, "before": {"db_event_cleanup": true, "db_event_retention": 30, "db_max_connections": 50, "db_task_cleanup": true, "db_task_retention": 30, "directory_query_limit": true, "directory_query_limit_size": 5000, "directory_timeout": 60, "directory_validation": true, "directory_validation_period": 1440, "logging_options": "info", "mail_sender": "vcenter@vcenter01.example.com", "mail_server": "mail.example.com", "runtime_managed_address": "192.168.1.10", "runtime_server_name": "vcenter01.example.com", "runtime_unique_id": 1, "snmp_receiver_1_community": "public", "snmp_receiver_1_enabled": true, "snmp_receiver_1_port": 162, "snmp_receiver_1_url": "localhost", "snmp_receiver_2_community": "", "snmp_receiver_2_enabled": false, "snmp_receiver_2_port": 162, "snmp_receiver_2_url": "", "snmp_receiver_3_community": "", "snmp_receiver_3_enabled": false, "snmp_receiver_3_port": 162, "snmp_receiver_3_url": "", "snmp_receiver_4_community": "", "snmp_receiver_4_enabled": false, "snmp_receiver_4_port": 162, "snmp_receiver_4_url": "", "timeout_long_operations": 120, "timeout_normal_operations": 30}}, "directory_query_limit": true, "directory_query_limit_size": 5000, "directory_timeout": 60, "directory_validation": true, "directory_validation_period": 1440, "logging_options": "info", "mail_sender": "vcenter@vcenter01.example.com", "mail_server": "mail.example.com", "msg": "vCenter settings already configured properly", "runtime_managed_address": "192.168.1.10", "runtime_server_name": "vcenter01.example.com", "runtime_unique_id": 1, "timeout_long_operations": 120, "timeout_normal_operations": 30}

+
+ + Authors ~~~~~~~ - Christian Kotte (@ckotte) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_vcenter_statistics_module.rst b/docs/community.vmware.vmware_vcenter_statistics_module.rst index 9973db4ac..dea93b89f 100644 --- a/docs/community.vmware.vmware_vcenter_statistics_module.rst +++ b/docs/community.vmware.vmware_vcenter_statistics_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_vcenter_statistics_module: -****************************************** -community.vmware.vmware_vcenter_statistics -****************************************** +community.vmware.vmware_vcenter_statistics module -- Configures statistics on a vCenter server +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Configures statistics on a vCenter server** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_vcenter_statistics`. .. contents:: @@ -16,8 +17,13 @@ community.vmware.vmware_vcenter_statistics Synopsis -------- + - This module can be used to configure the vCenter server statistics. -- The remaining settings can be configured with the module ``vmware_vcenter_settings``. +- The remaining settings can be configured with the module \ :literal:`vmware\_vcenter\_settings`\ . + + + + @@ -27,545 +33,531 @@ 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.
-
-
- interval_past_day - -
- dictionary -
-
- -
Settings for vCenter server past day statistic collection.
-
-
- enabled - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Past day statistics collection enabled.
-
-
- interval_minutes - -
- integer -
-
-
    Choices: -
  • 1
  • -
  • 2
  • -
  • 3
  • -
  • 4
  • -
  • 5 ←
  • -
-
-
Interval duration in minutes.
-
-
- level - -
- integer -
-
-
    Choices: -
  • 1 ←
  • -
  • 2
  • -
  • 3
  • -
  • 4
  • -
-
-
Statistics level.
-
-
- save_for_days - -
- integer -
-
-
    Choices: -
  • 1 ←
  • -
  • 2
  • -
  • 3
  • -
  • 4
  • -
  • 5
  • -
-
-
Save for value in days.
-
-
- interval_past_month - -
- dictionary -
-
- -
Settings for vCenter server past month statistic collection.
-
-
- enabled - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Past month statistics collection enabled.
-
-
- interval_hours - -
- integer -
-
-
    Choices: -
  • 2 ←
  • -
-
-
Interval duration in hours.
-
-
- level - -
- integer -
-
-
    Choices: -
  • 1 ←
  • -
  • 2
  • -
  • 3
  • -
  • 4
  • -
-
-
Statistics level.
-
-
- save_for_months - -
- integer -
-
-
    Choices: -
  • 1 ←
  • -
-
-
Save for value in months.
-
-
- interval_past_week - -
- dictionary -
-
- -
Settings for vCenter server past week statistic collection.
-
-
- enabled - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Past week statistics collection enabled.
-
-
- interval_minutes - -
- integer -
-
-
    Choices: -
  • 30 ←
  • -
-
-
Interval duration in minutes.
-
-
- level - -
- integer -
-
-
    Choices: -
  • 1 ←
  • -
  • 2
  • -
  • 3
  • -
  • 4
  • -
-
-
Statistics level.
-
-
- save_for_weeks - -
- integer -
-
-
    Choices: -
  • 1 ←
  • -
-
-
Save for value in weeks.
-
-
- interval_past_year - -
- dictionary -
-
- -
Settings for vCenter server past month statistic collection.
-
-
- enabled - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Past month statistics collection enabled.
-
-
- interval_days - -
- integer -
-
-
    Choices: -
  • 1 ←
  • -
-
-
Interval duration in days.
-
-
- level - -
- integer -
-
-
    Choices: -
  • 1 ←
  • -
  • 2
  • -
  • 3
  • -
  • 4
  • -
-
-
Statistics level.
-
-
- save_for_years - -
- integer -
-
-
    Choices: -
  • 1 ←
  • -
  • 2
  • -
  • 3
  • -
  • 4
  • -
  • 5
  • -
-
-
Save for value in years.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

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.

+
+
+

interval_past_day

+ +

+ dictionary +

+
+

Settings for vCenter server past day statistic collection.

+
+
+

enabled

+ +

+ boolean +

+
+

Past day statistics collection enabled.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

interval_minutes

+ +

+ integer +

+
+

Interval duration in minutes.

+

Choices:

+
    +
  • 1

  • +
  • 2

  • +
  • 3

  • +
  • 4

  • +
  • 5 ← (default)

  • +
+ +
+
+

level

+ +

+ integer +

+
+

Statistics level.

+

Choices:

+
    +
  • 1 ← (default)

  • +
  • 2

  • +
  • 3

  • +
  • 4

  • +
+ +
+
+

save_for_days

+ +

+ integer +

+
+

Save for value in days.

+

Choices:

+
    +
  • 1 ← (default)

  • +
  • 2

  • +
  • 3

  • +
  • 4

  • +
  • 5

  • +
+ +
+
+

interval_past_month

+ +

+ dictionary +

+
+

Settings for vCenter server past month statistic collection.

+
+
+

enabled

+ +

+ boolean +

+
+

Past month statistics collection enabled.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

interval_hours

+ +

+ integer +

+
+

Interval duration in hours.

+

Choices:

+
    +
  • 2 ← (default)

  • +
+ +
+
+

level

+ +

+ integer +

+
+

Statistics level.

+

Choices:

+
    +
  • 1 ← (default)

  • +
  • 2

  • +
  • 3

  • +
  • 4

  • +
+ +
+
+

save_for_months

+ +

+ integer +

+
+

Save for value in months.

+

Choices:

+
    +
  • 1 ← (default)

  • +
+ +
+
+

interval_past_week

+ +

+ dictionary +

+
+

Settings for vCenter server past week statistic collection.

+
+
+

enabled

+ +

+ boolean +

+
+

Past week statistics collection enabled.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

interval_minutes

+ +

+ integer +

+
+

Interval duration in minutes.

+

Choices:

+
    +
  • 30 ← (default)

  • +
+ +
+
+

level

+ +

+ integer +

+
+

Statistics level.

+

Choices:

+
    +
  • 1 ← (default)

  • +
  • 2

  • +
  • 3

  • +
  • 4

  • +
+ +
+
+

save_for_weeks

+ +

+ integer +

+
+

Save for value in weeks.

+

Choices:

+
    +
  • 1 ← (default)

  • +
+ +
+
+

interval_past_year

+ +

+ dictionary +

+
+

Settings for vCenter server past month statistic collection.

+
+
+

enabled

+ +

+ boolean +

+
+

Past month statistics collection enabled.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

interval_days

+ +

+ integer +

+
+

Interval duration in days.

+

Choices:

+
    +
  • 1 ← (default)

  • +
+ +
+
+

level

+ +

+ integer +

+
+

Statistics level.

+

Choices:

+
    +
  • 1 ← (default)

  • +
  • 2

  • +
  • 3

  • +
  • 4

  • +
+ +
+
+

save_for_years

+ +

+ integer +

+
+

Save for value in years.

+

Choices:

+
    +
  • 1 ← (default)

  • +
  • 2

  • +
  • 3

  • +
  • 4

  • +
  • 5

  • +
+ +
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -573,6 +565,7 @@ Examples .. code-block:: yaml + - name: Configure vCenter statistics community.vmware.vmware_vcenter_statistics: hostname: '{{ vcenter_hostname }}' @@ -597,44 +590,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- results - -
- dictionary -
-
always -
metadata about vCenter statistics settings
-
-
Sample:
-
{'changed': False, 'msg': 'vCenter statistics already configured properly', 'past_day_enabled': True, 'past_day_interval': 5, 'past_day_level': 1, 'past_day_save_for': 1, 'past_month_enabled': True, 'past_month_interval': 2, 'past_month_level': 1, 'past_month_save_for': 1, 'past_week_enabled': True, 'past_week_interval': 30, 'past_week_level': 1, 'past_week_save_for': 1, 'past_year_enabled': True, 'past_year_interval': 1, 'past_year_level': 1, 'past_year_save_for': 1}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

results

+ +

+ dictionary +

+
+

metadata about vCenter statistics settings

+

Returned: always

+

Sample: {"changed": false, "msg": "vCenter statistics already configured properly", "past_day_enabled": true, "past_day_interval": 5, "past_day_level": 1, "past_day_save_for": 1, "past_month_enabled": true, "past_month_interval": 2, "past_month_level": 1, "past_month_save_for": 1, "past_week_enabled": true, "past_week_interval": 30, "past_week_level": 1, "past_week_save_for": 1, "past_year_enabled": true, "past_year_interval": 1, "past_year_level": 1, "past_year_save_for": 1}

+
+ + Authors ~~~~~~~ - Christian Kotte (@ckotte) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_vm_config_option_module.rst b/docs/community.vmware.vmware_vm_config_option_module.rst index a77f79441..eaa5f4465 100644 --- a/docs/community.vmware.vmware_vm_config_option_module.rst +++ b/docs/community.vmware.vmware_vm_config_option_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_vm_config_option_module: -**************************************** -community.vmware.vmware_vm_config_option -**************************************** +community.vmware.vmware_vm_config_option module -- Return supported guest ID list and VM recommended config option for specific guest OS +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Return supported guest ID list and VM recommended config option for specific guest OS** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_vm_config_option`. .. contents:: @@ -16,301 +17,290 @@ community.vmware.vmware_vm_config_option Synopsis -------- + - This module is used for getting the hardware versions supported for creation, the guest ID list supported by ESXi host for the most recent virtual hardware supported or specified hardware version, the VM recommended config options for specified guest OS ID. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- cluster_name - -
- string -
-
- -
Name of the cluster.
-
If esxi_hostname is not given, this parameter is required.
-
-
- datacenter - -
- string -
-
- Default:
"ha-datacenter"
-
-
The datacenter name used to get specified cluster or host.
-
This parameter is case sensitive.
-
-
- esxi_hostname - -
- string -
-
- -
ESXi hostname.
-
Obtain VM configure options on this ESXi host.
-
If cluster_name is not given, this parameter is required.
-
-
- get_config_options - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Return the dict of VM recommended config options for guest ID specified by guest_id with hardware version specified by hardware_version or the default hardware version.
-
When set to True, guest_id must be set.
-
-
- get_guest_os_ids - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Return the list of guest OS IDs supported on the specified entity.
-
If hardware_version is set, will return the corresponding guest OS ID list supported, or will return the guest OS ID list for the default hardware version.
-
-
- get_hardware_versions - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Return the list of VM hardware versions supported for creation and the default hardware version on the specified entity.
-
-
- guest_id - -
- string -
-
- -
The guest OS ID from the returned list when get_guest_os_ids is set to true, e.g., 'rhel8_64Guest'.
-
This parameter must be set when get_config_options is set to true.
-
-
- hardware_version - -
- string -
-
- -
The hardware version from the returned list when get_hardware_versions is set to true, e.g., 'vmx-19'.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

cluster_name

+ +

+ string +

+
+

Name of the cluster.

+

If esxi_hostname is not given, this parameter is required.

+
+
+

datacenter

+ +

+ string +

+
+

The datacenter name used to get specified cluster or host.

+

This parameter is case sensitive.

+

Default: "ha-datacenter"

+
+
+

esxi_hostname

+ +

+ string +

+
+

ESXi hostname.

+

Obtain VM configure options on this ESXi host.

+

If cluster_name is not given, this parameter is required.

+
+
+

get_config_options

+ +

+ boolean +

+
+

Return the dict of VM recommended config options for guest ID specified by guest_id with hardware version specified by hardware_version or the default hardware version.

+

When set to True, guest_id must be set.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

get_guest_os_ids

+ +

+ boolean +

+
+

Return the list of guest OS IDs supported on the specified entity.

+

If hardware_version is set, will return the corresponding guest OS ID list supported, or will return the guest OS ID list for the default hardware version.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

get_hardware_versions

+ +

+ boolean +

+
+

Return the list of VM hardware versions supported for creation and the default hardware version on the specified entity.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

guest_id

+ +

+ string +

+
+

The guest OS ID from the returned list when get_guest_os_ids is set to true, e.g., 'rhel8_64Guest'.

+

This parameter must be set when get_config_options is set to true.

+
+
+

hardware_version

+ +

+ string +

+
+

The hardware version from the returned list when get_hardware_versions is set to true, e.g., 'vmx-19'.

+
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - Known issue on vSphere 7.0 (https://github.com/vmware/pyvmomi/issues/915) - - All modules requires API write access and hence is not supported on a free ESXi license. - +- Known issue on vSphere 7.0 (https://github.com/vmware/pyvmomi/issues/915) +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -318,6 +308,7 @@ Examples .. code-block:: yaml + - name: Get supported guest ID list on given ESXi host for with default hardware version community.vmware.vmware_vm_config_option: hostname: "{{ vcenter_hostname }}" @@ -339,44 +330,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- instance - -
- dictionary -
-
always -
metadata about the VM recommended configuration
-
-
Sample:
-
None
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

instance

+ +

+ dictionary +

+
+

metadata about the VM recommended configuration

+

Returned: always

+

Sample: "None"

+
+ + Authors ~~~~~~~ -- Diane Wang (@Tomorrow9) +- Diane Wang (@Tomorrow9) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_vm_host_drs_rule_module.rst b/docs/community.vmware.vmware_vm_host_drs_rule_module.rst index 410260f31..939b08486 100644 --- a/docs/community.vmware.vmware_vm_host_drs_rule_module.rst +++ b/docs/community.vmware.vmware_vm_host_drs_rule_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_vm_host_drs_rule_module: -**************************************** -community.vmware.vmware_vm_host_drs_rule -**************************************** +community.vmware.vmware_vm_host_drs_rule module -- Creates vm/host group in a given cluster ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Creates vm/host group in a given cluster** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_vm_host_drs_rule`. .. contents:: @@ -16,320 +17,310 @@ community.vmware.vmware_vm_host_drs_rule Synopsis -------- + - This module can be used to create VM-Host rules in a given cluster. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- affinity_rule - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
If set to true, the DRS rule will be an Affinity rule.
-
If set to false, the DRS rule will be an Anti-Affinity rule.
-
Effective only if state is set to present.
-
-
- cluster_name - -
- string - / required -
-
- -
Cluster to create VM-Host rule.
-
-
- datacenter - -
- string -
-
- -
Datacenter to search for given cluster. If not set, we use first cluster we encounter with cluster_name.
-

aliases: datacenter_name
-
-
- drs_rule_name - -
- string - / required -
-
- -
Name of rule to create or remove.
-
-
- enabled - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
If set to true, the DRS rule will be enabled.
-
Effective only if state is set to present.
-
-
- host_group_name - -
- string -
-
- -
Name of Host group to use with rule.
-
Effective only if state is set to present.
-
-
- 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.
-
-
- mandatory - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
If set to true, the DRS rule will be mandatory.
-
Effective only if state is set to present.
-
-
- 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 rule does not exist then the rule will be created.
-
If set to absent and the rule exists then the rule 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.
-
-
- vm_group_name - -
- string -
-
- -
Name of VM group to use with rule.
-
Effective only if state is set to present.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

affinity_rule

+ +

+ boolean +

+
+

If set to true, the DRS rule will be an Affinity rule.

+

If set to false, the DRS rule will be an Anti-Affinity rule.

+

Effective only if state is set to present.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

cluster_name

+ +

+ string + / required +

+
+

Cluster to create VM-Host rule.

+
+
+
+

datacenter

+ +

aliases: datacenter_name

+

+ string +

+
+

Datacenter to search for given cluster. If not set, we use first cluster we encounter with cluster_name.

+
+
+

drs_rule_name

+ +

+ string + / required +

+
+

Name of rule to create or remove.

+
+
+

enabled

+ +

+ boolean +

+
+

If set to true, the DRS rule will be enabled.

+

Effective only if state is set to present.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

host_group_name

+ +

+ string +

+
+

Name of Host group to use with rule.

+

Effective only if state is set to present.

+
+
+

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.

+
+
+

mandatory

+ +

+ boolean +

+
+

If set to true, the DRS rule will be mandatory.

+

Effective only if state is set to present.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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 +

+
+

If set to present and the rule does not exist then the rule will be created.

+

If set to absent and the rule exists then the rule will be deleted.

+

Choices:

+
    +
  • "present" ← (default)

  • +
  • "absent"

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

vm_group_name

+ +

+ string +

+
+

Name of VM group to use with rule.

+

Effective only if state is set to present.

+
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -337,6 +328,7 @@ Examples .. code-block:: yaml + --- - name: "Create mandatory DRS Affinity rule for VM/Host" community.vmware.vmware_vm_host_drs_rule: @@ -354,11 +346,20 @@ Examples -Status ------- + Authors ~~~~~~~ - Karsten Kaj Jakobsen (@karstenjakobsen) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_vm_info_module.rst b/docs/community.vmware.vmware_vm_info_module.rst index 3d426b66d..97dc6473c 100644 --- a/docs/community.vmware.vmware_vm_info_module.rst +++ b/docs/community.vmware.vmware_vm_info_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_vm_info_module: -******************************* -community.vmware.vmware_vm_info -******************************* +community.vmware.vmware_vm_info module -- Return basic info pertaining to a VMware machine guest +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Return basic info pertaining to a VMware machine guest** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_vm_info`. .. contents:: @@ -16,442 +17,437 @@ community.vmware.vmware_vm_info Synopsis -------- + - Return basic information pertaining to a vSphere or ESXi virtual machine guest. - Cluster name as fact is added in version 2.7. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- folder - -
- string -
-
- -
Specify a folder location of VMs to gather information from.
-
Examples:
-
folder: /ha-datacenter/vm
-
folder: ha-datacenter/vm
-
folder: /datacenter1/vm
-
folder: datacenter1/vm
-
folder: /datacenter1/vm/folder1
-
folder: datacenter1/vm/folder1
-
folder: /folder1/datacenter1/vm
-
folder: folder1/datacenter1/vm
-
folder: /folder1/datacenter1/vm/folder2
-
-
- 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.
-
-
- show_allocated - -
- boolean -
-
added in 2.5.0
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Allocated storage in byte and memory in MB are shown if it set to True.
-
-
- show_attribute - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Attributes related to VM guest shown in information only when this is set true.
-
-
- show_cluster - -
- boolean -
-
added in 3.5.0
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Tags virtual machine's cluster is shown if set to true.
-
-
- show_datacenter - -
- boolean -
-
added in 3.5.0
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Tags virtual machine's datacenter is shown if set to true.
-
-
- show_datastore - -
- boolean -
-
added in 3.5.0
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Tags virtual machine's datastore is shown if set to true.
-
-
- show_esxi_hostname - -
- boolean -
-
added in 3.5.0
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Tags virtual machine's ESXi host is shown if set to true.
-
-
- show_folder - -
- boolean -
-
added in 3.7.0
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Show folders
-
-
- show_mac_address - -
- boolean -
-
added in 3.5.0
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Tags virtual machine's mac address is shown if set to true.
-
-
- show_net - -
- boolean -
-
added in 3.5.0
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Tags virtual machine's network is shown if set to true.
-
-
- show_resource_pool - -
- boolean -
-
added in 3.5.0
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Tags virtual machine's resource pool is shown if set to true.
-
-
- show_tag - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Tags related to virtual machine are shown if set to true.
-
-
- 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.
-
-
- vm_name - -
- string -
-
- -
Name of the virtual machine to get related configurations information from.
-
-
- vm_type - -
- string -
-
-
    Choices: -
  • all ←
  • -
  • vm
  • -
  • template
  • -
-
-
If set to vm, then information are gathered for virtual machines only.
-
If set to template, then information are gathered for virtual machine templates only.
-
If set to all, then information are gathered for all virtual machines and virtual machine templates.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

folder

+ +

+ string +

+
+

Specify a folder location of VMs to gather information from.

+

Examples:

+

folder: /ha-datacenter/vm

+

folder: ha-datacenter/vm

+

folder: /datacenter1/vm

+

folder: datacenter1/vm

+

folder: /datacenter1/vm/folder1

+

folder: datacenter1/vm/folder1

+

folder: /folder1/datacenter1/vm

+

folder: folder1/datacenter1/vm

+

folder: /folder1/datacenter1/vm/folder2

+
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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_allocated

+ +

+ boolean +

+

added in community.vmware 2.5.0

+
+

Allocated storage in byte and memory in MB are shown if it set to True.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

show_attribute

+ +

+ boolean +

+
+

Attributes related to VM guest shown in information only when this is set true.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

show_cluster

+ +

+ boolean +

+

added in community.vmware 3.5.0

+
+

Tags virtual machine's cluster is shown if set to true.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

show_datacenter

+ +

+ boolean +

+

added in community.vmware 3.5.0

+
+

Tags virtual machine's datacenter is shown if set to true.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

show_datastore

+ +

+ boolean +

+

added in community.vmware 3.5.0

+
+

Tags virtual machine's datastore is shown if set to true.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

show_esxi_hostname

+ +

+ boolean +

+

added in community.vmware 3.5.0

+
+

Tags virtual machine's ESXi host is shown if set to true.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

show_folder

+ +

+ boolean +

+

added in community.vmware 3.7.0

+
+

Show folders

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

show_mac_address

+ +

+ boolean +

+

added in community.vmware 3.5.0

+
+

Tags virtual machine's mac address is shown if set to true.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

show_net

+ +

+ boolean +

+

added in community.vmware 3.5.0

+
+

Tags virtual machine's network is shown if set to true.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

show_resource_pool

+ +

+ boolean +

+

added in community.vmware 3.5.0

+
+

Tags virtual machine's resource pool is shown if set to true.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

show_tag

+ +

+ boolean +

+
+

Tags related to virtual machine are shown if set to true.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

vm_name

+ +

+ string +

+
+

Name of the virtual machine to get related configurations information from.

+
+
+

vm_type

+ +

+ string +

+
+

If set to vm, then information are gathered for virtual machines only.

+

If set to template, then information are gathered for virtual machine templates only.

+

If set to all, then information are gathered for all virtual machines and virtual machine templates.

+

Choices:

+
    +
  • "all" ← (default)

  • +
  • "vm"

  • +
  • "template"

  • +
+ +
+ + Notes ----- -.. note:: - - Fact about ``moid`` added in VMware collection 1.4.0. - - Fact about ``datastore_url`` is added in VMware collection 1.18.0. - - All modules requires API write access and hence is not supported on a free ESXi license. - +- Fact about \ :literal:`moid`\ added in VMware collection 1.4.0. +- Fact about \ :literal:`datastore\_url`\ is added in VMware collection 1.18.0. +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -459,6 +455,7 @@ Examples .. code-block:: yaml + - name: Gather all registered virtual machines community.vmware.vmware_vm_info: hostname: '{{ vcenter_hostname }}' @@ -570,41 +567,42 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- virtual_machines - -
- list -
-
success -
list of dictionary of virtual machines and their information
-
-
Sample:
-
[{'guest_name': 'ubuntu_t', 'datacenter': 'Datacenter-1', 'cluster': None, 'esxi_hostname': '10.76.33.226', 'folder': '/Datacenter-1/vm', 'guest_fullname': 'Ubuntu Linux (64-bit)', 'ip_address': '', 'mac_address': ['00:50:56:87:a5:9a'], 'power_state': 'poweredOff', 'uuid': '4207072c-edd8-3bd5-64dc-903fd3a0db04', 'vm_network': {'00:50:56:87:a5:9a': {'ipv4': ['10.76.33.228'], 'ipv6': []}}, 'attributes': {'job': 'backup-prepare'}, 'datastore_url': [{'name': 't880-o2g', 'url': '/vmfs/volumes/e074264a-e5c82a58'}], 'tags': [{'category_id': 'urn:vmomi:InventoryServiceCategory:b316cc45-f1a9-4277-811d-56c7e7975203:GLOBAL', 'category_name': 'cat_0001', 'description': '', 'id': 'urn:vmomi:InventoryServiceTag:43737ec0-b832-4abf-abb1-fd2448ce3b26:GLOBAL', 'name': 'tag_0001'}], 'moid': 'vm-24', 'allocated': {'storage': 500000000, 'cpu': 2, 'memory': 16}}]
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

virtual_machines

+ +

+ list + / elements=string +

+
+

list of dictionary of virtual machines and their information

+

Returned: success

+

Sample: [{"allocated": {"cpu": 2, "memory": 16, "storage": 500000000}, "attributes": {"job": "backup-prepare"}, "cluster": null, "datacenter": "Datacenter-1", "datastore_url": [{"name": "t880-o2g", "url": "/vmfs/volumes/e074264a-e5c82a58"}], "esxi_hostname": "10.76.33.226", "folder": "/Datacenter-1/vm", "guest_fullname": "Ubuntu Linux (64-bit)", "guest_name": "ubuntu_t", "ip_address": "", "mac_address": ["00:50:56:87:a5:9a"], "moid": "vm-24", "power_state": "poweredOff", "tags": [{"category_id": "urn:vmomi:InventoryServiceCategory:b316cc45-f1a9-4277-811d-56c7e7975203:GLOBAL", "category_name": "cat_0001", "description": "", "id": "urn:vmomi:InventoryServiceTag:43737ec0-b832-4abf-abb1-fd2448ce3b26:GLOBAL", "name": "tag_0001"}], "uuid": "4207072c-edd8-3bd5-64dc-903fd3a0db04", "vm_network": {"00:50:56:87:a5:9a": {"ipv4": ["10.76.33.228"], "ipv6": []}}}]

+
+ + Authors @@ -613,3 +611,13 @@ Authors - Joseph Callen (@jcpowermac) - Abhijeet Kasurde (@Akasurde) - Fedor Vompe (@sumkincpp) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_vm_inventory_inventory.rst b/docs/community.vmware.vmware_vm_inventory_inventory.rst index 983c16eee..741e27125 100644 --- a/docs/community.vmware.vmware_vm_inventory_inventory.rst +++ b/docs/community.vmware.vmware_vm_inventory_inventory.rst @@ -1,12 +1,15 @@ -.. _community.vmware.vmware_vm_inventory_inventory: -************************************ -community.vmware.vmware_vm_inventory -************************************ +community.vmware.vmware_vm_inventory inventory -- VMware Guest inventory source ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**VMware Guest inventory source** +This inventory plugin is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. +You need further requirements to be able to use this inventory plugin, +see `Requirements `_ for details. + +To use it in a playbook, specify: :code:`community.vmware.vmware_vm_inventory`. .. contents:: @@ -16,722 +19,780 @@ community.vmware.vmware_vm_inventory Synopsis -------- + - Get virtual machines as inventory hosts from VMware environment. -- Uses any file which ends with vmware.yml, vmware.yaml, vmware_vm_inventory.yml, or vmware_vm_inventory.yaml as a YAML configuration file. +- Uses any file which ends with vmware.yml, vmware.yaml, vmware\_vm\_inventory.yml, or vmware\_vm\_inventory.yaml as a YAML configuration file. + +.. _ansible_collections.community.vmware.vmware_vm_inventory_inventory_requirements: Requirements ------------ -The below requirements are needed on the local Ansible controller node that executes this inventory. +The below requirements are needed on the local controller node that executes this inventory. -- requests >= 2.3 +- requests \>= 2.3 - vSphere Automation SDK - For tag feature + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsConfigurationComments
-
- cache - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
ini entries: -

[inventory]
cache = no

-
-
env:ANSIBLE_INVENTORY_CACHE
-
-
Toggle to enable/disable the caching of the inventory's source data, requires a cache plugin setup to work.
-
-
- cache_connection - -
- string -
-
- -
ini entries: -

[defaults]
fact_caching_connection = VALUE

-

[inventory]
cache_connection = VALUE

-
-
env:ANSIBLE_CACHE_PLUGIN_CONNECTION
-
env:ANSIBLE_INVENTORY_CACHE_CONNECTION
-
-
Cache connection data or path, read cache plugin documentation for specifics.
-
-
- cache_plugin - -
- string -
-
- Default:
"memory"
-
-
ini entries: -

[defaults]
fact_caching = memory

-

[inventory]
cache_plugin = memory

-
-
env:ANSIBLE_CACHE_PLUGIN
-
env:ANSIBLE_INVENTORY_CACHE_PLUGIN
-
-
Cache plugin to use for the inventory's source data.
-
-
- cache_prefix - -
- - -
-
- Default:
"ansible_inventory_"
-
-
ini entries: -

[default]
fact_caching_prefix = ansible_inventory_

-

[defaults]
fact_caching_prefix = ansible_inventory_

-

[inventory]
cache_prefix = ansible_inventory_

-
-
env:ANSIBLE_CACHE_PLUGIN_PREFIX
-
env:ANSIBLE_INVENTORY_CACHE_PLUGIN_PREFIX
-
-
Prefix to use for cache plugin files/tables
-
-
- cache_timeout - -
- integer -
-
- Default:
3600
-
-
ini entries: -

[defaults]
fact_caching_timeout = 3600

-

[inventory]
cache_timeout = 3600

-
-
env:ANSIBLE_CACHE_PLUGIN_TIMEOUT
-
env:ANSIBLE_INVENTORY_CACHE_TIMEOUT
-
-
Cache duration in seconds
-
-
- compose - -
- dictionary -
-
- Default:
{}
-
- -
Create vars from jinja2 expressions.
-
-
- filters - -
- list - / elements=string -
-
- Default:
[]
-
- -
This option allows client-side filtering hosts with jinja templating.
-
When server-side filtering is introduced, it should be preferred over this.
-
-
- groups - -
- dictionary -
-
- Default:
{}
-
- -
Add hosts to group based on Jinja2 conditionals.
-
-
- hostname - -
- - - / required -
-
- -
env:VMWARE_HOST
-
env:VMWARE_SERVER
-
-
Name of vCenter or ESXi server.
-
-
- hostnames - -
- list - / elements=string -
-
- Default:
["config.name + \"_\" + config.uuid"]
-
- -
A list of templates in order of precedence to compose inventory_hostname.
-
Ignores template if resulted in an empty string or None value.
-
You can use property specified in properties as variables in the template.
-
-
- keyed_groups - -
- list - / elements=dictionary -
-
- Default:
[{"key": "config.guestId", "separator": ""}, {"key": "summary.runtime.powerState", "separator": ""}]
-
- -
Add hosts to group based on the values of a variable.
-
-
- default_value - -
- string -
-
added in 2.12
-
- - -
The default value when the host variable's value is an empty string.
-
This option is mutually exclusive with trailing_separator.
-
-
- key - -
- string -
-
- - -
The key from input dictionary used to generate groups
-
-
- parent_group - -
- string -
-
- - -
parent group for keyed group
-
-
- prefix - -
- string -
-
- Default:
""
-
- -
A keyed group name will start with this prefix
-
-
- separator - -
- string -
-
- Default:
"_"
-
- -
separator used to build the keyed group name
-
-
- trailing_separator - -
- boolean -
-
added in 2.12
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
- -
Set this option to False to omit the separator after the host variable when the value is an empty string.
-
This option is mutually exclusive with default_value.
-
-
- leading_separator - -
- boolean -
-
added in 2.11
-
- Default:
"yes"
-
- -
Use in conjunction with keyed_groups.
-
By default, a keyed group that does not have a prefix or a separator provided will have a name that starts with an underscore.
-
This is because the default prefix is "" and the default separator is "_".
-
Set this option to False to omit the leading underscore (or other separator) if no prefix is given.
-
If the group name is derived from a mapping the separator is still used to concatenate the items.
-
To not use a separator in the group name at all, set the separator for the keyed group to an empty string instead.
-
-
- password - -
- - - / required -
-
- -
env:VMWARE_PASSWORD
-
-
Password of vSphere user.
-
Accepts vault encrypted variable.
-
-
- port - -
- integer -
-
- Default:
443
-
-
env:VMWARE_PORT
-
-
Port number used to connect to vCenter or ESXi Server.
-
-
- properties - -
- list - / elements=string -
-
- Default:
["name", "config.cpuHotAddEnabled", "config.cpuHotRemoveEnabled", "config.instanceUuid", "config.hardware.numCPU", "config.template", "config.name", "config.uuid", "guest.hostName", "guest.ipAddress", "guest.guestId", "guest.guestState", "runtime.maxMemoryUsage", "customValue", "summary.runtime.powerState", "config.guestId"]
-
- -
Specify the list of VMware schema properties associated with the VM.
-
These properties will be populated in hostvars of the given VM.
-
Each value in the list can be a path to a specific property in VM object or a path to a collection of VM objects.
-
config.name, config.uuid are required properties if hostnames is set to default.
-
config.guestId, summary.runtime.powerState are required if keyed_groups is set to default.
-
Please make sure that all the properties that are used in other parameters are included in this options.
-
In addition to VM properties, the following are special values
-
Use customValue to populate virtual machine's custom attributes. customValue is only supported by vCenter and not by ESXi.
-
Use all to populate all the properties of the virtual machine. The value all is time consuming operation, do not use unless required absolutely.
- -
-
- proxy_host - -
- string -
-
- -
env:VMWARE_PROXY_HOST
-
-
Address of a proxy that will receive all HTTPS requests and relay them.
-
The format is a hostname or a IP.
-
This feature depends on a version of pyvmomi>=v6.7.1.2018.12.
-
-
- proxy_port - -
- integer -
-
- -
env:VMWARE_PROXY_PORT
-
-
Port of the HTTP proxy that will receive all HTTPS requests and relay them.
-
-
- resources - -
- list - / elements=dictionary -
-
- Default:
[]
-
- -
A list of resources to limit search scope.
-
Each resource item is represented by exactly one 'vim_type_snake_case:list of resource names pair and optional nested resources
-
Key name is based on snake case of a vim type name; e.g host_system correspond to vim.HostSystem
- -
-
- strict - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
- -
If yes make invalid entries a fatal error, otherwise skip and continue.
-
Since it is possible to use facts in the expressions they might not always be available and we ignore those errors by default.
-
-
- use_extra_vars - -
- boolean -
-
added in 2.11
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
ini entries: -

[inventory_plugins]
use_extra_vars = no

-
-
env:ANSIBLE_INVENTORY_USE_EXTRA_VARS
-
-
Merge extra vars into the available variables for composition (highest precedence).
-
-
- username - -
- - - / required -
-
- -
env:VMWARE_USER
-
env:VMWARE_USERNAME
-
-
Name of vSphere user.
-
Accepts vault encrypted variable.
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
env:VMWARE_VALIDATE_CERTS
-
-
Allows connection when SSL certificates are not valid.
-
Set to false when certificates are not trusted.
-
-
- with_nested_properties - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
- -
This option transform flatten properties name to nested dictionary.
-
From 1.10.0 and onwards, default value is set to true.
-
-
- with_path - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
- -
Include virtual machines path.
-
Set this option to a string value to replace root name from 'Datacenters'.
-
-
- with_sanitized_property_name - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
- -
This option allows property name sanitization to create safe property names for use in Ansible.
-
Also, transforms property name to snake case.
-
-
- with_tags - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
- -
Include tags and associated virtual machines.
-
Requires 'vSphere Automation SDK' library to be installed on the given controller machine.
-
Please refer following URLs for installation steps
- -
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

cache

+ +

+ boolean +

+ +
+

Toggle to enable/disable the caching of the inventory's source data, requires a cache plugin setup to work.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +

Configuration:

+
    +
  • +

    INI entry

    +
    [inventory]
    +  cache = false
    + +
  • +
  • +

    Environment variable: ANSIBLE_INVENTORY_CACHE

    + +
  • +
+
+
+

cache_connection

+ +

+ string +

+ +
+

Cache connection data or path, read cache plugin documentation for specifics.

+

Configuration:

+
    +
  • +

    INI entries

    +
    [defaults]
    +  fact_caching_connection = VALUE
    + +
    [inventory]
    +  cache_connection = VALUE
    + +
  • +
  • +

    Environment variable: ANSIBLE_CACHE_PLUGIN_CONNECTION

    + +
  • +
  • +

    Environment variable: ANSIBLE_INVENTORY_CACHE_CONNECTION

    + +
  • +
+
+
+

cache_plugin

+ +

+ string +

+ +
+

Cache plugin to use for the inventory's source data.

+

Default: "memory"

+

Configuration:

+
    +
  • +

    INI entries

    +
    [defaults]
    +  fact_caching = memory
    + +
    [inventory]
    +  cache_plugin = memory
    + +
  • +
  • +

    Environment variable: ANSIBLE_CACHE_PLUGIN

    + +
  • +
  • +

    Environment variable: ANSIBLE_INVENTORY_CACHE_PLUGIN

    + +
  • +
+
+
+

cache_prefix

+ +

+ string +

+ +
+

Prefix to use for cache plugin files/tables

+

Default: "ansible_inventory_"

+

Configuration:

+
    +
  • +

    INI entries

    +
    [defaults]
    +  fact_caching_prefix = ansible_inventory_
    + +
    [inventory]
    +  cache_prefix = ansible_inventory_
    + +
  • +
  • +

    Environment variable: ANSIBLE_CACHE_PLUGIN_PREFIX

    + +
  • +
  • +

    Environment variable: ANSIBLE_INVENTORY_CACHE_PLUGIN_PREFIX

    + +
  • +
+
+
+

cache_timeout

+ +

+ integer +

+ +
+

Cache duration in seconds

+

Default: 3600

+

Configuration:

+
    +
  • +

    INI entries

    +
    [defaults]
    +  fact_caching_timeout = 3600
    + +
    [inventory]
    +  cache_timeout = 3600
    + +
  • +
  • +

    Environment variable: ANSIBLE_CACHE_PLUGIN_TIMEOUT

    + +
  • +
  • +

    Environment variable: ANSIBLE_INVENTORY_CACHE_TIMEOUT

    + +
  • +
+
+
+

compose

+ +

+ dictionary +

+ +
+

Create vars from jinja2 expressions.

+

Default: {}

+
+
+

filters

+ +

+ list + / elements=string +

+ +
+

This option allows client-side filtering hosts with jinja templating.

+

When server-side filtering is introduced, it should be preferred over this.

+

Default: []

+
+
+

groups

+ +

+ dictionary +

+ +
+

Add hosts to group based on Jinja2 conditionals.

+

Default: {}

+
+
+

hostname

+ +

+ string + / required +

+ +
+

Name of vCenter or ESXi server.

+

Configuration:

+
    +
  • +

    Environment variable: VMWARE_HOST

    + +
  • +
  • +

    Environment variable: VMWARE_SERVER

    + +
  • +
+
+
+

hostnames

+ +

+ list + / elements=string +

+ +
+

A list of templates in order of precedence to compose inventory_hostname.

+

Ignores template if resulted in an empty string or None value.

+

You can use property specified in properties as variables in the template.

+

Default: ["config.name + \"_\" + config.uuid"]

+
+
+

keyed_groups

+ +

+ list + / elements=dictionary +

+ +
+

Add hosts to group based on the values of a variable.

+

Default: [{"key": "config.guestId", "separator": ""}, {"key": "summary.runtime.powerState", "separator": ""}]

+
+
+

default_value

+ +

+ string +

+

added in ansible-core 2.12

+ +
+

The default value when the host variable's value is an empty string.

+

This option is mutually exclusive with keyed_groups[].trailing_separator.

+
+
+

key

+ +

+ string +

+ +
+

The key from input dictionary used to generate groups

+
+
+

parent_group

+ +

+ string +

+ +
+

parent group for keyed group

+
+
+

prefix

+ +

+ string +

+ +
+

A keyed group name will start with this prefix

+

Default: ""

+
+
+

separator

+ +

+ string +

+ +
+

separator used to build the keyed group name

+

Default: "_"

+
+
+

trailing_separator

+ +

+ boolean +

+

added in ansible-core 2.12

+ +
+

Set this option to False to omit the keyed_groups[].separator after the host variable when the value is an empty string.

+

This option is mutually exclusive with keyed_groups[].default_value.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

leading_separator

+ +

+ boolean +

+

added in ansible-core 2.11

+ +
+

Use in conjunction with keyed_groups.

+

By default, a keyed group that does not have a prefix or a separator provided will have a name that starts with an underscore.

+

This is because the default prefix is "" and the default separator is "_".

+

Set this option to False to omit the leading underscore (or other separator) if no prefix is given.

+

If the group name is derived from a mapping the separator is still used to concatenate the items.

+

To not use a separator in the group name at all, set the separator for the keyed group to an empty string instead.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

password

+ +

+ string + / required +

+ +
+

Password of vSphere user.

+

Accepts vault encrypted variable.

+

Configuration:

+
    +
  • +

    Environment variable: VMWARE_PASSWORD

    + +
  • +
+
+
+

port

+ +

+ integer +

+ +
+

Port number used to connect to vCenter or ESXi Server.

+

Default: 443

+

Configuration:

+
    +
  • +

    Environment variable: VMWARE_PORT

    + +
  • +
+
+
+

properties

+ +

+ list + / elements=string +

+ +
+

Specify the list of VMware schema properties associated with the VM.

+

These properties will be populated in hostvars of the given VM.

+

Each value in the list can be a path to a specific property in VM object or a path to a collection of VM objects.

+

config.name, config.uuid are required properties if hostnames is set to default.

+

config.guestId, summary.runtime.powerState are required if keyed_groups is set to default.

+

Please make sure that all the properties that are used in other parameters are included in this options.

+

In addition to VM properties, the following are special values

+

Use customValue to populate virtual machine's custom attributes. customValue is only supported by vCenter and not by ESXi.

+

Use all to populate all the properties of the virtual machine. The value all is time consuming operation, do not use unless required absolutely.

+

Please refer more VMware guest attributes which can be used as properties https://docs.ansible.com/ansible/latest/collections/community/vmware/docsite/vmware_scenarios/vmware_inventory_vm_attributes.html

+

Default: ["name", "config.cpuHotAddEnabled", "config.cpuHotRemoveEnabled", "config.instanceUuid", "config.hardware.numCPU", "config.template", "config.name", "config.uuid", "guest.hostName", "guest.ipAddress", "guest.guestId", "guest.guestState", "runtime.maxMemoryUsage", "customValue", "summary.runtime.powerState", "config.guestId"]

+
+
+

proxy_host

+ +

+ string +

+ +
+

Address of a proxy that will receive all HTTPS requests and relay them.

+

The format is a hostname or a IP.

+

This feature depends on a version of pyvmomi>=v6.7.1.2018.12.

+

Configuration:

+
    +
  • +

    Environment variable: VMWARE_PROXY_HOST

    + +
  • +
+
+
+

proxy_port

+ +

+ integer +

+ +
+

Port of the HTTP proxy that will receive all HTTPS requests and relay them.

+

Configuration:

+
    +
  • +

    Environment variable: VMWARE_PROXY_PORT

    + +
  • +
+
+
+

resources

+ +

+ list + / elements=dictionary +

+ +
+

A list of resources to limit search scope.

+

Each resource item is represented by exactly one 'vim_type_snake_case:list of resource names pair and optional nested resources

+

Key name is based on snake case of a vim type name; e.g host_system correspond to vim.HostSystem

+

See VIM Types

+

Default: []

+
+
+

strict

+ +

+ boolean +

+ +
+

If yes make invalid entries a fatal error, otherwise skip and continue.

+

Since it is possible to use facts in the expressions they might not always be available and we ignore those errors by default.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

use_extra_vars

+ +

+ boolean +

+

added in ansible-core 2.11

+ +
+

Merge extra vars into the available variables for composition (highest precedence).

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +

Configuration:

+
    +
  • +

    INI entry

    +
    [inventory_plugins]
    +  use_extra_vars = false
    + +
  • +
  • +

    Environment variable: ANSIBLE_INVENTORY_USE_EXTRA_VARS

    + +
  • +
+
+
+

username

+ +

+ string + / required +

+ +
+

Name of vSphere user.

+

Accepts vault encrypted variable.

+

Configuration:

+
    +
  • +

    Environment variable: VMWARE_USER

    + +
  • +
  • +

    Environment variable: VMWARE_USERNAME

    + +
  • +
+
+
+

validate_certs

+ +

+ boolean +

+ +
+

Allows connection when SSL certificates are not valid.

+

Set to false when certificates are not trusted.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +

Configuration:

+
    +
  • +

    Environment variable: VMWARE_VALIDATE_CERTS

    + +
  • +
+
+
+

with_nested_properties

+ +

+ boolean +

+ +
+

This option transform flatten properties name to nested dictionary.

+

From 1.10.0 and onwards, default value is set to true.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

with_path

+ +

+ boolean +

+ +
+

Include virtual machines path.

+

Set this option to a string value to replace root name from 'Datacenters'.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

with_sanitized_property_name

+ +

+ boolean +

+ +
+

This option allows property name sanitization to create safe property names for use in Ansible.

+

Also, transforms property name to snake case.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

with_tags

+ +

+ boolean +

+ +
+

Include tags and associated virtual machines.

+

Requires 'vSphere Automation SDK' library to be installed on the given controller machine.

+

Please refer following URLs for installation steps

+

https://code.vmware.com/web/sdk/7.0/vsphere-automation-python

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+ + @@ -741,6 +802,7 @@ Examples .. code-block:: yaml + # Sample configuration file for VMware Guest dynamic inventory plugin: community.vmware.vmware_vm_inventory strict: false @@ -960,8 +1022,7 @@ Examples -Status ------- + Authors @@ -972,3 +1033,11 @@ Authors .. hint:: Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up. + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_vm_shell_module.rst b/docs/community.vmware.vmware_vm_shell_module.rst index 014a576a7..4c3e47cde 100644 --- a/docs/community.vmware.vmware_vm_shell_module.rst +++ b/docs/community.vmware.vmware_vm_shell_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_vm_shell_module: -******************************** -community.vmware.vmware_vm_shell -******************************** +community.vmware.vmware_vm_shell module -- Run commands in a VMware guest operating system +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Run commands in a VMware guest operating system** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_vm_shell`. .. contents:: @@ -16,389 +17,366 @@ community.vmware.vmware_vm_shell Synopsis -------- + - Module allows user to run common system administration commands in the guest operating system. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- cluster - -
- string -
-
- -
The cluster hosting the virtual machine.
-
If set, it will help to speed up virtual machine search.
-
-
- datacenter - -
- string -
-
- -
The datacenter hosting the virtual machine.
-
If set, it will help to speed up virtual machine search.
-
-
- folder - -
- string -
-
- -
Destination folder, absolute or relative path to find an existing guest or create the new guest.
-
The folder should include the datacenter. ESX's datacenter is ha-datacenter.
-
Examples:
-
folder: /ha-datacenter/vm
-
folder: ha-datacenter/vm
-
folder: /datacenter1/vm
-
folder: datacenter1/vm
-
folder: /datacenter1/vm/folder1
-
folder: datacenter1/vm/folder1
-
folder: /folder1/datacenter1/vm
-
folder: folder1/datacenter1/vm
-
folder: /folder1/datacenter1/vm/folder2
-
-
- 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.
-
-
- timeout - -
- integer -
-
- Default:
3600
-
-
Timeout in seconds.
-
If set to positive integers, then wait_for_process will honor this parameter and will exit after this timeout.
-
-
- 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.
-
-
- vm_id - -
- string - / required -
-
- -
Name of the virtual machine to work with.
-
-
- vm_id_type - -
- string -
-
-
    Choices: -
  • uuid
  • -
  • instance_uuid
  • -
  • dns_name
  • -
  • inventory_path
  • -
  • vm_name ←
  • -
-
-
The VMware identification method by which the virtual machine will be identified.
-
-
- vm_password - -
- string - / required -
-
- -
The password used to login-in to the virtual machine.
-
-
- vm_shell - -
- string - / required -
-
- -
The absolute path to the program to start.
-
On Linux, shell is executed via bash.
-
-
- vm_shell_args - -
- string -
-
- Default:
" "
-
-
The argument to the program.
-
The characters which must be escaped to the shell also be escaped on the command line provided.
-
-
- vm_shell_cwd - -
- string -
-
- -
The current working directory of the application from which it will be run.
-
-
- vm_shell_env - -
- list - / elements=string -
-
- -
Comma separated list of environment variable, specified in the guest OS notation.
-
-
- vm_username - -
- string - / required -
-
- -
The user to login-in to the virtual machine.
-
-
- wait_for_process - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
If set to true, module will wait for process to complete in the given virtual machine.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

cluster

+ +

+ string +

+
+

The cluster hosting the virtual machine.

+

If set, it will help to speed up virtual machine search.

+
+
+

datacenter

+ +

+ string +

+
+

The datacenter hosting the virtual machine.

+

If set, it will help to speed up virtual machine search.

+
+
+

folder

+ +

+ string +

+
+

Destination folder, absolute or relative path to find an existing guest or create the new guest.

+

The folder should include the datacenter. ESX's datacenter is ha-datacenter.

+

Examples:

+

folder: /ha-datacenter/vm

+

folder: ha-datacenter/vm

+

folder: /datacenter1/vm

+

folder: datacenter1/vm

+

folder: /datacenter1/vm/folder1

+

folder: datacenter1/vm/folder1

+

folder: /folder1/datacenter1/vm

+

folder: folder1/datacenter1/vm

+

folder: /folder1/datacenter1/vm/folder2

+
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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.

+
+
+

timeout

+ +

+ integer +

+
+

Timeout in seconds.

+

If set to positive integers, then wait_for_process will honor this parameter and will exit after this timeout.

+

Default: 3600

+
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

vm_id

+ +

+ string + / required +

+
+

Name of the virtual machine to work with.

+
+
+

vm_id_type

+ +

+ string +

+
+

The VMware identification method by which the virtual machine will be identified.

+

Choices:

+
    +
  • "uuid"

  • +
  • "instance_uuid"

  • +
  • "dns_name"

  • +
  • "inventory_path"

  • +
  • "vm_name" ← (default)

  • +
+ +
+
+

vm_password

+ +

+ string + / required +

+
+

The password used to login-in to the virtual machine.

+
+
+

vm_shell

+ +

+ string + / required +

+
+

The absolute path to the program to start.

+

On Linux, shell is executed via bash.

+
+
+

vm_shell_args

+ +

+ string +

+
+

The argument to the program.

+

The characters which must be escaped to the shell also be escaped on the command line provided.

+

Default: " "

+
+
+

vm_shell_cwd

+ +

+ string +

+
+

The current working directory of the application from which it will be run.

+
+
+

vm_shell_env

+ +

+ list + / elements=string +

+
+

Comma separated list of environment variable, specified in the guest OS notation.

+
+
+

vm_username

+ +

+ string + / required +

+
+

The user to login-in to the virtual machine.

+
+
+

wait_for_process

+ +

+ boolean +

+
+

If set to true, module will wait for process to complete in the given virtual machine.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+ + Notes ----- -.. note:: - - Only the first match against vm_id is used, even if there are multiple matches. - - All modules requires API write access and hence is not supported on a free ESXi license. - +- Only the first match against vm\_id is used, even if there are multiple matches. +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -406,6 +384,7 @@ Examples .. code-block:: yaml + - name: Run command inside a virtual machine community.vmware.vmware_vm_shell: hostname: "{{ vcenter_hostname }}" @@ -472,41 +451,41 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- results - -
- dictionary -
-
on success -
metadata about the new process after completion with wait_for_process
-
-
Sample:
-
{'cmd_line': '"/bin/sleep" 1', 'end_time': '2018-04-26T05:03:21+00:00', 'exit_code': 0, 'name': 'sleep', 'owner': 'dev1', 'start_time': '2018-04-26T05:03:19+00:00', 'uuid': '564db1e2-a3ff-3b0e-8b77-49c25570bb66'}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

results

+ +

+ dictionary +

+
+

metadata about the new process after completion with wait_for_process

+

Returned: on success

+

Sample: {"cmd_line": "\"/bin/sleep\" 1", "end_time": "2018-04-26T05:03:21+00:00", "exit_code": 0, "name": "sleep", "owner": "dev1", "start_time": "2018-04-26T05:03:19+00:00", "uuid": "564db1e2-a3ff-3b0e-8b77-49c25570bb66"}

+
+ + Authors @@ -514,3 +493,13 @@ Authors - Ritesh Khadgaray (@ritzk) - Abhijeet Kasurde (@Akasurde) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_vm_storage_policy_info_module.rst b/docs/community.vmware.vmware_vm_storage_policy_info_module.rst index 1eed0f71a..038739c73 100644 --- a/docs/community.vmware.vmware_vm_storage_policy_info_module.rst +++ b/docs/community.vmware.vmware_vm_storage_policy_info_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_vm_storage_policy_info_module: -********************************************** -community.vmware.vmware_vm_storage_policy_info -********************************************** +community.vmware.vmware_vm_storage_policy_info module -- Gather information about vSphere storage profile defined storage policy information. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Gather information about vSphere storage profile defined storage policy information.** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_vm_storage_policy_info`. .. contents:: @@ -16,160 +17,159 @@ community.vmware.vmware_vm_storage_policy_info Synopsis -------- + - Returns basic information on vSphere storage profiles. - A vSphere storage profile defines storage policy information that describes storage requirements for virtual machines and storage capabilities of storage providers. + + + + 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.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -177,6 +177,7 @@ Examples .. code-block:: yaml + - name: Get SPBM info community.vmware.vmware_vm_storage_policy_info: hostname: '{{ vcenter_hostname }}' @@ -187,44 +188,55 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- spbm_profiles - -
- list -
-
success -
list of dictionary of SPBM info
-
-
Sample:
-
[{'constraints_sub_profiles': [{'rule_set_info': [{'id': 'hostFailuresToTolerate', 'value': 1}, {'id': 'stripeWidth', 'value': 1}, {'id': 'forceProvisioning', 'value': False}, {'id': 'proportionalCapacity', 'value': 0}, {'id': 'cacheReservation', 'value': 0}], 'rule_set_name': 'VSAN sub-profile'}], 'description': 'Storage policy used as default for vSAN datastores', 'id': 'aa6d5a82-1c88-45da-85d3-3d74b91a5bad', 'name': 'vSAN Default Storage Policy'}]
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

spbm_profiles

+ +

+ list + / elements=string +

+
+

list of dictionary of SPBM info

+

Returned: success

+

Sample: [{"constraints_sub_profiles": [{"rule_set_info": [{"id": "hostFailuresToTolerate", "value": 1}, {"id": "stripeWidth", "value": 1}, {"id": "forceProvisioning", "value": false}, {"id": "proportionalCapacity", "value": 0}, {"id": "cacheReservation", "value": 0}], "rule_set_name": "VSAN sub-profile"}], "description": "Storage policy used as default for vSAN datastores", "id": "aa6d5a82-1c88-45da-85d3-3d74b91a5bad", "name": "vSAN Default Storage Policy"}]

+
+ + Authors ~~~~~~~ - Abhijeet Kasurde (@Akasurde) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_vm_storage_policy_module.rst b/docs/community.vmware.vmware_vm_storage_policy_module.rst index 70bf31373..bd0c13381 100644 --- a/docs/community.vmware.vmware_vm_storage_policy_module.rst +++ b/docs/community.vmware.vmware_vm_storage_policy_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_vm_storage_policy_module: -***************************************** -community.vmware.vmware_vm_storage_policy -***************************************** +community.vmware.vmware_vm_storage_policy module -- Create vSphere storage policies ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Create vSphere storage policies** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_vm_storage_policy`. .. contents:: @@ -16,268 +17,259 @@ community.vmware.vmware_vm_storage_policy Synopsis -------- + - A vSphere storage policy defines metadata that describes storage requirements for virtual machines and storage capabilities of storage providers. - Currently, only tag-based storage policy creation is supported. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- description - -
- string -
-
- -
Description of the storage policy to create or update.
-
This parameter is ignored when state=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.
-
-
- name - -
- string - / required -
-
- -
Name of the storage policy to create, update, or delete.
-
-
- 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 ←
  • -
-
-
State of storage policy.
-
If set to present, the storage policy is created.
-
If set to absent, the storage policy is deleted.
-
-
- tag_affinity - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
If set to true, the storage policy enforces that virtual machines require the existence of a tag for datastore placement.
-
If set to false, the storage policy enforces that virtual machines require the absence of a tag for datastore placement.
-
This parameter is ignored when state=absent.
-
-
- tag_category - -
- string -
-
- -
Name of the pre-existing tag category to assign to the storage policy.
-
This parameter is ignored when state=absent.
-
This parameter is required when state=present.
-
-
- tag_name - -
- string -
-
- -
Name of the pre-existing tag to assign to the storage policy.
-
This parameter is ignored when state=absent.
-
This parameter is required when state=present.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

description

+ +

+ string +

+
+

Description of the storage policy to create or update.

+

This parameter is ignored when state=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.

+
+
+

name

+ +

+ string + / required +

+
+

Name of the storage policy to create, update, or delete.

+
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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 +

+
+

State of storage policy.

+

If set to present, the storage policy is created.

+

If set to absent, the storage policy is deleted.

+

Choices:

+
    +
  • "absent"

  • +
  • "present" ← (default)

  • +
+ +
+
+

tag_affinity

+ +

+ boolean +

+
+

If set to true, the storage policy enforces that virtual machines require the existence of a tag for datastore placement.

+

If set to false, the storage policy enforces that virtual machines require the absence of a tag for datastore placement.

+

This parameter is ignored when state=absent.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

tag_category

+ +

+ string +

+
+

Name of the pre-existing tag category to assign to the storage policy.

+

This parameter is ignored when state=absent.

+

This parameter is required when state=present.

+
+
+

tag_name

+ +

+ string +

+
+

Name of the pre-existing tag to assign to the storage policy.

+

This parameter is ignored when state=absent.

+

This parameter is required when state=present.

+
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -285,6 +277,7 @@ Examples .. code-block:: yaml + - name: Create or update a vSphere tag-based storage policy community.vmware.vmware_vm_storage_policy: hostname: '{{ vcenter_hostname }}' @@ -309,44 +302,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- vmware_vm_storage_policy - -
- dictionary -
-
success -
dictionary of information for the storage policy
-
-
Sample:
-
{'vmware_vm_storage_policy': {'description': 'Storage policy for gold-tier storage', 'id': 'aa6d5a82-1c88-45da-85d3-3d74b91a5bad', 'name': 'gold'}}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

vmware_vm_storage_policy

+ +

+ dictionary +

+
+

dictionary of information for the storage policy

+

Returned: success

+

Sample: {"vmware_vm_storage_policy": {"description": "Storage policy for gold-tier storage", "id": "aa6d5a82-1c88-45da-85d3-3d74b91a5bad", "name": "gold"}}

+
+ + Authors ~~~~~~~ - Dustin Scott (@scottd018) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_vm_vm_drs_rule_module.rst b/docs/community.vmware.vmware_vm_vm_drs_rule_module.rst index 122c407cc..70bbd99dc 100644 --- a/docs/community.vmware.vmware_vm_vm_drs_rule_module.rst +++ b/docs/community.vmware.vmware_vm_vm_drs_rule_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_vm_vm_drs_rule_module: -************************************** -community.vmware.vmware_vm_vm_drs_rule -************************************** +community.vmware.vmware_vm_vm_drs_rule module -- Configure VMware DRS Affinity rule for virtual machines in the given cluster ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Configure VMware DRS Affinity rule for virtual machines in the given cluster** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_vm_vm_drs_rule`. .. contents:: @@ -16,290 +17,283 @@ community.vmware.vmware_vm_vm_drs_rule Synopsis -------- + - This module can be used to configure VMware DRS Affinity rule for virtual machines in the given cluster. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- affinity_rule - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
If set to true, the DRS rule will be an Affinity rule.
-
If set to false, the DRS rule will be an Anti-Affinity rule.
-
Effective only if state is set to present.
-
-
- cluster_name - -
- string - / required -
-
- -
Desired cluster name where virtual machines are present for the DRS rule.
-
-
- drs_rule_name - -
- string - / required -
-
- -
The name of the DRS rule to manage.
-
-
- enabled - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
If set to true, the DRS rule will be enabled.
-
Effective only if state is set to present.
-
-
- 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.
-
-
- mandatory - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
If set to true, the DRS rule will be mandatory.
-
Effective only if state is set to present.
-
-
- 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, then the DRS rule is created if not present.
-
If set to present, then the DRS rule is already present, it updates to the given configurations.
-
If set to absent, then the DRS rule is deleted if present.
-
-
- 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 virtual machines name for which DRS rule needs to be applied.
-
Required if state is set to present.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

affinity_rule

+ +

+ boolean +

+
+

If set to true, the DRS rule will be an Affinity rule.

+

If set to false, the DRS rule will be an Anti-Affinity rule.

+

Effective only if state is set to present.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

cluster_name

+ +

+ string + / required +

+
+

Desired cluster name where virtual machines are present for the DRS rule.

+
+
+

drs_rule_name

+ +

+ string + / required +

+
+

The name of the DRS rule to manage.

+
+
+

enabled

+ +

+ boolean +

+
+

If set to true, the DRS rule will be enabled.

+

Effective only if state is set to present.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

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.

+
+
+

mandatory

+ +

+ boolean +

+
+

If set to true, the DRS rule will be mandatory.

+

Effective only if state is set to present.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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 +

+
+

If set to present, then the DRS rule is created if not present.

+

If set to present, then the DRS rule is already present, it updates to the given configurations.

+

If set to absent, then the DRS rule is deleted if present.

+

Choices:

+
    +
  • "present" ← (default)

  • +
  • "absent"

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

vms

+ +

+ list + / elements=string +

+
+

List of virtual machines name for which DRS rule needs to be applied.

+

Required if state is set to present.

+
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -307,6 +301,7 @@ Examples .. code-block:: yaml + - name: Create DRS Affinity Rule for VM-VM community.vmware.vmware_vm_vm_drs_rule: hostname: "{{ esxi_server }}" @@ -349,44 +344,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- result - -
- dictionary -
-
when state is present -
metadata about DRS VM and VM rule
-
-
Sample:
-
{'rule_enabled': False, 'rule_key': 20, 'rule_mandatory': True, 'rule_name': 'drs_rule_0014', 'rule_uuid': '525f3bc0-253f-825a-418e-2ec93bffc9ae', 'rule_vms': ['VM_65', 'VM_146']}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

result

+ +

+ dictionary +

+
+

metadata about DRS VM and VM rule

+

Returned: when state is present

+

Sample: {"rule_enabled": false, "rule_key": 20, "rule_mandatory": true, "rule_name": "drs_rule_0014", "rule_uuid": "525f3bc0-253f-825a-418e-2ec93bffc9ae", "rule_vms": ["VM_65", "VM_146"]}

+
+ + Authors ~~~~~~~ - Abhijeet Kasurde (@Akasurde) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_vm_vss_dvs_migrate_module.rst b/docs/community.vmware.vmware_vm_vss_dvs_migrate_module.rst index 965b530d9..b80c9bbc8 100644 --- a/docs/community.vmware.vmware_vm_vss_dvs_migrate_module.rst +++ b/docs/community.vmware.vmware_vm_vss_dvs_migrate_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_vm_vss_dvs_migrate_module: -****************************************** -community.vmware.vmware_vm_vss_dvs_migrate -****************************************** +community.vmware.vmware_vm_vss_dvs_migrate module -- Migrates a virtual machine from a standard vswitch to distributed +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Migrates a virtual machine from a standard vswitch to distributed** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_vm_vss_dvs_migrate`. .. contents:: @@ -16,191 +17,186 @@ community.vmware.vmware_vm_vss_dvs_migrate Synopsis -------- + - Migrates a virtual machine from a standard vswitch to distributed + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- dvportgroup_name - -
- string - / required -
-
- -
Name of the portgroup to migrate to the virtual machine to
-
-
- 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.
-
-
- vm_name - -
- string - / required -
-
- -
Name of the virtual machine to migrate to a dvSwitch
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

dvportgroup_name

+ +

+ string + / required +

+
+

Name of the portgroup to migrate to the virtual machine to

+
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

vm_name

+ +

+ string + / required +

+
+

Name of the virtual machine to migrate to a dvSwitch

+
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -208,6 +204,7 @@ Examples .. code-block:: yaml + - name: Migrate VCSA to vDS community.vmware.vmware_vm_vss_dvs_migrate: hostname: '{{ vcenter_hostname }}' @@ -220,11 +217,20 @@ Examples -Status ------- + Authors ~~~~~~~ - Joseph Callen (@jcpowermac) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_vmkernel_info_module.rst b/docs/community.vmware.vmware_vmkernel_info_module.rst index 39b143557..165ec6217 100644 --- a/docs/community.vmware.vmware_vmkernel_info_module.rst +++ b/docs/community.vmware.vmware_vmkernel_info_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_vmkernel_info_module: -************************************* -community.vmware.vmware_vmkernel_info -************************************* +community.vmware.vmware_vmkernel_info module -- Gathers VMKernel info about an ESXi host +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Gathers VMKernel info about an ESXi host** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_vmkernel_info`. .. contents:: @@ -16,193 +17,188 @@ community.vmware.vmware_vmkernel_info Synopsis -------- + - This module can be used to gather VMKernel information about an ESXi host from given ESXi hostname or cluster name. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- cluster_name - -
- string -
-
- -
Name of the cluster.
-
VMKernel information about each ESXi server will be returned for the given cluster.
-
If esxi_hostname is not given, this parameter is required.
-
-
- esxi_hostname - -
- string -
-
- -
ESXi hostname.
-
VMKernel information about this ESXi server will be returned.
-
If cluster_name is not given, this parameter is required.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

cluster_name

+ +

+ string +

+
+

Name of the cluster.

+

VMKernel information about each ESXi server will be returned for the given cluster.

+

If esxi_hostname is not given, this parameter is required.

+
+
+

esxi_hostname

+ +

+ string +

+
+

ESXi hostname.

+

VMKernel information about this ESXi server will be returned.

+

If cluster_name is not given, this parameter is required.

+
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -210,6 +206,7 @@ Examples .. code-block:: yaml + - name: Gather VMKernel info about all ESXi Host in given Cluster community.vmware.vmware_vmkernel_info: hostname: '{{ vcenter_hostname }}' @@ -230,44 +227,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- host_vmk_info - -
- dictionary -
-
success -
metadata about VMKernel present on given host system
-
-
Sample:
-
{'10.76.33.208': [{'device': 'vmk0', 'dhcp': True, 'enable_ft': False, 'enable_management': True, 'enable_vmotion': False, 'enable_vsan': False, 'ipv4_address': '10.76.33.28', 'ipv4_subnet_mask': '255.255.255.0', 'key': 'key-vim.host.VirtualNic-vmk0', 'mac': '52:54:00:12:50:ce', 'mtu': 1500, 'portgroup': 'Management Network', 'stack': 'defaultTcpipStack'}]}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

host_vmk_info

+ +

+ dictionary +

+
+

metadata about VMKernel present on given host system

+

Returned: success

+

Sample: {"10.76.33.208": [{"device": "vmk0", "dhcp": true, "enable_ft": false, "enable_management": true, "enable_vmotion": false, "enable_vsan": false, "ipv4_address": "10.76.33.28", "ipv4_subnet_mask": "255.255.255.0", "key": "key-vim.host.VirtualNic-vmk0", "mac": "52:54:00:12:50:ce", "mtu": 1500, "portgroup": "Management Network", "stack": "defaultTcpipStack"}]}

+
+ + Authors ~~~~~~~ - Abhijeet Kasurde (@Akasurde) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_vmkernel_module.rst b/docs/community.vmware.vmware_vmkernel_module.rst index 89471fc25..5ec2bfebd 100644 --- a/docs/community.vmware.vmware_vmkernel_module.rst +++ b/docs/community.vmware.vmware_vmkernel_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_vmkernel_module: -******************************** -community.vmware.vmware_vmkernel -******************************** +community.vmware.vmware_vmkernel module -- Manages a VMware VMkernel Adapter of an ESXi host. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Manages a VMware VMkernel Adapter of an ESXi host.** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_vmkernel`. .. contents:: @@ -16,6 +17,7 @@ community.vmware.vmware_vmkernel Synopsis -------- + - This module can be used to manage the VMKernel adapters / VMKernel network interfaces of an ESXi host. - The module assumes that the host is already configured with the Port Group in case of a vSphere Standard Switch (vSS). - The module assumes that the host is already configured with the Distributed Port Group in case of a vSphere Distributed Switch (vDS). @@ -24,531 +26,512 @@ Synopsis + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- device - -
- string -
-
- -
Search VMkernel adapter by device name.
-
The parameter is required only in case of type is set to dhcp.
-
-
- dvswitch_name - -
- string -
-
- -
The name of the vSphere Distributed Switch (vDS) where to add the VMKernel interface.
-
Required parameter only if state is set to present.
-
Optional parameter from version 2.8 and onwards.
-

aliases: dvswitch
-
-
- enable_ft - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Enable Fault Tolerance traffic on the VMKernel adapter.
-
This option is only allowed if the default TCP/IP stack is used.
-
-
- enable_mgmt - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Enable Management traffic on the VMKernel adapter.
-
This option is only allowed if the default TCP/IP stack is used.
-
-
- enable_provisioning - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Enable Provisioning traffic on the VMKernel adapter.
-
This option is only allowed if the default TCP/IP stack is used.
-
-
- enable_replication - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Enable vSphere Replication traffic on the VMKernel adapter.
-
This option is only allowed if the default TCP/IP stack is used.
-
-
- enable_replication_nfc - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Enable vSphere Replication NFC traffic on the VMKernel adapter.
-
This option is only allowed if the default TCP/IP stack is used.
-
-
- enable_vmotion - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Enable vMotion traffic on the VMKernel adapter.
-
This option is only allowed if the default TCP/IP stack is used.
-
You cannot enable vMotion on an additional adapter if you already have an adapter with the vMotion TCP/IP stack configured.
-
-
- enable_vsan - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Enable VSAN traffic on the VMKernel adapter.
-
This option is only allowed if the default TCP/IP stack is used.
-
-
- esxi_hostname - -
- string - / required -
-
- -
Name of ESXi host to which VMKernel is to be managed.
-
From version 2.5 onwards, this parameter is required.
-
-
- 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 MTU for the VMKernel interface.
-
The default value of 1500 is valid from version 2.5 and onwards.
-
-
- network - -
- dictionary -
-
- Default:
{"tcpip_stack": "default", "type": "static"}
-
-
A dictionary of network details.
-
-
- default_gateway - -
- string -
-
- -
Default gateway (Override default gateway for this adapter).
-
-
- ip_address - -
- string -
-
- -
Static IP address.
-
Required if type is set to static.
-
-
- subnet_mask - -
- string -
-
- -
Static netmask required.
-
Required if type is set to static.
-
-
- tcpip_stack - -
- string -
-
-
    Choices: -
  • default ←
  • -
  • provisioning
  • -
  • vmotion
  • -
  • vxlan
  • -
-
-
The TCP/IP stack for the VMKernel interface.
-
-
- type - -
- string -
-
-
    Choices: -
  • static ←
  • -
  • dhcp
  • -
-
-
Type of IP assignment.
-
-
- 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.
-
-
- portgroup_name - -
- string - / required -
-
- -
The name of the port group for the VMKernel interface.
-

aliases: portgroup
-
-
- 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, the VMKernel adapter will be created with the given specifications.
-
If set to absent, the VMKernel adapter will be removed.
-
If set to present and VMKernel adapter exists, the configurations will be updated.
-
-
- 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.
-
-
- vswitch_name - -
- string -
-
- -
The name of the vSwitch where to add the VMKernel interface.
-
Required parameter only if state is set to present.
-
Optional parameter from version 2.5 and onwards.
-

aliases: vswitch
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

device

+ +

+ string +

+
+

Search VMkernel adapter by device name.

+

The parameter is required only in case of type is set to dhcp.

+
+
+
+

dvswitch_name

+ +

aliases: dvswitch

+

+ string +

+
+

The name of the vSphere Distributed Switch (vDS) where to add the VMKernel interface.

+

Required parameter only if state is set to present.

+

Optional parameter from version 2.8 and onwards.

+
+
+

enable_ft

+ +

+ boolean +

+
+

Enable Fault Tolerance traffic on the VMKernel adapter.

+

This option is only allowed if the default TCP/IP stack is used.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

enable_mgmt

+ +

+ boolean +

+
+

Enable Management traffic on the VMKernel adapter.

+

This option is only allowed if the default TCP/IP stack is used.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

enable_provisioning

+ +

+ boolean +

+
+

Enable Provisioning traffic on the VMKernel adapter.

+

This option is only allowed if the default TCP/IP stack is used.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

enable_replication

+ +

+ boolean +

+
+

Enable vSphere Replication traffic on the VMKernel adapter.

+

This option is only allowed if the default TCP/IP stack is used.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

enable_replication_nfc

+ +

+ boolean +

+
+

Enable vSphere Replication NFC traffic on the VMKernel adapter.

+

This option is only allowed if the default TCP/IP stack is used.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

enable_vmotion

+ +

+ boolean +

+
+

Enable vMotion traffic on the VMKernel adapter.

+

This option is only allowed if the default TCP/IP stack is used.

+

You cannot enable vMotion on an additional adapter if you already have an adapter with the vMotion TCP/IP stack configured.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

enable_vsan

+ +

+ boolean +

+
+

Enable VSAN traffic on the VMKernel adapter.

+

This option is only allowed if the default TCP/IP stack is used.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

esxi_hostname

+ +

+ string + / required +

+
+

Name of ESXi host to which VMKernel is to be managed.

+

From version 2.5 onwards, this parameter is required.

+
+
+

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 +

+
+

The MTU for the VMKernel interface.

+

The default value of 1500 is valid from version 2.5 and onwards.

+

Default: 1500

+
+
+

network

+ +

+ dictionary +

+
+

A dictionary of network details.

+

Default: {"tcpip_stack": "default", "type": "static"}

+
+
+

default_gateway

+ +

+ string +

+
+

Default gateway (Override default gateway for this adapter).

+
+
+

ip_address

+ +

+ string +

+
+

Static IP address.

+

Required if type is set to static.

+
+
+

subnet_mask

+ +

+ string +

+
+

Static netmask required.

+

Required if type is set to static.

+
+
+

tcpip_stack

+ +

+ string +

+
+

The TCP/IP stack for the VMKernel interface.

+

Choices:

+
    +
  • "default" ← (default)

  • +
  • "provisioning"

  • +
  • "vmotion"

  • +
  • "vxlan"

  • +
+ +
+
+

type

+ +

+ string +

+
+

Type of IP assignment.

+

Choices:

+
    +
  • "static" ← (default)

  • +
  • "dhcp"

  • +
+ +
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+
+

portgroup_name

+ +

aliases: portgroup

+

+ string + / required +

+
+

The name of the port group for the VMKernel interface.

+
+
+

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 +

+
+

If set to present, the VMKernel adapter will be created with the given specifications.

+

If set to absent, the VMKernel adapter will be removed.

+

If set to present and VMKernel adapter exists, the configurations will be updated.

+

Choices:

+
    +
  • "present" ← (default)

  • +
  • "absent"

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+
+

vswitch_name

+ +

aliases: vswitch

+

+ string +

+
+

The name of the vSwitch where to add the VMKernel interface.

+

Required parameter only if state is set to present.

+

Optional parameter from version 2.5 and onwards.

+
+ + Notes ----- -.. note:: - - The option ``device`` need to be used with DHCP because otherwise it's not possible to check if a VMkernel device is already present - - You can only change from DHCP to static, and vSS to vDS, or vice versa, in one step, without creating a new device, with ``device`` specified. - - You can only create the VMKernel adapter on a vDS if authenticated to vCenter and not if authenticated to ESXi. - - All modules requires API write access and hence is not supported on a free ESXi license. - +- The option \ :literal:`device`\ need to be used with DHCP because otherwise it's not possible to check if a VMkernel device is already present +- You can only change from DHCP to static, and vSS to vDS, or vice versa, in one step, without creating a new device, with \ :literal:`device`\ specified. +- You can only create the VMKernel adapter on a vDS if authenticated to vCenter and not if authenticated to ESXi. +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -556,6 +539,7 @@ Examples .. code-block:: yaml + - name: Add Management vmkernel port using static network type community.vmware.vmware_vmkernel: hostname: '{{ esxi_hostname }}' @@ -646,41 +630,41 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- result - -
- dictionary -
-
always -
metadata about VMKernel name
-
-
Sample:
-
{'changed': False, 'msg': 'VMkernel Adapter already configured properly', 'device': 'vmk1', 'ipv4': 'static', 'ipv4_gw': 'No override', 'ipv4_ip': '192.168.1.15', 'ipv4_sm': '255.255.255.0', 'mtu': 9000, 'services': 'vMotion', 'switch': 'vDS'}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

result

+ +

+ dictionary +

+
+

metadata about VMKernel name

+

Returned: always

+

Sample: {"changed": false, "device": "vmk1", "ipv4": "static", "ipv4_gw": "No override", "ipv4_ip": "192.168.1.15", "ipv4_sm": "255.255.255.0", "msg": "VMkernel Adapter already configured properly", "mtu": 9000, "services": "vMotion", "switch": "vDS"}

+
+ + Authors @@ -690,3 +674,13 @@ Authors - Russell Teague (@mtnbikenc) - Abhijeet Kasurde (@Akasurde) - Christian Kotte (@ckotte) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_vmotion_module.rst b/docs/community.vmware.vmware_vmotion_module.rst index a9806a413..90986e6a5 100644 --- a/docs/community.vmware.vmware_vmotion_module.rst +++ b/docs/community.vmware.vmware_vmotion_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_vmotion_module: -******************************* -community.vmware.vmware_vmotion -******************************* +community.vmware.vmware_vmotion module -- Move a virtual machine using vMotion, and/or its vmdks using storage vMotion. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Move a virtual machine using vMotion, and/or its vmdks using storage vMotion.** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_vmotion`. .. contents:: @@ -16,347 +17,331 @@ community.vmware.vmware_vmotion Synopsis -------- + - Using VMware vCenter, move a virtual machine using vMotion to a different host, and/or its vmdks to another datastore using storage vMotion. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- destination_cluster - -
- string -
-
added in 2.5.0
-
- -
Name of the destination cluster the virtual machine should be running on.
-
Only works if drs is enabled for this cluster.
-
-
- destination_datacenter - -
- string -
-
- -
Name of the destination datacenter the datastore is located on.
-
Optional, required only when datastores are shared across datacenters.
-
-
- destination_datastore - -
- string -
-
- -
Name of the destination datastore the virtual machine's vmdk should be moved on.
-

aliases: datastore
-
-
- destination_datastore_cluster - -
- string -
-
added in 2.5.0
-
- -
Name of the destination datastore cluster (storage pod) the virtual machine's vmdk should be moved on.
-
Only works if drs is enabled for the cluster the vm is running / should run.
-
-
- destination_host - -
- string -
-
- -
Name of the destination host the virtual machine should be running on.
-
Version 2.6 onwards, this parameter is not a required parameter, unlike the previous versions.
-

aliases: destination
-
-
- destination_resourcepool - -
- string -
-
- -
Name of the destination resource pool where the virtual machine should be running.
-
Resource pool is required if vmotion is done between hosts which are part of different clusters or datacenters.
-
if not passed, resource_pool object will be retrived from host_obj parent.
-

aliases: resource_pool
-
-
- 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 vm_name or vm_uuid 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.
-
-
- timeout - -
- integer -
-
added in 3.4.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
-
-
- 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.
-
-
- vm_name - -
- string -
-
- -
Name of the VM to perform a vMotion on.
-
This is required parameter, if vm_uuid is not set.
-
Version 2.6 onwards, this parameter is not a required parameter, unlike the previous versions.
-

aliases: vm
-
-
- vm_uuid - -
- string -
-
- -
UUID of the virtual machine to perform a vMotion operation on.
-
This is a required parameter, if vm_name or moid is not set.
-

aliases: uuid
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

destination_cluster

+ +

+ string +

+

added in community.vmware 2.5.0

+
+

Name of the destination cluster the virtual machine should be running on.

+

Only works if drs is enabled for this cluster.

+
+
+

destination_datacenter

+ +

+ string +

+
+

Name of the destination datacenter the datastore is located on.

+

Optional, required only when datastores are shared across datacenters.

+
+
+
+

destination_datastore

+ +

aliases: datastore

+

+ string +

+
+

Name of the destination datastore the virtual machine's vmdk should be moved on.

+
+
+

destination_datastore_cluster

+ +

+ string +

+

added in community.vmware 2.5.0

+
+

Name of the destination datastore cluster (storage pod) the virtual machine's vmdk should be moved on.

+

Only works if drs is enabled for the cluster the vm is running / should run.

+
+
+
+

destination_host

+ +

aliases: destination

+

+ string +

+
+

Name of the destination host the virtual machine should be running on.

+

Version 2.6 onwards, this parameter is not a required parameter, unlike the previous versions.

+
+
+
+

destination_resourcepool

+ +

aliases: resource_pool

+

+ string +

+
+

Name of the destination resource pool where the virtual machine should be running.

+

Resource pool is required if vmotion is done between hosts which are part of different clusters or datacenters.

+

if not passed, resource_pool object will be retrived from host_obj parent.

+
+
+

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 vm_name or vm_uuid is not supplied.

+
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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.

+
+
+

timeout

+ +

+ integer +

+

added in community.vmware 3.4.0

+
+

The timeout in seconds. When the timeout is reached, the module will fail.

+

Default: 3600

+
+
+

use_instance_uuid

+ +

+ boolean +

+
+

Whether to use the VMware instance UUID rather than the BIOS UUID.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+
+

vm_name

+ +

aliases: vm

+

+ string +

+
+

Name of the VM to perform a vMotion on.

+

This is required parameter, if vm_uuid is not set.

+

Version 2.6 onwards, this parameter is not a required parameter, unlike the previous versions.

+
+
+
+

vm_uuid

+ +

aliases: uuid

+

+ string +

+
+

UUID of the virtual machine to perform a vMotion operation on.

+

This is a required parameter, if vm_name or moid is not set.

+
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -364,6 +349,7 @@ Examples .. code-block:: yaml + - name: Perform vMotion of virtual machine community.vmware.vmware_vmotion: hostname: '{{ vcenter_hostname }}' @@ -423,60 +409,58 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- datastore - -
- string -
-
changed or success -
List the datastore the virtual machine is on.
-
Only returned if there is asked for a Storage vMotion (Datastore or Datastore Cluster).
-
-
Sample:
-
datastore1
-
-
- running_host - -
- string -
-
changed or success -
List the host the virtual machine is registered to.
-
Only returned if there is asked for a vMotion (Cluster or Host).
-
-
Sample:
-
host1.example.com
-
-

- - -Status ------- + + + + + + + + + + + + + + + + + +

Key

Description

+
+

datastore

+ +

+ string +

+
+

List the datastore the virtual machine is on.

+

Only returned if there is asked for a Storage vMotion (Datastore or Datastore Cluster).

+

Returned: changed or success

+

Sample: "datastore1"

+
+
+

running_host

+ +

+ string +

+
+

List the host the virtual machine is registered to.

+

Only returned if there is asked for a vMotion (Cluster or Host).

+

Returned: changed or success

+

Sample: "host1.example.com"

+
+ + Authors @@ -484,3 +468,13 @@ Authors - Bede Carroll (@bedecarroll) - Olivier Boukili (@oboukili) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_vsan_cluster_module.rst b/docs/community.vmware.vmware_vsan_cluster_module.rst index bc3263544..9711a745a 100644 --- a/docs/community.vmware.vmware_vsan_cluster_module.rst +++ b/docs/community.vmware.vmware_vsan_cluster_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_vsan_cluster_module: -************************************ -community.vmware.vmware_vsan_cluster -************************************ +community.vmware.vmware_vsan_cluster module -- Configure VSAN clustering on an ESXi host +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Configure VSAN clustering on an ESXi host** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_vsan_cluster`. .. contents:: @@ -16,174 +17,171 @@ community.vmware.vmware_vsan_cluster Synopsis -------- + - This module can be used to configure VSAN clustering on an ESXi host + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- cluster_uuid - -
- string -
-
- -
Desired cluster UUID
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

cluster_uuid

+ +

+ string +

+
+

Desired cluster UUID

+
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -191,6 +189,7 @@ Examples .. code-block:: yaml + - name: Configure VMware VSAN Cluster hosts: deploy_node tags: @@ -216,11 +215,20 @@ Examples -Status ------- + Authors ~~~~~~~ - Russell Teague (@mtnbikenc) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_vsan_hcl_db_module.rst b/docs/community.vmware.vmware_vsan_hcl_db_module.rst index 47328c6e7..5de5ab401 100644 --- a/docs/community.vmware.vmware_vsan_hcl_db_module.rst +++ b/docs/community.vmware.vmware_vsan_hcl_db_module.rst @@ -1,14 +1,17 @@ -.. _community.vmware.vmware_vsan_hcl_db_module: -*********************************** -community.vmware.vmware_vsan_hcl_db -*********************************** +community.vmware.vmware_vsan_hcl_db module -- Manages the vSAN Hardware Compatibility List (HCL) database ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Manages the vSAN Hardware Compatibility List (HCL) database** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. +You need further requirements to be able to use this module, +see `Requirements `_ for details. -Version added: 3.5.0 +To use it in a playbook, specify: :code:`community.vmware.vmware_vsan_hcl_db`. + +New in community.vmware 3.5.0 .. contents:: :local: @@ -17,11 +20,14 @@ Version added: 3.5.0 Synopsis -------- + - Manages vSAN HCL db on vSphere - DB file can be downloaded from https://partnerweb.vmware.com/service/vsan/all.json +.. _ansible_collections.community.vmware.vmware_vsan_hcl_db_module_requirements: + Requirements ------------ The below requirements are needed on the host that executes this module. @@ -29,170 +35,166 @@ The below requirements are needed on the host that executes this module. - vSAN Management SDK, which needs to be downloaded from VMware and installed manually. + + + + 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.
-
-
- source - -
- string - / required -
-
- -
The path to the HCL db file
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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.

+
+
+

source

+ +

+ string + / required +

+
+

The path to the HCL db file

+
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -200,6 +202,7 @@ Examples .. code-block:: yaml + - name: Fetch HCL db file ansible.builtin.get_url: url: https://partnerweb.vmware.com/service/vsan/all.json @@ -218,11 +221,20 @@ Examples -Status ------- + Authors ~~~~~~~ - Philipp Fruck (@p-fruck) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_vsan_health_info_module.rst b/docs/community.vmware.vmware_vsan_health_info_module.rst index fea57f715..6c04dd0ef 100644 --- a/docs/community.vmware.vmware_vsan_health_info_module.rst +++ b/docs/community.vmware.vmware_vsan_health_info_module.rst @@ -1,12 +1,15 @@ -.. _community.vmware.vmware_vsan_health_info_module: -**************************************** -community.vmware.vmware_vsan_health_info -**************************************** +community.vmware.vmware_vsan_health_info module -- Gather information about a VMware vSAN cluster's health +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Gather information about a VMware vSAN cluster's health** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. +You need further requirements to be able to use this module, +see `Requirements `_ for details. + +To use it in a playbook, specify: :code:`community.vmware.vmware_vsan_health_info`. .. contents:: @@ -16,10 +19,13 @@ community.vmware.vmware_vsan_health_info Synopsis -------- + - Gather information about a VMware vSAN cluster's health. +.. _ansible_collections.community.vmware.vmware_vsan_health_info_module_requirements: + Requirements ------------ The below requirements are needed on the host that executes this module. @@ -27,205 +33,200 @@ The below requirements are needed on the host that executes this module. - VMware vSAN Python's SDK + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- cluster_name - -
- string - / required -
-
- -
Name of the vSAN cluster.
-
-
- datacenter - -
- string -
-
- -
Name of the Datacenter.
-

aliases: datacenter_name
-
-
- fetch_from_cache - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
true to return the result from cache directly instead of running the full health check.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

cluster_name

+ +

+ string + / required +

+
+

Name of the vSAN cluster.

+
+
+
+

datacenter

+ +

aliases: datacenter_name

+

+ string +

+
+

Name of the Datacenter.

+
+
+

fetch_from_cache

+ +

+ boolean +

+
+

true to return the result from cache directly instead of running the full health check.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -233,6 +234,7 @@ Examples .. code-block:: yaml + - name: Gather health info from a vSAN's cluster community.vmware.vmware_vsan_health_info: hostname: "{{ vcenter_hostname }}" @@ -252,44 +254,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- vsan_health_info - -
- dictionary -
-
on success -
vSAN cluster health info
-
-
Sample:
-
{'_vimtype': 'vim.cluster.VsanClusterHealthSummary', 'burnInTest': None, 'clusterStatus': {'_vimtype': 'vim.cluster.VsanClusterHealthSystemStatusResult', 'goalState': 'installed', 'status': 'green', 'trackedHostsStatus': [{'_vimtype': 'vim.host.VsanHostHealthSystemStatusResult', 'hostname': 'esxi01.example.com', 'issues': [], 'status': 'green'}, {'_vimtype': 'vim.host.VsanHostHealthSystemStatusResult', 'hostname': 'esxi04.example.com', 'issues': [], 'status': 'green'}, {'_vimtype': 'vim.host.VsanHostHealthSystemStatusResult', 'hostname': 'esxi02.example.com', 'issues': [], 'status': 'green'}, {'_vimtype': 'vim.host.VsanHostHealthSystemStatusResult', 'hostname': 'esxi03.example.com', 'issues': [], 'status': 'green'}], 'untrackedHosts': []}}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

vsan_health_info

+ +

+ dictionary +

+
+

vSAN cluster health info

+

Returned: on success

+

Sample: {"_vimtype": "vim.cluster.VsanClusterHealthSummary", "burnInTest": null, "clusterStatus": {"_vimtype": "vim.cluster.VsanClusterHealthSystemStatusResult", "goalState": "installed", "status": "green", "trackedHostsStatus": [{"_vimtype": "vim.host.VsanHostHealthSystemStatusResult", "hostname": "esxi01.example.com", "issues": [], "status": "green"}, {"_vimtype": "vim.host.VsanHostHealthSystemStatusResult", "hostname": "esxi04.example.com", "issues": [], "status": "green"}, {"_vimtype": "vim.host.VsanHostHealthSystemStatusResult", "hostname": "esxi02.example.com", "issues": [], "status": "green"}, {"_vimtype": "vim.host.VsanHostHealthSystemStatusResult", "hostname": "esxi03.example.com", "issues": [], "status": "green"}], "untrackedHosts": []}}

+
+ + Authors ~~~~~~~ - Erwan Quelin (@equelin) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_vsan_release_catalog_module.rst b/docs/community.vmware.vmware_vsan_release_catalog_module.rst index f4ed2792b..85fd118db 100644 --- a/docs/community.vmware.vmware_vsan_release_catalog_module.rst +++ b/docs/community.vmware.vmware_vsan_release_catalog_module.rst @@ -1,14 +1,17 @@ -.. _community.vmware.vmware_vsan_release_catalog_module: -******************************************** -community.vmware.vmware_vsan_release_catalog -******************************************** +community.vmware.vmware_vsan_release_catalog module -- Uploads the vSAN Release Catalog ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Uploads the vSAN Release Catalog** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. +You need further requirements to be able to use this module, +see `Requirements `_ for details. -Version added: 3.7.0 +To use it in a playbook, specify: :code:`community.vmware.vmware_vsan_release_catalog`. + +New in community.vmware 3.7.0 .. contents:: :local: @@ -17,11 +20,14 @@ Version added: 3.7.0 Synopsis -------- + - Manually upload the vSAN Release Catalog the the vCenter - See https://kb.vmware.com/s/article/58891 for more details +.. _ansible_collections.community.vmware.vmware_vsan_release_catalog_module_requirements: + Requirements ------------ The below requirements are needed on the host that executes this module. @@ -29,170 +35,166 @@ The below requirements are needed on the host that executes this module. - vSAN Management SDK, which needs to be downloaded from VMware and installed manually. + + + + 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.
-
-
- source - -
- string - / required -
-
- -
The path to the release catalog file
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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.

+
+
+

source

+ +

+ string + / required +

+
+

The path to the release catalog file

+
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -200,6 +202,7 @@ Examples .. code-block:: yaml + - name: Upload release catalog file to vCenter community.vmware.vmware_vsan_release_catalog: hostname: "{{ vcenter_hostname }}" @@ -211,11 +214,20 @@ Examples -Status ------- + Authors ~~~~~~~ - Philipp Fruck (@p-fruck) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_vspan_session_module.rst b/docs/community.vmware.vmware_vspan_session_module.rst index 9adf4dc79..e93604938 100644 --- a/docs/community.vmware.vmware_vspan_session_module.rst +++ b/docs/community.vmware.vmware_vspan_session_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_vspan_session_module: -************************************* -community.vmware.vmware_vspan_session -************************************* +community.vmware.vmware_vspan_session module -- Create or remove a Port Mirroring session. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Create or remove a Port Mirroring session.** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_vspan_session`. .. contents:: @@ -16,552 +17,516 @@ community.vmware.vmware_vspan_session Synopsis -------- + - This module can be used to create, delete or edit different kind of port mirroring sessions. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- description - -
- string -
-
- -
The description for the session.
-
-
- destination_port - -
- string -
-
- -
Destination port that received the mirrored packets.
-
Also any port designated in the value of this property can not match the source port in any of the Distributed Port Mirroring session.
-
-
- destination_vm - -
- dictionary -
-
- -
With this parameter it is possible, to add a NIC of a VM to a port mirroring session.
-
-
- name - -
- string -
-
- -
Name of the VM.
-
-
- nic_label - -
- string -
-
- -
Label of the network interface card to use.
-
-
- enabled - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Whether the session is enabled.
-
-
- encapsulation_vlan_id - -
- integer -
-
- -
VLAN ID used to encapsulate the mirrored traffic.
-
-
- 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.
-
-
- mirrored_packet_length - -
- integer -
-
- -
An integer that describes how much of each frame to mirror.
-
If unset, all of the frame would be mirrored.
-
Setting this property to a smaller value is useful when the consumer will look only at the headers.
-
The value cannot be less than 60.
-
-
- name - -
- string - / required -
-
- -
Name of the session.
-
-
- normal_traffic_allowed - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Whether or not destination ports can send and receive "normal" traffic.
-
Setting this to false will make mirror ports be used solely for mirroring and not double as normal access ports.
-
-
- 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.
-
-
- sampling_rate - -
- integer -
-
- -
Sampling rate of the session.
-
If its value is n, one of every n packets is mirrored.
-
Valid values are between 1 to 65535.
-
-
- session_type - -
- string -
-
-
    Choices: -
  • encapsulatedRemoteMirrorSource
  • -
  • remoteMirrorDest
  • -
  • remoteMirrorSource
  • -
  • dvPortMirror ←
  • -
-
-
Select the mirroring type.
-
In encapsulatedRemoteMirrorSource session, Distributed Ports can be used as source entities, and IP address can be used as destination entities.
-
In remoteMirrorDest session, VLAN IDs can be used as source entities, and Distributed Ports can be used as destination entities.
-
In remoteMirrorSource session, Distributed Ports can be used as source entities, and uplink ports name can be used as destination entities.
-
In dvPortMirror session, Distributed Ports can be used as both source and destination entities.
-
-
- source_port_received - -
- string -
-
- -
Source port for which received packets are mirrored.
-
-
- source_port_transmitted - -
- string -
-
- -
Source port for which transmitted packets are mirrored.
-
-
- source_vm_received - -
- dictionary -
-
- -
With this parameter it is possible, to add a NIC of a VM to a port mirroring session.
-
-
- name - -
- string -
-
- -
Name of the VM.
-
-
- nic_label - -
- string -
-
- -
Label of the network interface card to use.
-
-
- source_vm_transmitted - -
- dictionary -
-
- -
With this parameter it is possible, to add a NIC of a VM to a port mirroring session.
-
-
- name - -
- string -
-
- -
Name of the VM.
-
-
- nic_label - -
- string -
-
- -
Label of the network interface card to use.
-
-
- state - -
- string - / required -
-
-
    Choices: -
  • present
  • -
  • absent
  • -
-
-
Create or remove the session.
-
-
- strip_original_vlan - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Whether to strip the original VLAN tag.
-
If false, the original VLAN tag will be preserved on the mirrored traffic.
-
If encapsulationVlanId has been set and this property is false, the frames will be double tagged with the original VLAN ID as the inner tag.
-
-
- switch - -
- string - / required -
-
- -
The name of the distributed vSwitch on which to add or remove the mirroring session.
-

aliases: switch_name
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

description

+ +

+ string +

+
+

The description for the session.

+
+
+

destination_port

+ +

+ string +

+
+

Destination port that received the mirrored packets.

+

Also any port designated in the value of this property can not match the source port in any of the Distributed Port Mirroring session.

+
+
+

destination_vm

+ +

+ dictionary +

+
+

With this parameter it is possible, to add a NIC of a VM to a port mirroring session.

+
+
+

name

+ +

+ string +

+
+

Name of the VM.

+
+
+

nic_label

+ +

+ string +

+
+

Label of the network interface card to use.

+
+
+

enabled

+ +

+ boolean +

+
+

Whether the session is enabled.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+
+

encapsulation_vlan_id

+ +

+ integer +

+
+

VLAN ID used to encapsulate the mirrored traffic.

+
+
+

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.

+
+
+

mirrored_packet_length

+ +

+ integer +

+
+

An integer that describes how much of each frame to mirror.

+

If unset, all of the frame would be mirrored.

+

Setting this property to a smaller value is useful when the consumer will look only at the headers.

+

The value cannot be less than 60.

+
+
+

name

+ +

+ string + / required +

+
+

Name of the session.

+
+
+

normal_traffic_allowed

+ +

+ boolean +

+
+

Whether or not destination ports can send and receive "normal" traffic.

+

Setting this to false will make mirror ports be used solely for mirroring and not double as normal access ports.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+ +
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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.

+
+
+

sampling_rate

+ +

+ integer +

+
+

Sampling rate of the session.

+

If its value is n, one of every n packets is mirrored.

+

Valid values are between 1 to 65535.

+
+
+

session_type

+ +

+ string +

+
+

Select the mirroring type.

+

In encapsulatedRemoteMirrorSource session, Distributed Ports can be used as source entities, and IP address can be used as destination entities.

+

In remoteMirrorDest session, VLAN IDs can be used as source entities, and Distributed Ports can be used as destination entities.

+

In remoteMirrorSource session, Distributed Ports can be used as source entities, and uplink ports name can be used as destination entities.

+

In dvPortMirror session, Distributed Ports can be used as both source and destination entities.

+

Choices:

+
    +
  • "encapsulatedRemoteMirrorSource"

  • +
  • "remoteMirrorDest"

  • +
  • "remoteMirrorSource"

  • +
  • "dvPortMirror" ← (default)

  • +
+ +
+
+

source_port_received

+ +

+ string +

+
+

Source port for which received packets are mirrored.

+
+
+

source_port_transmitted

+ +

+ string +

+
+

Source port for which transmitted packets are mirrored.

+
+
+

source_vm_received

+ +

+ dictionary +

+
+

With this parameter it is possible, to add a NIC of a VM to a port mirroring session.

+
+
+

name

+ +

+ string +

+
+

Name of the VM.

+
+
+

nic_label

+ +

+ string +

+
+

Label of the network interface card to use.

+
+
+

source_vm_transmitted

+ +

+ dictionary +

+
+

With this parameter it is possible, to add a NIC of a VM to a port mirroring session.

+
+
+

name

+ +

+ string +

+
+

Name of the VM.

+
+
+

nic_label

+ +

+ string +

+
+

Label of the network interface card to use.

+
+
+

state

+ +

+ string + / required +

+
+

Create or remove the session.

+

Choices:

+
    +
  • "present"

  • +
  • "absent"

  • +
+ +
+
+

strip_original_vlan

+ +

+ boolean +

+
+

Whether to strip the original VLAN tag.

+

If false, the original VLAN tag will be preserved on the mirrored traffic.

+

If encapsulationVlanId has been set and this property is false, the frames will be double tagged with the original VLAN ID as the inner tag.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+ +
+
+
+

switch

+ +

aliases: switch_name

+

+ string + / required +

+
+

The name of the distributed vSwitch on which to add or remove the mirroring session.

+
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -569,6 +534,7 @@ Examples .. code-block:: yaml + - name: Create distributed mirroring session. community.vmware.vmware_vspan_session: hostname: '{{ vcenter_hostname }}' @@ -612,11 +578,20 @@ Examples -Status ------- + Authors ~~~~~~~ - Peter Gyorgy (@gyorgypeter) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_vswitch_info_module.rst b/docs/community.vmware.vmware_vswitch_info_module.rst index 9864dd4fb..8f5ca275f 100644 --- a/docs/community.vmware.vmware_vswitch_info_module.rst +++ b/docs/community.vmware.vmware_vswitch_info_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_vswitch_info_module: -************************************ -community.vmware.vmware_vswitch_info -************************************ +community.vmware.vmware_vswitch_info module -- Gathers info about an ESXi host's vswitch configurations ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Gathers info about an ESXi host's vswitch configurations** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_vswitch_info`. .. contents:: @@ -16,10 +17,15 @@ community.vmware.vmware_vswitch_info Synopsis -------- + - This module can be used to gather information about an ESXi host's vswitch configurations when ESXi hostname or Cluster name is given. - The vSphere Client shows the value for the number of ports as elastic from vSphere 5.5 and above. - Other tools like esxcli might show the number of ports as 1536 or 5632. -- See https://kb.vmware.com/s/article/2064511 for more details. +- See \ https://kb.vmware.com/s/article/2064511\ for more details. + + + + @@ -29,203 +35,193 @@ Parameters .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- cluster_name - -
- string -
-
- -
Name of the cluster.
-
Info about vswitch belonging to every ESXi host systems under this cluster will be returned.
-
If esxi_hostname is not given, this parameter is required.
-
-
- esxi_hostname - -
- string -
-
- -
ESXi hostname to gather information from.
-
If cluster_name is not given, this parameter is required.
-
-
- 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
-
-
- policies - -
- boolean -
-
added in 2.4.0
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Gather information about Security, Traffic Shaping, as well as Teaming and failover.
-
The property ts stands for Traffic Shaping and lb for Load Balancing.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

cluster_name

+ +

+ string +

+
+

Name of the cluster.

+

Info about vswitch belonging to every ESXi host systems under this cluster will be returned.

+

If esxi_hostname is not given, this parameter is required.

+
+
+

esxi_hostname

+ +

+ string +

+
+

ESXi hostname to gather information from.

+

If cluster_name is not given, this parameter is required.

+
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

policies

+ +

+ boolean +

+

added in community.vmware 2.4.0

+
+

Gather information about Security, Traffic Shaping, as well as Teaming and failover.

+

The property ts stands for Traffic Shaping and lb for Load Balancing.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+ +
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -233,6 +229,7 @@ Examples .. code-block:: yaml + - name: Gather vswitch info about all ESXi Host in given Cluster community.vmware.vmware_vswitch_info: hostname: '{{ vcenter_hostname }}' @@ -253,44 +250,54 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- hosts_vswitch_info - -
- dictionary -
-
on success -
metadata about host's vswitch configuration
-
-
Sample:
-
{'10.76.33.218': {'vSwitch0': {'mtu': 1500, 'num_ports': 128, 'pnics': ['vmnic0'], 'failback': True, 'failover_active': ['vmnic0'], 'failover_standby': [], 'failure_detection': 'link_status_only', 'lb': 'loadbalance_srcid', 'notify': True, 'security': [False, False, False], 'ts': False}, 'vSwitch_0011': {'mtu': 1500, 'num_ports': 128, 'pnics': ['vmnic2', 'vmnic1'], 'failback': True, 'failover_active': ['vmnic1'], 'failover_standby': ['vmnic2'], 'failure_detection': 'link_status_only', 'lb': 'loadbalance_srcid', 'notify': True, 'security': [False, False, False], 'ts': False}}}
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

hosts_vswitch_info

+ +

+ dictionary +

+
+

metadata about host's vswitch configuration

+

Returned: on success

+

Sample: {"10.76.33.218": {"vSwitch0": {"failback": true, "failover_active": ["vmnic0"], "failover_standby": [], "failure_detection": "link_status_only", "lb": "loadbalance_srcid", "mtu": 1500, "notify": true, "num_ports": 128, "pnics": ["vmnic0"], "security": [false, false, false], "ts": false}, "vSwitch_0011": {"failback": true, "failover_active": ["vmnic1"], "failover_standby": ["vmnic2"], "failure_detection": "link_status_only", "lb": "loadbalance_srcid", "mtu": 1500, "notify": true, "num_ports": 128, "pnics": ["vmnic2", "vmnic1"], "security": [false, false, false], "ts": false}}}

+
+ + Authors ~~~~~~~ - Abhijeet Kasurde (@Akasurde) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vmware_vswitch_module.rst b/docs/community.vmware.vmware_vswitch_module.rst index 4f6b98af4..ee497bde9 100644 --- a/docs/community.vmware.vmware_vswitch_module.rst +++ b/docs/community.vmware.vmware_vswitch_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vmware_vswitch_module: -******************************* -community.vmware.vmware_vswitch -******************************* +community.vmware.vmware_vswitch module -- Manage a VMware Standard Switch to an ESXi host. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Manage a VMware Standard Switch to an ESXi host.** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vmware_vswitch`. .. contents:: @@ -16,564 +17,557 @@ community.vmware.vmware_vswitch Synopsis -------- + - This module can be used to add, remove and update a VMware Standard Switch to an ESXi host. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- esxi_hostname - -
- string -
-
- -
Manage the vSwitch using this ESXi host system.
-

aliases: host
-
-
- 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
-
-
MTU to configure on vSwitch.
-
-
- nics - -
- list - / elements=string -
-
- Default:
[]
-
-
A list of vmnic names or vmnic name to attach to vSwitch.
-
Alias nics is added in version 2.4.
-

aliases: nic_name
-
-
- number_of_ports - -
- integer -
-
- Default:
128
-
-
Number of port to configure on vSwitch.
-
-
- 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.
-
-
- security - -
- dictionary -
-
added in 2.4.0
-
- -
Network policy specifies layer 2 security settings for a portgroup such as promiscuous mode, where guest adapter listens to all the packets, MAC address changes and forged transmits.
-
Dict which configures the different security values for portgroup.
-

aliases: security_policy, network_policy
-
-
- 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_mode - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Indicates whether promiscuous mode is allowed.
-
-
- state - -
- string -
-
-
    Choices: -
  • absent
  • -
  • present ←
  • -
-
-
Add or remove the switch.
-
-
- switch - -
- string - / required -
-
- -
vSwitch name to add.
-
Alias switch is added in version 2.4.
-

aliases: switch_name
-
-
- teaming - -
- dictionary -
-
added in 2.4.0
-
- -
Dictionary which configures the different teaming values for portgroup.
-

aliases: teaming_policy
-
-
- active_adapters - -
- list - / elements=string -
-
- -
List of active adapters used for load balancing.
-
All vmnics are used as active adapters if active_adapters and standby_adapters are not defined.
-
-
- failback - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Indicate whether or not to use a failback when restoring links.
-
-
- load_balancing - -
- string -
-
-
    Choices: -
  • loadbalance_ip
  • -
  • loadbalance_srcmac
  • -
  • loadbalance_srcid
  • -
  • failover_explicit
  • -
-
-
Network adapter teaming policy.
-

aliases: load_balance_policy
-
-
- network_failure_detection - -
- string -
-
-
    Choices: -
  • link_status_only
  • -
  • beacon_probing
  • -
-
-
Network failure detection.
-
-
- notify_switches - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Indicate whether or not to notify the physical switch if a link fails.
-
-
- standby_adapters - -
- list - / elements=string -
-
- -
List of standby adapters used for failover.
-
All vmnics are used as active adapters if active_adapters and standby_adapters are not defined.
-
-
- traffic_shaping - -
- dictionary -
-
added in 2.4.0
-
- -
Dictionary which configures traffic shaping for the switch.
-
-
- average_bandwidth - -
- integer -
-
- -
Average bandwidth (kbit/s).
-
-
- burst_size - -
- integer -
-
- -
Burst size (KB).
-
-
- enabled - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Status of Traffic Shaping Policy.
-
-
- peak_bandwidth - -
- integer -
-
- -
Peak bandwidth (kbit/s).
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+
+

esxi_hostname

+ +

aliases: host

+

+ string +

+
+

Manage the vSwitch using this ESXi host system.

+
+
+

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 +

+
+

MTU to configure on vSwitch.

+

Default: 1500

+
+
+
+

nics

+ +

aliases: nic_name

+

+ list + / elements=string +

+
+

A list of vmnic names or vmnic name to attach to vSwitch.

+

Alias nics is added in version 2.4.

+

Default: []

+
+
+

number_of_ports

+ +

+ integer +

+
+

Number of port to configure on vSwitch.

+

Default: 128

+
+
+
+
+

password

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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.

+
+
+
+
+

security

+ +

aliases: security_policy, network_policy

+

+ dictionary +

+

added in community.vmware 2.4.0

+
+

Network policy specifies layer 2 security settings for a portgroup such as promiscuous mode, where guest adapter listens to all the packets, MAC address changes and forged transmits.

+

Dict which configures the different security values for portgroup.

+
+
+
+
+

forged_transmits

+ +

+ boolean +

+
+

Indicates whether forged transmits are allowed.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+ +
+
+
+
+

mac_changes

+ +

+ boolean +

+
+

Indicates whether mac changes are allowed.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+ +
+
+
+
+

promiscuous_mode

+ +

+ boolean +

+
+

Indicates whether promiscuous mode is allowed.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+ +
+
+

state

+ +

+ string +

+
+

Add or remove the switch.

+

Choices:

+
    +
  • "absent"

  • +
  • "present" ← (default)

  • +
+ +
+
+
+

switch

+ +

aliases: switch_name

+

+ string + / required +

+
+

vSwitch name to add.

+

Alias switch is added in version 2.4.

+
+
+
+

teaming

+ +

aliases: teaming_policy

+

+ dictionary +

+

added in community.vmware 2.4.0

+
+

Dictionary which configures the different teaming values for portgroup.

+
+
+
+

active_adapters

+ +

+ list + / elements=string +

+
+

List of active adapters used for load balancing.

+

All vmnics are used as active adapters if active_adapters and standby_adapters are not defined.

+
+
+
+

failback

+ +

+ boolean +

+
+

Indicate whether or not to use a failback when restoring links.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+ +
+
+
+
+
+

load_balancing

+ +

aliases: load_balance_policy

+

+ string +

+
+

Network adapter teaming policy.

+

Choices:

+
    +
  • "loadbalance_ip"

  • +
  • "loadbalance_srcmac"

  • +
  • "loadbalance_srcid"

  • +
  • "failover_explicit"

  • +
+ +
+
+
+

network_failure_detection

+ +

+ string +

+
+

Network failure detection.

+

Choices:

+
    +
  • "link_status_only"

  • +
  • "beacon_probing"

  • +
+ +
+
+
+

notify_switches

+ +

+ boolean +

+
+

Indicate whether or not to notify the physical switch if a link fails.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+ +
+
+
+

standby_adapters

+ +

+ list + / elements=string +

+
+

List of standby adapters used for failover.

+

All vmnics are used as active adapters if active_adapters and standby_adapters are not defined.

+
+
+

traffic_shaping

+ +

+ dictionary +

+

added in community.vmware 2.4.0

+
+

Dictionary which configures traffic shaping for the switch.

+
+
+

average_bandwidth

+ +

+ integer +

+
+

Average bandwidth (kbit/s).

+
+
+

burst_size

+ +

+ integer +

+
+

Burst size (KB).

+
+
+

enabled

+ +

+ boolean +

+
+

Status of Traffic Shaping Policy.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+ +
+
+

peak_bandwidth

+ +

+ integer +

+
+

Peak bandwidth (kbit/s).

+
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -581,6 +575,7 @@ Examples .. code-block:: yaml + - name: Add a VMware vSwitch community.vmware.vmware_vswitch: hostname: '{{ esxi_hostname }}' @@ -682,41 +677,41 @@ Examples + + Return Values ------------- -Common return values are documented `here `_, the following are the fields unique to this module: +The following are the fields unique to this module: .. raw:: html - - - - - - - - - - - -
KeyReturnedDescription
-
- result - -
- string -
-
always -
information about performed operation
-
-
Sample:
-
vSwitch 'vSwitch_1002' is created successfully
-
-

- - -Status ------- + + + + + + + + + + + + + +

Key

Description

+
+

result

+ +

+ string +

+
+

information about performed operation

+

Returned: always

+

Sample: "vSwitch 'vSwitch_1002' is created successfully"

+
+ + Authors @@ -724,4 +719,14 @@ Authors - Joseph Callen (@jcpowermac) - Russell Teague (@mtnbikenc) -- Abhijeet Kasurde (@Akasurde) +- Abhijeet Kasurde (@Akasurde) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vsan_health_silent_checks_module.rst b/docs/community.vmware.vsan_health_silent_checks_module.rst index 4f4d49c07..de7317cbc 100644 --- a/docs/community.vmware.vsan_health_silent_checks_module.rst +++ b/docs/community.vmware.vsan_health_silent_checks_module.rst @@ -1,14 +1,17 @@ -.. _community.vmware.vsan_health_silent_checks_module: -****************************************** -community.vmware.vsan_health_silent_checks -****************************************** +community.vmware.vsan_health_silent_checks module -- Silence vSAN health checks ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Silence vSAN health checks** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. +You need further requirements to be able to use this module, +see `Requirements `_ for details. -Version added: 3.6.0 +To use it in a playbook, specify: :code:`community.vmware.vsan_health_silent_checks`. + +New in community.vmware 3.6.0 .. contents:: :local: @@ -17,11 +20,14 @@ Version added: 3.6.0 Synopsis -------- + - Take a list of vSAN health checks and silence them - Re-enable alerts for previously silenced health checks +.. _ansible_collections.community.vmware.vsan_health_silent_checks_module_requirements: + Requirements ------------ The below requirements are needed on the host that executes this module. @@ -29,207 +35,201 @@ The below requirements are needed on the host that executes this module. - vSAN Management SDK, which needs to be downloaded from VMware and installed manually. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- checks - -
- list - / elements=string -
-
- -
The checks to silence.
-
-
- cluster_name - -
- string - / required -
-
- -
Name of the vSAN cluster.
-
-
- 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
  • -
-
-
The state of the health checks.
-
If set to present, all given health checks will be silenced.
-
If set to absent, all given health checks will be removed from the list of silent checks.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

checks

+ +

+ list + / elements=string +

+
+

The checks to silence.

+
+
+

cluster_name

+ +

+ string + / required +

+
+

Name of the vSAN cluster.

+
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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 +

+
+

The state of the health checks.

+

If set to present, all given health checks will be silenced.

+

If set to absent, all given health checks will be removed from the list of silent checks.

+

Choices:

+
    +
  • "present" ← (default)

  • +
  • "absent"

  • +
+ +
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - All modules requires API write access and hence is not supported on a free ESXi license. - +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -237,6 +237,7 @@ Examples .. code-block:: yaml + - name: Disable the vSAN Support Insight health check community.vmware.vsan_health_silent_checks: hostname: "{{ vcenter_hostname }}" @@ -261,11 +262,20 @@ Examples -Status ------- + Authors ~~~~~~~ - Philipp Fruck (@p-fruck) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vsphere_copy_module.rst b/docs/community.vmware.vsphere_copy_module.rst index 8df8c2e2b..91b6fb0fe 100644 --- a/docs/community.vmware.vsphere_copy_module.rst +++ b/docs/community.vmware.vsphere_copy_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vsphere_copy_module: -***************************** -community.vmware.vsphere_copy -***************************** +community.vmware.vsphere_copy module -- Copy a file to a VMware datastore ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Copy a file to a VMware datastore** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vsphere_copy`. .. contents:: @@ -16,241 +17,232 @@ community.vmware.vsphere_copy Synopsis -------- + - Upload files to a VMware datastore through a vCenter REST API. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- datacenter - -
- string -
-
- -
The datacenter on the vCenter server that holds the datastore.
-
-
- datastore - -
- string - / required -
-
- -
The datastore to push files to.
-
-
- 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
-
-
- path - -
- string - / required -
-
- -
The file to push to the datastore.
-

aliases: dest
-
-
- 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.
-
-
- src - -
- string - / required -
-
- -
The file to push to vCenter.
-

aliases: name
-
-
- timeout - -
- integer -
-
- Default:
10
-
-
The timeout in seconds for the upload to the datastore.
-
-
- 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.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

datacenter

+ +

+ string +

+
+

The datacenter on the vCenter server that holds the datastore.

+
+
+

datastore

+ +

+ string + / required +

+
+

The datastore to push files to.

+
+
+

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

+ +

aliases: pass, pwd

+

+ 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.

+
+
+
+

path

+ +

aliases: dest

+

+ string + / required +

+
+

The file to push to the datastore.

+
+
+

port

+ +

+ integer +

+
+

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.

+

Default: 443

+
+
+

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.

+
+
+
+

src

+ +

aliases: name

+

+ string + / required +

+
+

The file to push to vCenter.

+
+
+

timeout

+ +

+ integer +

+
+

The timeout in seconds for the upload to the datastore.

+

Default: 10

+
+
+
+
+

username

+ +

aliases: admin, user

+

+ 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.

+
+
+

validate_certs

+ +

+ boolean +

+
+

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.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - This module ought to be run from a system that can access the vCenter or the ESXi directly and has the file to transfer. It can be the normal remote target or you can change it either by using ``transport: local`` or using ``delegate_to``. - - All modules requires API write access and hence is not supported on a free ESXi license. - +- This module ought to be run from a system that can access the vCenter or the ESXi directly and has the file to transfer. It can be the normal remote target or you can change it either by using \ :literal:`transport: local`\ or using \ :literal:`delegate\_to`\ . +- All modules requires API write access and hence is not supported on a free ESXi license. Examples @@ -258,6 +250,7 @@ Examples .. code-block:: yaml + - name: Copy file to datastore using delegate_to community.vmware.vsphere_copy: hostname: '{{ vcenter_hostname }}' @@ -294,11 +287,20 @@ Examples -Status ------- + Authors ~~~~~~~ - Dag Wieers (@dagwieers) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ + diff --git a/docs/community.vmware.vsphere_file_module.rst b/docs/community.vmware.vsphere_file_module.rst index b27448c9e..4126c961e 100644 --- a/docs/community.vmware.vsphere_file_module.rst +++ b/docs/community.vmware.vsphere_file_module.rst @@ -1,12 +1,13 @@ -.. _community.vmware.vsphere_file_module: -***************************** -community.vmware.vsphere_file -***************************** +community.vmware.vsphere_file module -- Manage files on a vCenter datastore ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -**Manage files on a vCenter datastore** +This module is part of the `community.vmware collection `_. +To install it, use: :code:`ansible-galaxy collection install community.vmware`. + +To use it in a playbook, specify: :code:`community.vmware.vsphere_file`. .. contents:: @@ -16,190 +17,185 @@ community.vmware.vsphere_file Synopsis -------- + - Manage files on a vCenter datastore. + + + + Parameters ---------- .. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- datacenter - -
- string - / required -
-
- -
The datacenter on the vCenter server that holds the datastore.
-
-
- datastore - -
- string - / required -
-
- -
The datastore on the vCenter server to push files to.
-
-
- host - -
- string - / required -
-
- -
The vCenter server on which the datastore is available.
-

aliases: hostname
-
-
- password - -
- string - / required -
-
- -
The password to authenticate on the vCenter server.
-
-
- path - -
- string - / required -
-
- -
The file or directory on the datastore on the vCenter server.
-

aliases: dest
-
-
- state - -
- string -
-
-
    Choices: -
  • absent
  • -
  • directory
  • -
  • file ←
  • -
  • touch
  • -
-
-
The state of or the action on the provided path.
-
If absent, the file will be removed.
-
If directory, the directory will be created.
-
If file, more information of the (existing) file will be returned.
-
If touch, an empty file will be created if the path does not exist.
-
-
- timeout - -
- integer -
-
- Default:
10
-
-
The timeout in seconds for the upload to the datastore.
-
-
- username - -
- string - / required -
-
- -
The user name to authenticate on the vCenter server.
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
If false, SSL certificates will not be validated. This should only be set to false when no other option exists.
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

datacenter

+ +

+ string + / required +

+
+

The datacenter on the vCenter server that holds the datastore.

+
+
+

datastore

+ +

+ string + / required +

+
+

The datastore on the vCenter server to push files to.

+
+
+
+

host

+ +

aliases: hostname

+

+ string + / required +

+
+

The vCenter server on which the datastore is available.

+
+
+

password

+ +

+ string + / required +

+
+

The password to authenticate on the vCenter server.

+
+
+
+

path

+ +

aliases: dest

+

+ string + / required +

+
+

The file or directory on the datastore on the vCenter server.

+
+
+

state

+ +

+ string +

+
+

The state of or the action on the provided path.

+

If absent, the file will be removed.

+

If directory, the directory will be created.

+

If file, more information of the (existing) file will be returned.

+

If touch, an empty file will be created if the path does not exist.

+

Choices:

+
    +
  • "absent"

  • +
  • "directory"

  • +
  • "file" ← (default)

  • +
  • "touch"

  • +
+ +
+
+

timeout

+ +

+ integer +

+
+

The timeout in seconds for the upload to the datastore.

+

Default: 10

+
+
+

username

+ +

+ string + / required +

+
+

The user name to authenticate on the vCenter server.

+
+
+

validate_certs

+ +

+ boolean +

+
+

If false, SSL certificates will not be validated. This should only be set to false when no other option exists.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+ +
+ + Notes ----- -.. note:: - - The vSphere folder API does not allow to remove directory objects. - +- The vSphere folder API does not allow to remove directory objects. Examples @@ -207,6 +203,7 @@ Examples .. code-block:: yaml + - name: Create an empty file on a datastore community.vmware.vsphere_file: host: '{{ vhost }}' @@ -255,11 +252,20 @@ Examples -Status ------- + Authors ~~~~~~~ - Dag Wieers (@dagwieers) + + + +Collection links +~~~~~~~~~~~~~~~~ + +* `Issue Tracker `__ +* `Homepage `__ +* `Repository (Sources) `__ +