community.vmware.vmware_vcenter_settings module – Configures general settings on a vCenter server
Note
This module is part of the community.vmware collection (version 3.11.1).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install community.vmware
.
To use it in a playbook, specify: 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
.
Parameters
Parameter |
Comments |
---|---|
A dictionary of advanced settings. Default: |
|
The database settings for vCenter server. Default: |
|
Event cleanup. Choices:
|
|
Event retention in days. Default: |
|
Maximum connections. Default: |
|
Task cleanup. Choices:
|
|
Task retention in days. Default: |
|
The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable Environment variable support added in Ansible 2.6. |
|
The level of detail that vCenter server usesfor log files. Choices:
|
|
The settings vCenter server uses to send email alerts. Default: |
|
Mail sender address. |
|
Mail server. |
|
The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable Environment variable support added in Ansible 2.6. |
|
The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable Environment variable support added in Ansible 2.6. Default: |
|
Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
|
Port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable |
|
The unique runtime settings for vCenter server. |
|
vCenter server managed address. |
|
vCenter server unique ID. |
|
vCenter server name. Default is FQDN. |
|
SNMP trap destinations for vCenter server alerts. Default: |
|
Community string. Default: |
|
Enable receiver. Choices:
|
|
Receiver port. Default: |
|
Primary Receiver ULR. Default: |
|
Community string. Default: |
|
Enable receiver. Choices:
|
|
Receiver port. Default: |
|
Receiver 2 ULR. Default: |
|
Community string. Default: |
|
Enable receiver. Choices:
|
|
Receiver port. Default: |
|
Receiver 3 ULR. Default: |
|
Community string. Default: |
|
Enable receiver. Choices:
|
|
Receiver port. Default: |
|
Receiver 4 ULR. Default: |
|
The vCenter server connection timeout for normal and long operations. Default: |
|
Long operation timeout. Default: |
|
Normal operation timeout. Default: |
|
The user directory settings for the vCenter server installation. Default: |
|
Query limit. Choices:
|
|
Query limit size. Default: |
|
User directory timeout. Default: |
|
Mail Validation. Choices:
|
|
Validation period. Default: |
|
The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable Environment variable support added in Ansible 2.6. |
|
Allows connection when SSL certificates are not valid. Set to If the value is not specified in the task, the value of environment variable Environment variable support added in Ansible 2.6. If set to Choices:
|
Notes
Note
All modules requires API write access and hence is not supported on a free ESXi license.
Examples
- name: Configure vCenter general settings
community.vmware.vmware_vcenter_settings:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
database:
max_connections: 50
task_cleanup: true
task_retention: 30
event_cleanup: true
event_retention: 30
runtime_settings:
unique_id: 1
managed_address: "{{ lookup('dig', inventory_hostname) }}"
vcenter_server_name: "{{ inventory_hostname }}"
user_directory:
timeout: 60
query_limit: true
query_limit_size: 5000
validation: true
validation_period: 1440
mail:
server: mail.example.com
sender: vcenter@{{ inventory_hostname }}
snmp_receivers:
snmp_receiver_1_url: localhost
snmp_receiver_1_enabled: true
snmp_receiver_1_port: 162
snmp_receiver_1_community: public
timeout_settings:
normal_operations: 30
long_operations: 120
logging_options: info
delegate_to: localhost
- name: Enable Retreat Mode for cluster with MOID domain-c8 (https://kb.vmware.com/kb/80472)
community.vmware.vmware_vcenter_settings:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
advanced_settings:
'config.vcls.clusters.domain-c8.enabled': 'false'
delegate_to: localhost
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
metadata about vCenter settings supported diff mode from version 1.8.0 Returned: always Sample: |