Skip to content

Commit

Permalink
vmware_vcenter_settings: Specify defaults inside parameter dict (ansi…
Browse files Browse the repository at this point in the history
…ble#59546)

* vmware_vcenter_settings: Specify defaults inside dictionaries
* Add default to documentation and fix bug in example
  • Loading branch information
Joseph Andreatta authored and Akasurde committed Jan 17, 2020
1 parent b59fa13 commit 148d72d
Showing 1 changed file with 21 additions and 13 deletions.
34 changes: 21 additions & 13 deletions lib/ansible/modules/cloud/vmware/vmware_vcenter_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@
- '- C(server) (str): Mail server'
- '- C(sender) (str): Mail sender address'
type: dict
default: {
server: '',
sender: '',
}
snmp_receivers:
description:
- SNMP trap destinations for vCenter server alerts.
Expand Down Expand Up @@ -153,7 +157,7 @@
event_retention: 30
runtime_settings:
unique_id: 1
managed_address: "{{ ansible_default_ipv4.address }}"
managed_address: "{{ lookup('dig', inventory_hostname) }}"
vcenter_server_name: "{{ inventory_hostname }}"
user_directory:
timeout: 60
Expand Down Expand Up @@ -576,11 +580,11 @@ def main():
database=dict(
type='dict',
options=dict(
max_connections=dict(type='int'),
task_cleanup=dict(type='bool'),
task_retention=dict(type='int'),
event_cleanup=dict(type='bool'),
event_retention=dict(type='int'),
max_connections=dict(type='int', default=50),
task_cleanup=dict(type='bool', default=True),
task_retention=dict(type='int', default=30),
event_cleanup=dict(type='bool', default=True),
event_retention=dict(type='int', default=30),
),
default=dict(
max_connections=50,
Expand All @@ -601,11 +605,11 @@ def main():
user_directory=dict(
type='dict',
options=dict(
timeout=dict(type='int'),
query_limit=dict(type='bool'),
query_limit_size=dict(type='int'),
validation=dict(type='bool'),
validation_period=dict(type='int'),
timeout=dict(type='int', default=60),
query_limit=dict(type='bool', default=True),
query_limit_size=dict(type='int', default=5000),
validation=dict(type='bool', default=True),
validation_period=dict(type='int', default=1440),
),
default=dict(
timeout=60,
Expand All @@ -621,6 +625,10 @@ def main():
server=dict(type='str'),
sender=dict(type='str'),
),
default=dict(
server='',
sender='',
),
),
snmp_receivers=dict(
type='dict',
Expand Down Expand Up @@ -664,8 +672,8 @@ def main():
timeout_settings=dict(
type='dict',
options=dict(
normal_operations=dict(type='int'),
long_operations=dict(type='int'),
normal_operations=dict(type='int', default=30),
long_operations=dict(type='int', default=120),
),
default=dict(
normal_operations=30,
Expand Down

0 comments on commit 148d72d

Please sign in to comment.