community.vmware.vmware_vcenter_settings – Configures general settings on a vCenter server¶
Note
This plugin is part of the community.vmware collection (version 1.9.0).
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
.
Requirements¶
The below requirements are needed on the host that executes this module.
python >= 2.6
PyVmomi
Parameters¶
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
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description |
---|---|---|
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, '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': '[email protected]', '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': '[email protected]', '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': '[email protected]', '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)