Skip to content

Commit 35c0e56

Browse files
committed
Replace vmware.vmware_rest.vcenter_vm
1 parent 2d1cdb9 commit 35c0e56

File tree

2 files changed

+19
-10
lines changed

2 files changed

+19
-10
lines changed

tests/integration/targets/prepare_vmware_tests/tasks/teardown_with_esxi.yml

+9-5
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
register: existing_vms
1212
until: existing_vms is not failed
1313

14+
- name: Debug existing VMs
15+
debug:
16+
var: existing_vms
17+
1418
- name: Turn off the VM
1519
vmware.vmware.vm_powerstate:
1620
hostname: '{{ vcenter_hostname }}'
@@ -23,11 +27,11 @@
2327
ignore_errors: true
2428

2529
- 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
3135
state: absent
3236
vm: '{{ item.vm }}'
3337
with_items: "{{ existing_vms.value }}"

tests/integration/targets/vmware_guest/tasks/run_test_playbook.yml

+10-5
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@
1212
- _moId
1313
register: existing_vms
1414
until: existing_vms is not failed
15+
16+
- name: Debug existing VMs
17+
debug:
18+
var: existing_vms
19+
1520
- name: Turn off the VM
1621
vmware.vmware.vm_powerstate:
1722
hostname: '{{ vcenter_hostname }}'
@@ -23,11 +28,11 @@
2328
with_items: "{{ existing_vms.guests }}"
2429
ignore_errors: true
2530
- 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
3136
state: absent
3237
vm: '{{ item.vm }}'
3338
with_items: "{{ existing_vms.value }}"

0 commit comments

Comments
 (0)