Skip to content

Commit d0dde3c

Browse files
committed
Prepare integration tests: Substitute vmware.vmware_rest.vcenter_datacenter
1 parent 096220d commit d0dde3c

File tree

2 files changed

+14
-16
lines changed

2 files changed

+14
-16
lines changed

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

+7-8
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,14 @@
1212
var: existing_datacenters
1313

1414
- name: Force delete the existing DC
15-
vmware.vmware_rest.vcenter_datacenter:
16-
vcenter_hostname: '{{ vcenter_hostname }}'
17-
vcenter_username: '{{ vcenter_username }}'
18-
vcenter_password: '{{ vcenter_password }}'
19-
vcenter_validate_certs: false
20-
state: absent
15+
community.vmware.vmware_datacenter:
16+
hostname: '{{ vcenter_hostname }}'
17+
username: '{{ vcenter_username }}'
18+
password: '{{ vcenter_password }}'
19+
validate_certs: false
2120
datacenter: '{{ item.datacenter }}'
22-
force: true
23-
with_items: "{{ existing_datacenters.value }}"
21+
state: absent
22+
with_items: "{{ existing_datacenters.datacenter_info }}"
2423
until: _result is succeeded
2524
retries: 10
2625
delay: 1

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

+7-8
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,14 @@
8484
var: existing_datacenters
8585

8686
- name: Force delete the existing DC
87-
vmware.vmware_rest.vcenter_datacenter:
88-
vcenter_hostname: '{{ vcenter_hostname }}'
89-
vcenter_username: '{{ vcenter_username }}'
90-
vcenter_password: '{{ vcenter_password }}'
91-
vcenter_validate_certs: false
87+
community.vmware.vmware_datacenter:
88+
hostname: '{{ vcenter_hostname }}'
89+
username: '{{ vcenter_username }}'
90+
password: '{{ vcenter_password }}'
91+
validate_certs: false
92+
datacenter_name: '{{ item.datacenter }}'
9293
state: absent
93-
datacenter: '{{ item.datacenter }}'
94-
force: true
95-
with_items: "{{ existing_datacenters.value }}"
94+
with_items: "{{ existing_datacenters.datacenter_info }}"
9695
until: _result is succeeded
9796
retries: 10
9897
delay: 1

0 commit comments

Comments
 (0)