community.vmware.vmware_vcenter_settings module – Configures general settings on a vCenter server
Note
This module is part of the community.vmware collection (version 4.8.0).
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 community.vmware.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 |
|
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 |
|
The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable 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 |
|
Port of the HTTP 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 |
|
Allows connection when SSL certificates are not valid. Set to If the value is not specified in the task, the value of environment variable Choices:
|
Notes
Note
All modules requires API write access and hence is not supported on a free ESXi license.
All variables and VMware object names are case sensitive.
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: |