You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/test/integration/targets/vmware_guest/tasks/main.yml

118 lines
3.4 KiB
YAML

# Test code for the vmware_guest module.
# Copyright: (c) 2017, James Tanner <tanner.jc@gmail.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
- import_role:
name: prepare_vmware_tests
vars:
setup_datacenter: true
setup_attach_host: true
setup_datastore: true
setup_virtualmachines: true
setup_resource_pool: true
- block:
- include: poweroff_d1_c1_f0.yml
- include: poweroff_d1_c1_f1.yml
- include: check_mode.yml
- include: clone_d1_c1_f0.yml
- include: create_d1_c1_f0.yml
- include: cdrom_d1_c1_f0.yml
- include: create_rp_d1_c1_f0.yml
- include: create_guest_invalid_d1_c1_f0.yml
- include: mac_address_d1_c1_f0.yml
- include: disk_type_d1_c1_f0.yml
- include: create_nw_d1_c1_f0.yml
- include: delete_vm.yml
- include: non_existent_vm_ops.yml
always:
- name: Remove VM
vmware_guest:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
validate_certs: no
cluster: "{{ ccr1 }}"
name: '{{ item }}'
force: yes
state: absent
with_items:
- CDROM-Test
- CDROM-Test-38679
- newvm_2
- newvm_3
- newvmnw_4
- DC0_H0_VM12
- import_role:
name: prepare_vmware_tests
vars:
setup_attach_host: true
setup_datastore: true
setup_virtualmachines: true
- block:
- include: network_negative_test.yml
# VCSIM does not return list of portgroups for dvswitch so commenting following TC
#- include: network_with_portgroup.yml
# Currently, VCSIM doesn't support DVPG (as portkeys are not available) so commenting this test
# - include: network_with_dvpg.yml
#- include: template_d1_c1_f0.yml
- include: vapp_d1_c1_f0.yml
- include: disk_size_d1_c1_f0.yml
- include: network_with_device.yml
- include: disk_mode_d1_c1_f0.yml
- include: linked_clone_d1_c1_f0.yml
always:
- name: Remove VM
vmware_guest:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
validate_certs: no
cluster: "{{ ccr1 }}"
name: '{{ item }}'
force: yes
state: absent
with_items:
- disk_mode_d1_c1_f0
- network_with_device
- new_vm_no_nw_type
- vApp-Test
- import_role:
name: prepare_vmware_tests
vars:
setup_attach_host: true
setup_datastore: true
setup_virtualmachines: true
- block:
- include: boot_firmware_d1_c1_f0.yml
# Failing, see: https://github.com/ansible/ansible/issues/57653
# - include: clone_with_convert.yml
# - include: clone_customize_guest_test.yml
always:
- name: Remove VM
vmware_guest:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
validate_certs: no
cluster: "{{ ccr1 }}"
name: '{{ item }}'
force: yes
state: absent
with_items:
- newvm_DC0_H0_VM0
- newvm_DC0_H0_VM1
- newvm_efi_DC0_H0_VM0
- newvm_efi_DC0_H0_VM1
- thin_DC0_H0_VM0
- thin_DC0_H0_VM1
- thick_DC0_H0_VM0
- thick_DC0_H0_VM1
- eagerzeroedthick_DC0_H0_VM0
- eagerzeroedthick_DC0_H0_VM1
- net_customize_DC0_H0_VM0
- net_customize_DC0_H0_VM1