ansible/test/integration/targets/vmware_vcenter_settings/tasks/main.yml
Gonéri Le Bouder affaedfca8 vmware: refactoring of vmware test roles -- part7 (#55732)
Refactoring of the following roles to make use of the new
`prepare_vmware_tests` role.

- `vmware_resource_pool`
- `vmware_resource_pool_facts`
- `vmware_target_canonical_facts`
- `vmware_vcenter_settings`
- `vmware_vcenter_statistics`
- `vmware_vm_facts`
- `vmware_vm_host_drs_rule`
- `vmware_vm_vm_drs_rule`
- `vmware_vmkernel`
- `vmware_vmkernel_facts`
- `vmware_vspan_session`
- `vmware_vswitch`
- `vmware_vswitch_facts`

This patch depends on: https://github.com/ansible/ansible/pull/55719

Original PR: https://github.com/ansible/ansible/pull/54882
2019-05-02 23:19:01 -04:00

83 lines
2.4 KiB
YAML

# Test code for the vmware_vcenter_settings module.
# Copyright: (c) 2018, Christian Kotte <christian.kotte@gmx.de>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
- import_role:
name: prepare_vmware_tests
- name: Configure general settings in check mode
vmware_vcenter_settings:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
database:
max_connections: 50
task_cleanup: true
task_retention: 180
event_cleanup: true
event_retention: 180
runtime_settings:
unique_id: 7
managed_address: 192.168.1.0
vcenter_server_name: "{{ inventory_hostname }}"
user_directory:
timeout: 120
query_limit: true
query_limit_size: 100000
validation: true
validation_period: 1440
mail:
server: mail.example.local
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
validate_certs: no
register: all_settings_results_check_mode
check_mode: yes
- debug: var=all_settings_results_check_mode
- name: Configure general settings
vmware_vcenter_settings:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
database:
max_connections: 50
task_cleanup: true
task_retention: 180
event_cleanup: true
event_retention: 180
runtime_settings:
unique_id: 7
managed_address: 192.168.1.0
vcenter_server_name: "{{ inventory_hostname }}"
user_directory:
timeout: 120
query_limit: true
query_limit_size: 100000
validation: true
validation_period: 1440
mail:
server: mail.example.local
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
validate_certs: no
register: all_settings_results
- debug: var=all_settings_results