diff --git a/tests/integration/targets/vmware_content_template/tasks/main.yml b/tests/integration/targets/vmware_content_template/tasks/main.yml index a89d7857..72458845 100644 --- a/tests/integration/targets/vmware_content_template/tasks/main.yml +++ b/tests/integration/targets/vmware_content_template/tasks/main.yml @@ -46,20 +46,6 @@ host: "{{ template_host }}" register: __res - - name: Delete template from content library - vmware.vmware.content_template: - validate_certs: false - hostname: "{{ vcenter_hostname }}" - username: "{{ vcenter_username }}" - password: "{{ vcenter_password }}" - port: "{{ vcenter_port }}" - template: "{{ template_name }}" - library: "{{ library }}" - vm_name: "{{ vm }}" - host: "{{ template_host }}" - state: absent - register: __res - - name: Assert values ansible.builtin.assert: that: @@ -74,6 +60,19 @@ - __res.template_info.msg == "Template '" + template_name + "'." when: not run_on_simulator + - name: Delete template from content library + vmware.vmware.content_template: + validate_certs: false + hostname: "{{ vcenter_hostname }}" + username: "{{ vcenter_username }}" + password: "{{ vcenter_password }}" + port: "{{ vcenter_port }}" + template: "{{ template_name }}" + library: "{{ library }}" + vm_name: "{{ vm }}" + host: "{{ template_host }}" + state: absent + always: - name: "Test teardown: Destroy VM guest {{ vm }}" community.vmware.vmware_guest: