Debian Codegraph @

ansible_collections/community/vmware/tests/integration/targets/vmware_guest/tasks/max_connections.yml

raw
1 # Test code for the vmware_guest module.
2 # Copyright: (c) 2019, Abhijeet Kasurde <[email protected]>
3 # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
4
5 - &add_mk_conn
6 name: Create new VM with max_connections as 4
7 vmware_guest:
8 validate_certs: false
9 hostname: "{{ vcenter_hostname }}"
10 username: "{{ vcenter_username }}"
11 password: "{{ vcenter_password }}"
12 name: test_vm1
13 guest_id: centos64Guest
14 datacenter: "{{ dc1 }}"
15 hardware:
16 num_cpus: 1
17 memory_mb: 128
18 max_connections: 4
19 disk:
20 - size: 1gb
21 type: thin
22 datastore: "{{ rw_datastore }}"
23 state: present
24 folder: "{{ f0 }}"
25 register: mk_conn_result_0001
26
27 - debug: var=mk_conn_result_0001
28
29 - name: Assert that changes were made
30 assert:
31 that:
32 - mk_conn_result_0001 is changed
33
34 - <<: *add_mk_conn
35 name: Again create new VMs again with max_connections as 4
36 register: mk_conn_result_0002
37
38 - debug: var=mk_conn_result_0002
39
40 - name: Assert that changes were not made
41 assert:
42 that:
43 - not (mk_conn_result_0002 is changed)