File tree 2 files changed +21
-12
lines changed
tests/integration/targets
prepare_vmware_tests/tasks
2 files changed +21
-12
lines changed Original file line number Diff line number Diff line change 11
11
register : existing_vms
12
12
until : existing_vms is not failed
13
13
14
+ - name : Debug existing VMs
15
+ debug :
16
+ var : existing_vms
17
+
14
18
- name : Turn off the VM
15
19
vmware.vmware.vm_powerstate :
16
20
hostname : ' {{ vcenter_hostname }}'
23
27
ignore_errors : true
24
28
25
29
- name : Delete the VMs
26
- vmware.vmware_rest.vcenter_vm :
27
- vcenter_hostname : ' {{ vcenter_hostname }}'
28
- vcenter_username : ' {{ vcenter_username }}'
29
- vcenter_password : ' {{ vcenter_password }}'
30
- vcenter_validate_certs : false
30
+ community. vmware.vmware_guest :
31
+ hostname : ' {{ vcenter_hostname }}'
32
+ username : ' {{ vcenter_username }}'
33
+ password : ' {{ vcenter_password }}'
34
+ validate_certs : false
31
35
state : absent
32
36
vm : ' {{ item.vm }}'
33
- with_items : " {{ existing_vms.value }}"
37
+ with_items : " {{ existing_vms.guests }}"
34
38
when :
35
39
- not item.name.startswith("vCLS")
36
40
Original file line number Diff line number Diff line change 12
12
- _moId
13
13
register : existing_vms
14
14
until : existing_vms is not failed
15
+
16
+ - name : Debug existing VMs
17
+ debug :
18
+ var : existing_vms
19
+
15
20
- name : Turn off the VM
16
21
vmware.vmware.vm_powerstate :
17
22
hostname : ' {{ vcenter_hostname }}'
23
28
with_items : " {{ existing_vms.guests }}"
24
29
ignore_errors : true
25
30
- name : Clean up VM
26
- vmware.vmware_rest.vcenter_vm :
27
- vcenter_hostname : ' {{ vcenter_hostname }}'
28
- vcenter_username : ' {{ vcenter_username }}'
29
- vcenter_password : ' {{ vcenter_password }}'
30
- vcenter_validate_certs : false
31
+ community. vmware.vmware_guest :
32
+ hostname : ' {{ vcenter_hostname }}'
33
+ username : ' {{ vcenter_username }}'
34
+ password : ' {{ vcenter_password }}'
35
+ validate_certs : false
31
36
state : absent
32
37
vm : ' {{ item.vm }}'
33
- with_items : " {{ existing_vms.value }}"
38
+ with_items : " {{ existing_vms.guests }}"
34
39
when :
35
40
- not item.name.startswith("vCLS")
You can’t perform that action at this time.
0 commit comments