Debian Codegraph @

ansible_collections/community/vmware/tests/integration/targets/vmware_datastore/tasks/main.yml

raw
1 # Test code for the vmware_datastore_info module.
2 # Copyright (c) 2022, Mario Lenz <[email protected]>
3 # Copyright (c) 2022, Ansible Project
4 # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
5
6
7 - import_role:
8 name: prepare_vmware_tests
9 vars:
10 setup_attach_host: true
11 setup_datastore: true
12
13 - name: Configure Storage I/O Control
14 vmware_datastore:
15 hostname: "{{ vcenter_hostname }}"
16 username: "{{ vcenter_username }}"
17 password: "{{ vcenter_password }}"
18 datacenter_name: "{{ dc1 }}"
19 name: "{{ rw_datastore }}"
20 validate_certs: false
21 storage_io_control: 'enable_io_statistics'
22 congestion_threshold_manual: 30
23 statistic_collection: true
24 register: config_storage_io_control
25
26 - assert:
27 that:
28 - config_storage_io_control is changed
29
30 - name: Configure Storage I/O Control again (idempotency)
31 vmware_datastore:
32 hostname: "{{ vcenter_hostname }}"
33 username: "{{ vcenter_username }}"
34 password: "{{ vcenter_password }}"
35 datacenter_name: "{{ dc1 }}"
36 name: "{{ rw_datastore }}"
37 validate_certs: false
38 storage_io_control: 'enable_io_statistics'
39 congestion_threshold_manual: 30
40 statistic_collection: true
41 register: config_storage_io_control_again
42
43 - assert:
44 that:
45 - config_storage_io_control_again is not changed