From 702b3d0a0e588f184b6d2f92e91e727a01b1caee Mon Sep 17 00:00:00 2001 From: Ondra Machacek Date: Fri, 8 Mar 2024 15:53:32 +0100 Subject: [PATCH] Remove collection reference inside the tests --- .../tasks/boot_firmware_d1_c1_f0.yml | 28 +- .../vmware_guest/tasks/cdrom_d1_c1_f0.yml | 100 +++--- .../vmware_guest/tasks/cdrom_d1_c1_f1.yml | 320 +++++++++--------- .../targets/vmware_guest/tasks/check_mode.yml | 16 +- .../tasks/clone_customize_guest_test.yml | 20 +- .../vmware_guest/tasks/clone_d1_c1_f0.yml | 4 +- .../vmware_guest/tasks/clone_with_convert.yml | 22 +- .../vmware_guest/tasks/create_d1_c1_f0.yml | 66 ++-- .../tasks/create_guest_invalid_d1_c1_f0.yml | 14 +- .../vmware_guest/tasks/create_nw_d1_c1_f0.yml | 26 +- .../vmware_guest/tasks/create_rp_d1_c1_f0.yml | 54 +-- .../create_vm_using_special_characters.yml | 1 - .../targets/vmware_guest/tasks/delete_vm.yml | 22 +- .../vmware_guest/tasks/disk_mode_d1_c1_f0.yml | 28 +- .../vmware_guest/tasks/disk_size_d1_c1_f0.yml | 12 +- .../vmware_guest/tasks/disk_type_d1_c1_f0.yml | 18 +- .../tasks/mac_address_d1_c1_f0.yml | 24 +- .../multiple_disk_controllers_d1_c1_f0.yml | 132 ++++---- .../tasks/network_negative_test.yml | 78 ++--- .../tasks/reconfig_vm_to_latest_version.yml | 32 +- .../tasks/remove_vm_from_inventory.yml | 6 +- .../vmware_guest/tasks/run_test_playbook.yml | 2 +- .../vmware_guest/tasks/vapp_d1_c1_f0.yml | 34 +- .../tasks/windows_vbs_d1_c1_f0.yml | 36 +- 24 files changed, 547 insertions(+), 548 deletions(-) diff --git a/tests/integration/targets/vmware_guest/tasks/boot_firmware_d1_c1_f0.yml b/tests/integration/targets/vmware_guest/tasks/boot_firmware_d1_c1_f0.yml index d8f65a7a..469d2e60 100644 --- a/tests/integration/targets/vmware_guest/tasks/boot_firmware_d1_c1_f0.yml +++ b/tests/integration/targets/vmware_guest/tasks/boot_firmware_d1_c1_f0.yml @@ -12,13 +12,13 @@ guest_id: centos64Guest datacenter: "{{ dc1 }}" hardware: - num_cpus: 1 - boot_firmware: "bios" - memory_mb: 128 + num_cpus: 1 + boot_firmware: "bios" + memory_mb: 128 disk: - - size: 1gb - type: thin - datastore: "{{ rw_datastore }}" + - size: 1gb + type: thin + datastore: "{{ rw_datastore }}" state: poweredoff folder: "{{ f0 }}" register: clone_d1_c1_f0 @@ -28,7 +28,7 @@ - name: assert that changes were made assert: that: - - clone_d1_c1_f0 is changed + - clone_d1_c1_f0 is changed - name: create new VMs again with boot_firmware as 'bios' vmware_guest: @@ -66,13 +66,13 @@ guest_id: centos64Guest datacenter: "{{ dc1 }}" hardware: - num_cpus: 1 - boot_firmware: "efi" - memory_mb: 128 + num_cpus: 1 + boot_firmware: "efi" + memory_mb: 128 disk: - - size: 1gb - type: thin - datastore: "{{ rw_datastore }}" + - size: 1gb + type: thin + datastore: "{{ rw_datastore }}" state: poweredoff folder: "{{ f0 }}" register: clone_d1_c1_f0 @@ -82,7 +82,7 @@ - name: assert that changes were made assert: that: - - clone_d1_c1_f0 is changed + - clone_d1_c1_f0 is changed - name: create new VMs again with boot_firmware as 'efi' vmware_guest: diff --git a/tests/integration/targets/vmware_guest/tasks/cdrom_d1_c1_f0.yml b/tests/integration/targets/vmware_guest/tasks/cdrom_d1_c1_f0.yml index 23d35a9c..3e8ccb44 100644 --- a/tests/integration/targets/vmware_guest/tasks/cdrom_d1_c1_f0.yml +++ b/tests/integration/targets/vmware_guest/tasks/cdrom_d1_c1_f0.yml @@ -16,14 +16,14 @@ num_cpus: 1 scsi: paravirtual disk: - - size_mb: 128 - type: thin - datastore: "{{ rw_datastore }}" + - size_mb: 128 + type: thin + datastore: "{{ rw_datastore }}" cdrom: - - controller_number: 0 - unit_number: 0 - type: iso - iso_path: "[{{ ro_datastore }}] centos.iso" + - controller_number: 0 + unit_number: 0 + type: iso + iso_path: "[{{ ro_datastore }}] centos.iso" register: cdrom_vm - debug: var=cdrom_vm @@ -44,10 +44,10 @@ datastore: "{{ rw_datastore }}" datacenter: "{{ dc1 }}" cdrom: - - controller_number: 0 - unit_number: 0 - type: iso - iso_path: "[{{ ro_datastore }}] fedora.iso" + - controller_number: 0 + unit_number: 0 + type: iso + iso_path: "[{{ ro_datastore }}] fedora.iso" state: present register: cdrom_vm check_mode: true @@ -70,10 +70,10 @@ datastore: "{{ rw_datastore }}" datacenter: "{{ dc1 }}" cdrom: - - controller_number: 0 - unit_number: 0 - type: iso - iso_path: "[{{ ro_datastore }}] fedora.iso" + - controller_number: 0 + unit_number: 0 + type: iso + iso_path: "[{{ ro_datastore }}] fedora.iso" state: present register: cdrom_vm @@ -94,9 +94,9 @@ name: test_vm1 datacenter: "{{ dc1 }}" cdrom: - - controller_number: 0 - unit_number: 0 - type: client + - controller_number: 0 + unit_number: 0 + type: client state: present register: cdrom_vm check_mode: true @@ -118,9 +118,9 @@ name: test_vm1 datacenter: "{{ dc1 }}" cdrom: - - controller_number: 0 - unit_number: 0 - type: client + - controller_number: 0 + unit_number: 0 + type: client state: present register: cdrom_vm @@ -154,9 +154,9 @@ name: test_vm2 datacenter: "{{ dc1 }}" cdrom: - - controller_number: 0 - unit_number: 0 - type: none + - controller_number: 0 + unit_number: 0 + type: none state: present register: cdrom_vm @@ -184,20 +184,20 @@ num_cpus: 1 scsi: paravirtual disk: - - size_mb: 128 - type: thin - datastore: "{{ rw_datastore }}" - - size_mb: 128 - type: thin - datastore: "{{ rw_datastore }}" - - size_mb: 128 - type: thin - datastore: "{{ rw_datastore }}" + - size_mb: 128 + type: thin + datastore: "{{ rw_datastore }}" + - size_mb: 128 + type: thin + datastore: "{{ rw_datastore }}" + - size_mb: 128 + type: thin + datastore: "{{ rw_datastore }}" cdrom: - - controller_number: 0 - unit_number: 0 - type: iso - iso_path: "[{{ ro_datastore }}] fedora.iso" + - controller_number: 0 + unit_number: 0 + type: iso + iso_path: "[{{ ro_datastore }}] fedora.iso" register: cdrom_vm - debug: var=cdrom_vm @@ -224,20 +224,20 @@ num_cpus: 1 scsi: paravirtual disk: - - size_mb: 128 - type: thin - datastore: "{{ rw_datastore }}" - - size_mb: 128 - type: thin - datastore: "{{ rw_datastore }}" - - size_mb: 128 - type: thin - datastore: "{{ rw_datastore }}" + - size_mb: 128 + type: thin + datastore: "{{ rw_datastore }}" + - size_mb: 128 + type: thin + datastore: "{{ rw_datastore }}" + - size_mb: 128 + type: thin + datastore: "{{ rw_datastore }}" cdrom: - - controller_number: 0 - unit_number: 0 - type: iso - iso_path: "[{{ ro_datastore }}] base.iso" + - controller_number: 0 + unit_number: 0 + type: iso + iso_path: "[{{ ro_datastore }}] base.iso" register: cdrom_vm - debug: var=cdrom_vm - name: assert the VM was created diff --git a/tests/integration/targets/vmware_guest/tasks/cdrom_d1_c1_f1.yml b/tests/integration/targets/vmware_guest/tasks/cdrom_d1_c1_f1.yml index 1a335f42..f18a4b4a 100644 --- a/tests/integration/targets/vmware_guest/tasks/cdrom_d1_c1_f1.yml +++ b/tests/integration/targets/vmware_guest/tasks/cdrom_d1_c1_f1.yml @@ -17,25 +17,25 @@ num_cpus: 1 scsi: paravirtual disk: - - size_mb: 128 - type: thin - datastore: "{{ rw_datastore }}" + - size_mb: 128 + type: thin + datastore: "{{ rw_datastore }}" cdrom: - - controller_type: ide - controller_number: 0 - unit_number: 0 - type: iso - iso_path: "[{{ ro_datastore }}] centos.iso" - - controller_type: ide - controller_number: 0 - unit_number: 1 - type: client - - controller_number: 1 - unit_number: 0 - type: none - - controller_number: 1 - unit_number: 1 - type: client + - controller_type: ide + controller_number: 0 + unit_number: 0 + type: iso + iso_path: "[{{ ro_datastore }}] centos.iso" + - controller_type: ide + controller_number: 0 + unit_number: 1 + type: client + - controller_number: 1 + unit_number: 0 + type: none + - controller_number: 1 + unit_number: 1 + type: client register: cdrom_vm - debug: var=cdrom_vm @@ -55,23 +55,23 @@ name: test_vm1 datacenter: "{{ dc1 }}" cdrom: - - controller_type: ide - controller_number: 0 - unit_number: 0 - type: client - - controller_type: ide - controller_number: 0 - unit_number: 1 - type: iso - iso_path: "[{{ ro_datastore }}] fedora.iso" - - controller_type: ide - controller_number: 1 - unit_number: 0 - state: absent - - controller_type: ide - controller_number: 1 - unit_number: 1 - state: absent + - controller_type: ide + controller_number: 0 + unit_number: 0 + type: client + - controller_type: ide + controller_number: 0 + unit_number: 1 + type: iso + iso_path: "[{{ ro_datastore }}] fedora.iso" + - controller_type: ide + controller_number: 1 + unit_number: 0 + state: absent + - controller_type: ide + controller_number: 1 + unit_number: 1 + state: absent state: present register: cdrom_vm check_mode: true @@ -93,23 +93,23 @@ name: test_vm1 datacenter: "{{ dc1 }}" cdrom: - - controller_type: ide - controller_number: 0 - unit_number: 0 - type: client - - controller_type: ide - controller_number: 0 - unit_number: 1 - type: iso - iso_path: "[{{ ro_datastore }}] fedora.iso" - - controller_type: ide - controller_number: 1 - unit_number: 0 - state: absent - - controller_type: ide - controller_number: 1 - unit_number: 1 - state: absent + - controller_type: ide + controller_number: 0 + unit_number: 0 + type: client + - controller_type: ide + controller_number: 0 + unit_number: 1 + type: iso + iso_path: "[{{ ro_datastore }}] fedora.iso" + - controller_type: ide + controller_number: 1 + unit_number: 0 + state: absent + - controller_type: ide + controller_number: 1 + unit_number: 1 + state: absent state: present register: cdrom_vm @@ -137,27 +137,27 @@ num_cpus: 1 scsi: paravirtual disk: - - size_mb: 128 - type: thin - datastore: "{{ rw_datastore }}" + - size_mb: 128 + type: thin + datastore: "{{ rw_datastore }}" cdrom: - - controller_type: sata - controller_number: 0 - unit_number: 0 - type: iso - iso_path: "[{{ ro_datastore }}] centos.iso" - - controller_type: sata - controller_number: 1 - unit_number: 1 - type: client - - controller_type: sata - controller_number: 2 - unit_number: 0 - type: none - - controller_type: sata - controller_number: 3 - unit_number: 1 - type: client + - controller_type: sata + controller_number: 0 + unit_number: 0 + type: iso + iso_path: "[{{ ro_datastore }}] centos.iso" + - controller_type: sata + controller_number: 1 + unit_number: 1 + type: client + - controller_type: sata + controller_number: 2 + unit_number: 0 + type: none + - controller_type: sata + controller_number: 3 + unit_number: 1 + type: client register: cdrom_vm - debug: var=cdrom_vm @@ -177,23 +177,23 @@ name: test_vm2 datacenter: "{{ dc1 }}" cdrom: - - controller_type: sata - controller_number: 0 - unit_number: 0 - state: absent - - controller_type: sata - controller_number: 1 - unit_number: 1 - state: absent - - controller_type: sata - controller_number: 2 - unit_number: 0 - type: client - - controller_type: sata - controller_number: 3 - unit_number: 1 - type: iso - iso_path: "[{{ ro_datastore }}] fedora.iso" + - controller_type: sata + controller_number: 0 + unit_number: 0 + state: absent + - controller_type: sata + controller_number: 1 + unit_number: 1 + state: absent + - controller_type: sata + controller_number: 2 + unit_number: 0 + type: client + - controller_type: sata + controller_number: 3 + unit_number: 1 + type: iso + iso_path: "[{{ ro_datastore }}] fedora.iso" state: present register: cdrom_vm check_mode: true @@ -215,23 +215,23 @@ name: test_vm2 datacenter: "{{ dc1 }}" cdrom: - - controller_type: sata - controller_number: 0 - unit_number: 0 - state: absent - - controller_type: sata - controller_number: 1 - unit_number: 1 - state: absent - - controller_type: sata - controller_number: 2 - unit_number: 0 - type: client - - controller_type: sata - controller_number: 3 - unit_number: 1 - type: iso - iso_path: "[{{ ro_datastore }}] fedora.iso" + - controller_type: sata + controller_number: 0 + unit_number: 0 + state: absent + - controller_type: sata + controller_number: 1 + unit_number: 1 + state: absent + - controller_type: sata + controller_number: 2 + unit_number: 0 + type: client + - controller_type: sata + controller_number: 3 + unit_number: 1 + type: iso + iso_path: "[{{ ro_datastore }}] fedora.iso" state: present register: cdrom_vm @@ -259,27 +259,27 @@ num_cpus: 1 scsi: paravirtual disk: - - size_mb: 128 - type: thin - datastore: "{{ rw_datastore }}" + - size_mb: 128 + type: thin + datastore: "{{ rw_datastore }}" cdrom: - - controller_type: ide - controller_number: 0 - unit_number: 0 - type: iso - iso_path: "[{{ ro_datastore }}] centos.iso" - - controller_type: sata - controller_number: 0 - unit_number: 0 - type: client - - controller_type: ide - controller_number: 1 - unit_number: 0 - type: none - - controller_type: sata - controller_number: 1 - unit_number: 0 - type: client + - controller_type: ide + controller_number: 0 + unit_number: 0 + type: iso + iso_path: "[{{ ro_datastore }}] centos.iso" + - controller_type: sata + controller_number: 0 + unit_number: 0 + type: client + - controller_type: ide + controller_number: 1 + unit_number: 0 + type: none + - controller_type: sata + controller_number: 1 + unit_number: 0 + type: client register: cdrom_vm - debug: var=cdrom_vm @@ -299,23 +299,23 @@ name: test_vm3 datacenter: "{{ dc1 }}" cdrom: - - controller_type: ide - controller_number: 0 - unit_number: 0 - state: absent - - controller_type: sata - controller_number: 0 - unit_number: 0 - type: iso - iso_path: "[{{ ro_datastore }}] fedora.iso" - - controller_type: ide - controller_number: 1 - unit_number: 0 - type: client - - controller_type: sata - controller_number: 1 - unit_number: 0 - state: absent + - controller_type: ide + controller_number: 0 + unit_number: 0 + state: absent + - controller_type: sata + controller_number: 0 + unit_number: 0 + type: iso + iso_path: "[{{ ro_datastore }}] fedora.iso" + - controller_type: ide + controller_number: 1 + unit_number: 0 + type: client + - controller_type: sata + controller_number: 1 + unit_number: 0 + state: absent state: present register: cdrom_vm check_mode: true @@ -337,23 +337,23 @@ name: test_vm3 datacenter: "{{ dc1 }}" cdrom: - - controller_type: ide - controller_number: 0 - unit_number: 0 - state: absent - - controller_type: sata - controller_number: 0 - unit_number: 0 - type: iso - iso_path: "[{{ ro_datastore }}] fedora.iso" - - controller_type: ide - controller_number: 1 - unit_number: 0 - type: client - - controller_type: sata - controller_number: 1 - unit_number: 0 - state: absent + - controller_type: ide + controller_number: 0 + unit_number: 0 + state: absent + - controller_type: sata + controller_number: 0 + unit_number: 0 + type: iso + iso_path: "[{{ ro_datastore }}] fedora.iso" + - controller_type: ide + controller_number: 1 + unit_number: 0 + type: client + - controller_type: sata + controller_number: 1 + unit_number: 0 + state: absent state: present register: cdrom_vm diff --git a/tests/integration/targets/vmware_guest/tasks/check_mode.yml b/tests/integration/targets/vmware_guest/tasks/check_mode.yml index e17f4eff..ebab33cb 100644 --- a/tests/integration/targets/vmware_guest/tasks/check_mode.yml +++ b/tests/integration/targets/vmware_guest/tasks/check_mode.yml @@ -10,21 +10,21 @@ state: poweredoff guest_id: debian8_64Guest disk: - - size_mb: 10 - type: thin - datastore: '{{ rw_datastore }}' + - size_mb: 10 + type: thin + datastore: '{{ rw_datastore }}' hardware: memory_mb: 128 num_cpus: 1 scsi: paravirtual version: 11 cdrom: - - controller_number: 0 - unit_number: 0 - type: iso - iso_path: "[{{ ro_datastore }}] fedora.iso" + - controller_number: 0 + unit_number: 0 + type: iso + iso_path: "[{{ ro_datastore }}] fedora.iso" networks: - - name: VM Network + - name: VM Network - name: Perform all operation in check mode vmware_guest: diff --git a/tests/integration/targets/vmware_guest/tasks/clone_customize_guest_test.yml b/tests/integration/targets/vmware_guest/tasks/clone_customize_guest_test.yml index ab1f4491..0945b8aa 100644 --- a/tests/integration/targets/vmware_guest/tasks/clone_customize_guest_test.yml +++ b/tests/integration/targets/vmware_guest/tasks/clone_customize_guest_test.yml @@ -10,21 +10,21 @@ state: poweredoff guest_id: debian8_64Guest disk: - - size_mb: 10 - type: thin - datastore: '{{ rw_datastore }}' + - size_mb: 10 + type: thin + datastore: '{{ rw_datastore }}' hardware: memory_mb: 128 num_cpus: 1 scsi: paravirtual version: 11 cdrom: - - controller_number: 0 - unit_number: 0 - type: iso - iso_path: "[{{ ro_datastore }}] fedora.iso" + - controller_number: 0 + unit_number: 0 + type: iso + iso_path: "[{{ ro_datastore }}] fedora.iso" networks: - - name: VM Network + - name: VM Network - name: clone vm from template and customize GOS vmware_guest: @@ -46,7 +46,7 @@ - name: assert that changes were made assert: that: - - clone_customize is changed + - clone_customize is changed - name: clone vm from template and customize GOS again vmware_guest: @@ -68,4 +68,4 @@ - name: assert that changes were not made assert: that: - - not (clone_customize_again is changed) + - not (clone_customize_again is changed) diff --git a/tests/integration/targets/vmware_guest/tasks/clone_d1_c1_f0.yml b/tests/integration/targets/vmware_guest/tasks/clone_d1_c1_f0.yml index 1b3bbbe1..cc06dc60 100644 --- a/tests/integration/targets/vmware_guest/tasks/clone_d1_c1_f0.yml +++ b/tests/integration/targets/vmware_guest/tasks/clone_d1_c1_f0.yml @@ -23,7 +23,7 @@ - name: assert that changes were not made assert: that: - - not (linked_clone_d1_c1_f0 is changed) + - not (linked_clone_d1_c1_f0 is changed) - name: create new linked clone without specifying linked_clone vmware_guest: @@ -46,4 +46,4 @@ - name: assert that changes were not made assert: that: - - not (linked_clone_d1_c1_f0 is changed) + - not (linked_clone_d1_c1_f0 is changed) diff --git a/tests/integration/targets/vmware_guest/tasks/clone_with_convert.yml b/tests/integration/targets/vmware_guest/tasks/clone_with_convert.yml index f4e14b53..70c13589 100644 --- a/tests/integration/targets/vmware_guest/tasks/clone_with_convert.yml +++ b/tests/integration/targets/vmware_guest/tasks/clone_with_convert.yml @@ -10,21 +10,21 @@ state: poweredoff guest_id: debian8_64Guest disk: - - size_mb: 10 - type: thin - datastore: '{{ rw_datastore }}' + - size_mb: 10 + type: thin + datastore: '{{ rw_datastore }}' hardware: memory_mb: 128 num_cpus: 1 scsi: paravirtual version: 11 cdrom: - - controller_number: 0 - unit_number: 0 - type: iso - iso_path: "[{{ ro_datastore }}] fedora.iso" + - controller_number: 0 + unit_number: 0 + type: iso + iso_path: "[{{ ro_datastore }}] fedora.iso" networks: - - name: VM Network + - name: VM Network - name: clone vm from template and convert to thin vmware_guest: @@ -45,7 +45,7 @@ - name: assert that changes were made assert: that: - - clone_thin is changed + - clone_thin is changed - name: clone vm from template and convert to thick vmware_guest: @@ -66,7 +66,7 @@ - name: assert that changes were made assert: that: - - clone_thick is changed + - clone_thick is changed - name: clone vm from template and convert to eagerzeroedthick vmware_guest: @@ -87,4 +87,4 @@ - name: assert that changes were made assert: that: - - clone_eagerzeroedthick is changed + - clone_eagerzeroedthick is changed diff --git a/tests/integration/targets/vmware_guest/tasks/create_d1_c1_f0.yml b/tests/integration/targets/vmware_guest/tasks/create_d1_c1_f0.yml index b2421ab3..287bb209 100644 --- a/tests/integration/targets/vmware_guest/tasks/create_d1_c1_f0.yml +++ b/tests/integration/targets/vmware_guest/tasks/create_d1_c1_f0.yml @@ -13,24 +13,24 @@ guest_id: centos64Guest datacenter: "{{ dc1 }}" hardware: - num_cpus: 1 - num_cpu_cores_per_socket: 1 - memory_mb: 128 - hotadd_memory: true - hotadd_cpu: false - memory_reservation: 128 - memory_reservation_lock: false - nested_virt: true - hotremove_cpu: true - mem_limit: 8096 - mem_reservation: 4096 - cpu_limit: 8096 - cpu_reservation: 4096 - max_connections: 10 + num_cpus: 1 + num_cpu_cores_per_socket: 1 + memory_mb: 128 + hotadd_memory: true + hotadd_cpu: false + memory_reservation: 128 + memory_reservation_lock: false + nested_virt: true + hotremove_cpu: true + mem_limit: 8096 + mem_reservation: 4096 + cpu_limit: 8096 + cpu_reservation: 4096 + max_connections: 10 disk: - - size: 1gb - type: thin - datastore: "{{ rw_datastore }}" + - size: 1gb + type: thin + datastore: "{{ rw_datastore }}" state: poweredoff folder: '{{ f0 }}' register: clone_d1_c1_f0 @@ -40,7 +40,7 @@ - name: assert that changes were made assert: that: - - clone_d1_c1_f0 is changed + - clone_d1_c1_f0 is changed - name: create the VM again vmware_guest: @@ -53,13 +53,13 @@ guest_id: centos64Guest datacenter: "{{ dc1 }}" hardware: - num_cpus: 1 - num_cpu_cores_per_socket: 1 - memory_mb: 128 + num_cpus: 1 + num_cpu_cores_per_socket: 1 + memory_mb: 128 disk: - - size: 1gb - type: thin - datastore: "{{ rw_datastore }}" + - size: 1gb + type: thin + datastore: "{{ rw_datastore }}" state: poweredoff folder: '{{ f0 }}' register: clone_d1_c1_f0_recreate @@ -69,7 +69,7 @@ - name: assert that no changes were made after re-creating assert: that: - - not (clone_d1_c1_f0_recreate is changed) + - not (clone_d1_c1_f0_recreate is changed) - name: modify the new VMs vmware_guest: @@ -82,8 +82,8 @@ guest_id: centos64Guest datacenter: "{{ dc1 }}" hardware: - num_cpus: 2 - memory_mb: 128 + num_cpus: 2 + memory_mb: 128 state: present folder: '{{ f0 }}' register: clone_d1_c1_f0_modify @@ -93,7 +93,7 @@ - name: assert that changes were made with modification assert: that: - - clone_d1_c1_f0_modify is changed + - clone_d1_c1_f0_modify is changed - name: re-modify the new VMs vmware_guest: @@ -106,8 +106,8 @@ guest_id: centos64Guest datacenter: "{{ dc1 }}" hardware: - num_cpus: 2 - memory_mb: 128 + num_cpus: 2 + memory_mb: 128 state: present folder: '{{ f0 }}' register: clone_d1_c1_f0_remodify @@ -117,7 +117,7 @@ - name: assert that no changes were made when re-modified assert: that: - - not (clone_d1_c1_f0_remodify is changed) + - not (clone_d1_c1_f0_remodify is changed) - name: delete the new VMs vmware_guest: @@ -138,7 +138,7 @@ - name: assert that changes were made with deletion assert: that: - - clone_d1_c1_f0_delete is changed + - clone_d1_c1_f0_delete is changed - name: re-delete the new VMs vmware_guest: @@ -159,4 +159,4 @@ - name: assert that no changes were made with redeletion assert: that: - - not (clone_d1_c1_f0_redelete is changed) + - not (clone_d1_c1_f0_redelete is changed) diff --git a/tests/integration/targets/vmware_guest/tasks/create_guest_invalid_d1_c1_f0.yml b/tests/integration/targets/vmware_guest/tasks/create_guest_invalid_d1_c1_f0.yml index a3ebdb0b..3f70bb8f 100644 --- a/tests/integration/targets/vmware_guest/tasks/create_guest_invalid_d1_c1_f0.yml +++ b/tests/integration/targets/vmware_guest/tasks/create_guest_invalid_d1_c1_f0.yml @@ -12,12 +12,12 @@ guest_id: "invalid_guest_id" datacenter: "{{ dc1 }}" hardware: - num_cpus: 1 - memory_mb: 128 + num_cpus: 1 + memory_mb: 128 disk: - - size: 1gb - type: thin - datastore: "{{ rw_datastore }}" + - size: 1gb + type: thin + datastore: "{{ rw_datastore }}" state: present folder: "{{ f0 }}" register: invalid_guest_0001_d1_c1_f0 @@ -26,5 +26,5 @@ - name: assert that changes were made assert: that: - - "not (invalid_guest_0001_d1_c1_f0 is changed)" - - "'configSpec.guestId' in invalid_guest_0001_d1_c1_f0['msg']" + - "not (invalid_guest_0001_d1_c1_f0 is changed)" + - "'configSpec.guestId' in invalid_guest_0001_d1_c1_f0['msg']" diff --git a/tests/integration/targets/vmware_guest/tasks/create_nw_d1_c1_f0.yml b/tests/integration/targets/vmware_guest/tasks/create_nw_d1_c1_f0.yml index dffd8d31..41dfbf86 100644 --- a/tests/integration/targets/vmware_guest/tasks/create_nw_d1_c1_f0.yml +++ b/tests/integration/targets/vmware_guest/tasks/create_nw_d1_c1_f0.yml @@ -12,20 +12,20 @@ guest_id: centos64Guest datacenter: "{{ dc1 }}" hardware: - num_cpus: 1 - memory_mb: 128 + num_cpus: 1 + memory_mb: 128 disk: - - size: 1gb - type: thin - datastore: "{{ rw_datastore }}" + - size: 1gb + type: thin + datastore: "{{ rw_datastore }}" networks: - - name: 'VM Network' - device_type: vmxnet3 - ip: 192.168.10.1 - netmask: 255.255.255.0 - wake_on_lan: true - start_connected: true - allow_guest_control: true + - name: 'VM Network' + device_type: vmxnet3 + ip: 192.168.10.1 + netmask: 255.255.255.0 + wake_on_lan: true + start_connected: true + allow_guest_control: true state: poweredoff folder: F0 register: clone_d1_c1_f0 @@ -35,4 +35,4 @@ - name: assert that changes were made assert: that: - - clone_d1_c1_f0 is changed + - clone_d1_c1_f0 is changed diff --git a/tests/integration/targets/vmware_guest/tasks/create_rp_d1_c1_f0.yml b/tests/integration/targets/vmware_guest/tasks/create_rp_d1_c1_f0.yml index ab2992d5..0e4458c4 100644 --- a/tests/integration/targets/vmware_guest/tasks/create_rp_d1_c1_f0.yml +++ b/tests/integration/targets/vmware_guest/tasks/create_rp_d1_c1_f0.yml @@ -10,13 +10,13 @@ guest_id: centos64Guest datacenter: "{{ dc1 }}" hardware: - version: 11 - num_cpus: 1 - memory_mb: 128 + version: 11 + num_cpus: 1 + memory_mb: 128 disk: - - size: 1gb - type: thin - datastore: "{{ rw_datastore }}" + - size: 1gb + type: thin + datastore: "{{ rw_datastore }}" state: poweredoff folder: F0 register: clone_rp_d1_c1_f0 @@ -47,7 +47,7 @@ - name: assert that changes were made with deletion assert: that: - - clone_rp_d1_c1_f0_delete is changed + - clone_rp_d1_c1_f0_delete is changed # now create with just a cluster - name: create new VM with default resource pool in cluster @@ -62,13 +62,13 @@ datacenter: "{{ dc1 }}" cluster: "{{ ccr1 }}" hardware: - version: 11 - num_cpus: 1 - memory_mb: 128 + version: 11 + num_cpus: 1 + memory_mb: 128 disk: - - size: 1gb - type: thin - datastore: "{{ rw_datastore }}" + - size: 1gb + type: thin + datastore: "{{ rw_datastore }}" state: poweredoff folder: F0 register: clone_rpc_d1_c1_f0 @@ -100,7 +100,7 @@ - name: assert that changes were made with deletion assert: that: - - clone_rpc_d1_c1_f0_delete is changed + - clone_rpc_d1_c1_f0_delete is changed # now create with a specific resource pool - name: create new VM with specific resource pool in cluster @@ -116,13 +116,13 @@ cluster: "{{ ccr1 }}" resource_pool: DC0_C0_RP1 hardware: - version: 11 - num_cpus: 1 - memory_mb: 128 + version: 11 + num_cpus: 1 + memory_mb: 128 disk: - - size: 1gb - type: thin - datastore: "{{ rw_datastore }}" + - size: 1gb + type: thin + datastore: "{{ rw_datastore }}" state: poweredoff folder: F0 register: clone_rpcp_d1_c1_f0 @@ -154,7 +154,7 @@ - name: assert that changes were made with deletion assert: that: - - clone_rpcp_d1_c1_f0_delete is changed + - clone_rpcp_d1_c1_f0_delete is changed # now create with a specific host - name: create new VM with specific host @@ -169,12 +169,12 @@ datacenter: "{{ dc1 }}" esxi_hostname: '{{ esxi1 }}' hardware: - num_cpus: 1 - memory_mb: 128 + num_cpus: 1 + memory_mb: 128 disk: - - size: 1gb - type: thin - datastore: "{{ rw_datastore }}" + - size: 1gb + type: thin + datastore: "{{ rw_datastore }}" state: poweredoff folder: F0 register: clone_rph_d1_c1_f0 @@ -205,4 +205,4 @@ - name: assert that changes were made with deletion assert: that: - - clone_rph_d1_c1_f0_delete is changed + - clone_rph_d1_c1_f0_delete is changed diff --git a/tests/integration/targets/vmware_guest/tasks/create_vm_using_special_characters.yml b/tests/integration/targets/vmware_guest/tasks/create_vm_using_special_characters.yml index acbe3186..3e6208f6 100644 --- a/tests/integration/targets/vmware_guest/tasks/create_vm_using_special_characters.yml +++ b/tests/integration/targets/vmware_guest/tasks/create_vm_using_special_characters.yml @@ -1,4 +1,3 @@ ---- - name: Create VM with special characters vmware_guest: hostname: "{{ vcenter_hostname }}" diff --git a/tests/integration/targets/vmware_guest/tasks/delete_vm.yml b/tests/integration/targets/vmware_guest/tasks/delete_vm.yml index c7944f8b..ad0575f2 100644 --- a/tests/integration/targets/vmware_guest/tasks/delete_vm.yml +++ b/tests/integration/targets/vmware_guest/tasks/delete_vm.yml @@ -31,16 +31,16 @@ guest_id: centos64Guest datacenter: "{{ dc1 }}" hardware: - num_cpus: 1 - num_cpu_cores_per_socket: 1 - memory_mb: 128 - hotadd_memory: true - hotadd_cpu: false - max_connections: 10 + num_cpus: 1 + num_cpu_cores_per_socket: 1 + memory_mb: 128 + hotadd_memory: true + hotadd_cpu: false + max_connections: 10 disk: - - size: 1gb - type: thin - datastore: "{{ rw_datastore }}" + - size: 1gb + type: thin + datastore: "{{ rw_datastore }}" state: poweredoff folder: '{{ f0 }}' register: clone_d1_c1_f0 @@ -61,7 +61,7 @@ - name: assert that VM was not deleted assert: that: - - not delete_vm.changed + - not delete_vm.changed - name: Delete VM using right parameters value vmware_guest: @@ -79,4 +79,4 @@ - name: assert that VM was deleted assert: that: - - delete_vm.changed + - delete_vm.changed diff --git a/tests/integration/targets/vmware_guest/tasks/disk_mode_d1_c1_f0.yml b/tests/integration/targets/vmware_guest/tasks/disk_mode_d1_c1_f0.yml index 83da8880..e0029212 100644 --- a/tests/integration/targets/vmware_guest/tasks/disk_mode_d1_c1_f0.yml +++ b/tests/integration/targets/vmware_guest/tasks/disk_mode_d1_c1_f0.yml @@ -12,13 +12,13 @@ guest_id: centos64Guest datacenter: "{{ dc1 }}" hardware: - num_cpus: 1 - memory_mb: 128 + num_cpus: 1 + memory_mb: 128 disk: - - size: 1gb - type: eagerzeroedthick - datastore: "{{ rw_datastore }}" - disk_mode: 'invalid_disk_mode' + - size: 1gb + type: eagerzeroedthick + datastore: "{{ rw_datastore }}" + disk_mode: 'invalid_disk_mode' state: poweredoff folder: "{{ f0 }}" register: test_vm1 @@ -29,7 +29,7 @@ - name: assert that changes were not made assert: that: - - not(test_vm1 is changed) + - not(test_vm1 is changed) - name: create new VMs with valid disk mode vmware_guest: @@ -41,13 +41,13 @@ guest_id: centos64Guest datacenter: "{{ dc1 }}" hardware: - num_cpus: 1 - memory_mb: 128 + num_cpus: 1 + memory_mb: 128 disk: - - size: 1gb - type: eagerzeroedthick - datastore: "{{ rw_datastore }}" - disk_mode: 'independent_persistent' + - size: 1gb + type: eagerzeroedthick + datastore: "{{ rw_datastore }}" + disk_mode: 'independent_persistent' state: poweredoff folder: "{{ f0 }}" register: test_vm1_2 @@ -57,7 +57,7 @@ - name: assert that changes were made assert: that: - - test_vm1_2 is changed + - test_vm1_2 is changed - name: create new VMs with valid disk mode again vmware_guest: diff --git a/tests/integration/targets/vmware_guest/tasks/disk_size_d1_c1_f0.yml b/tests/integration/targets/vmware_guest/tasks/disk_size_d1_c1_f0.yml index f3edea97..0acc829c 100644 --- a/tests/integration/targets/vmware_guest/tasks/disk_size_d1_c1_f0.yml +++ b/tests/integration/targets/vmware_guest/tasks/disk_size_d1_c1_f0.yml @@ -12,12 +12,12 @@ guest_id: centos64Guest datacenter: "{{ dc1 }}" hardware: - num_cpus: 1 - memory_mb: 128 + num_cpus: 1 + memory_mb: 128 disk: - - size: 0gb - type: eagerzeroedthick - datastore: "{{ rw_datastore }}" + - size: 0gb + type: eagerzeroedthick + datastore: "{{ rw_datastore }}" state: poweredoff folder: "{{ f0 }}" register: disk_size_d1_c1_f0 @@ -28,4 +28,4 @@ - name: assert that changes were made assert: that: - - not (disk_size_d1_c1_f0 is changed) + - not (disk_size_d1_c1_f0 is changed) diff --git a/tests/integration/targets/vmware_guest/tasks/disk_type_d1_c1_f0.yml b/tests/integration/targets/vmware_guest/tasks/disk_type_d1_c1_f0.yml index a84c61a9..f0e83c6d 100644 --- a/tests/integration/targets/vmware_guest/tasks/disk_type_d1_c1_f0.yml +++ b/tests/integration/targets/vmware_guest/tasks/disk_type_d1_c1_f0.yml @@ -12,15 +12,15 @@ guest_id: centos64Guest datacenter: "{{ dc1 }}" hardware: - num_cpus: 1 - memory_mb: 128 + num_cpus: 1 + memory_mb: 128 disk: - - size: 1gb - type: eagerzeroedthick - datastore: "{{ rw_datastore }}" - - size: 1gb - type: thin - datastore: "{{ rw_datastore }}" + - size: 1gb + type: eagerzeroedthick + datastore: "{{ rw_datastore }}" + - size: 1gb + type: thin + datastore: "{{ rw_datastore }}" state: poweredoff folder: F0 register: disk_type_d1_c1_f0 @@ -30,4 +30,4 @@ - name: assert that changes were made assert: that: - - disk_type_d1_c1_f0 is changed + - disk_type_d1_c1_f0 is changed diff --git a/tests/integration/targets/vmware_guest/tasks/mac_address_d1_c1_f0.yml b/tests/integration/targets/vmware_guest/tasks/mac_address_d1_c1_f0.yml index a41059cb..45e3b274 100644 --- a/tests/integration/targets/vmware_guest/tasks/mac_address_d1_c1_f0.yml +++ b/tests/integration/targets/vmware_guest/tasks/mac_address_d1_c1_f0.yml @@ -12,18 +12,18 @@ guest_id: centos64Guest datacenter: "{{ dc1 }}" hardware: - num_cpus: 1 - memory_mb: 128 + num_cpus: 1 + memory_mb: 128 disk: - - size: 1gb - type: thin - datastore: "{{ rw_datastore }}" + - size: 1gb + type: thin + datastore: "{{ rw_datastore }}" networks: - - name: VM Network - ip: 192.168.10.12 - netmask: 255.255.255.0 - gateway: 192.168.10.254 - mac: aa:bb:cc:dd:aa:42 + - name: VM Network + ip: 192.168.10.12 + netmask: 255.255.255.0 + gateway: 192.168.10.254 + mac: aa:bb:cc:dd:aa:42 state: poweredoff folder: vm register: clone_d1_c1_f0 @@ -33,5 +33,5 @@ - name: assert that changes were made assert: that: - - "clone_d1_c1_f0['instance']['hw_eth0']['addresstype'] == 'manual'" - - "clone_d1_c1_f0['instance']['hw_eth0']['macaddress'] == 'aa:bb:cc:dd:aa:42'" + - "clone_d1_c1_f0['instance']['hw_eth0']['addresstype'] == 'manual'" + - "clone_d1_c1_f0['instance']['hw_eth0']['macaddress'] == 'aa:bb:cc:dd:aa:42'" diff --git a/tests/integration/targets/vmware_guest/tasks/multiple_disk_controllers_d1_c1_f0.yml b/tests/integration/targets/vmware_guest/tasks/multiple_disk_controllers_d1_c1_f0.yml index 1c783e4a..9feddfb9 100644 --- a/tests/integration/targets/vmware_guest/tasks/multiple_disk_controllers_d1_c1_f0.yml +++ b/tests/integration/targets/vmware_guest/tasks/multiple_disk_controllers_d1_c1_f0.yml @@ -18,16 +18,16 @@ memory_mb: 512 num_cpus: 1 disk: - - controller_type: lsilogicsas - controller_number: 0 - unit_number: 0 - size_mb: 512 - type: thin - - controller_type: paravirtual - controller_number: 1 - unit_number: 0 - size_mb: 256 - type: eagerzeroedthick + - controller_type: lsilogicsas + controller_number: 0 + unit_number: 0 + size_mb: 512 + type: thin + - controller_type: paravirtual + controller_number: 1 + unit_number: 0 + size_mb: 256 + type: eagerzeroedthick register: multi_scsi_disk_vm - debug: var=multi_scsi_disk_vm @@ -51,15 +51,15 @@ datastore: "{{ rw_datastore }}" state: present disk: - - controller_type: lsilogicsas - controller_number: 0 - unit_number: 0 - size_mb: 512 - disk_mode: independent_persistent - - controller_type: paravirtual - controller_number: 1 - unit_number: 0 - size_mb: 512 + - controller_type: lsilogicsas + controller_number: 0 + unit_number: 0 + size_mb: 512 + disk_mode: independent_persistent + - controller_type: paravirtual + controller_number: 1 + unit_number: 0 + size_mb: 512 register: multi_scsi_disk_vm - debug: var=multi_scsi_disk_vm @@ -86,19 +86,19 @@ memory_mb: 512 num_cpus: 1 disk: - - controller_type: sata - controller_number: 0 - unit_number: 0 - size_mb: 512 - disk_mode: independent_persistent - - controller_type: sata - controller_number: 1 - unit_number: 0 - size_mb: 256 - - controller_type: sata - controller_number: 2 - unit_number: 0 - size_mb: 256 + - controller_type: sata + controller_number: 0 + unit_number: 0 + size_mb: 512 + disk_mode: independent_persistent + - controller_type: sata + controller_number: 1 + unit_number: 0 + size_mb: 256 + - controller_type: sata + controller_number: 2 + unit_number: 0 + size_mb: 256 register: multi_sata_disk_vm - debug: var=multi_sata_disk_vm @@ -122,15 +122,15 @@ state: present datastore: "{{ rw_datastore }}" disk: - - controller_type: sata - controller_number: 0 - unit_number: 0 - size_mb: 512 - disk_mode: persistent - - controller_type: sata - controller_number: 1 - unit_number: 0 - size_mb: 512 + - controller_type: sata + controller_number: 0 + unit_number: 0 + size_mb: 512 + disk_mode: persistent + - controller_type: sata + controller_number: 1 + unit_number: 0 + size_mb: 512 register: multi_sata_disk_vm - debug: var=multi_sata_disk_vm @@ -158,19 +158,19 @@ num_cpus: 1 version: 14 disk: - - controller_type: nvme - controller_number: 0 - unit_number: 0 - size_mb: 512 - - controller_type: nvme - controller_number: 1 - unit_number: 0 - size_mb: 256 - type: thin - - controller_type: nvme - controller_number: 2 - unit_number: 0 - size_mb: 256 + - controller_type: nvme + controller_number: 0 + unit_number: 0 + size_mb: 512 + - controller_type: nvme + controller_number: 1 + unit_number: 0 + size_mb: 256 + type: thin + - controller_type: nvme + controller_number: 2 + unit_number: 0 + size_mb: 256 register: multi_nvme_disk_vm - debug: var=multi_nvme_disk_vm @@ -194,18 +194,18 @@ state: present datastore: "{{ rw_datastore }}" disk: - - controller_type: nvme - controller_number: 0 - unit_number: 1 - size_mb: 512 - - controller_type: sata - controller_number: 1 - unit_number: 0 - size_mb: 256 - - controller_type: paravirtual - controller_number: 0 - unit_number: 0 - size_mb: 256 + - controller_type: nvme + controller_number: 0 + unit_number: 1 + size_mb: 512 + - controller_type: sata + controller_number: 1 + unit_number: 0 + size_mb: 256 + - controller_type: paravirtual + controller_number: 0 + unit_number: 0 + size_mb: 256 register: multi_nvme_disk_vm - debug: var=multi_nvme_disk_vm diff --git a/tests/integration/targets/vmware_guest/tasks/network_negative_test.yml b/tests/integration/targets/vmware_guest/tasks/network_negative_test.yml index 99b9bcbe..985df71a 100644 --- a/tests/integration/targets/vmware_guest/tasks/network_negative_test.yml +++ b/tests/integration/targets/vmware_guest/tasks/network_negative_test.yml @@ -20,8 +20,8 @@ networks: - name: "Non existent VM" hardware: - num_cpus: 1 - memory_mb: 128 + num_cpus: 1 + memory_mb: 128 state: poweredoff folder: "{{ f0 }}" register: non_existent_network @@ -32,8 +32,8 @@ - name: assert that no changes were not made assert: that: - - not (non_existent_network is changed) - - "'does not exist' in non_existent_network.msg" + - not (non_existent_network is changed) + - "'does not exist' in non_existent_network.msg" - name: create new VMs with network and with only IP vmware_guest: @@ -53,8 +53,8 @@ type: static ip: 10.10.10.10 hardware: - num_cpus: 1 - memory_mb: 128 + num_cpus: 1 + memory_mb: 128 state: poweredoff folder: "{{ f0 }}" register: no_netmask @@ -65,8 +65,8 @@ - name: assert that no changes were not made assert: that: - - "not no_netmask.changed" - - "\"'netmask' is required if 'ip' is specified under VM network list.\" in no_netmask.msg" + - "not no_netmask.changed" + - "\"'netmask' is required if 'ip' is specified under VM network list.\" in no_netmask.msg" - name: create new VMs with network and with only netmask vmware_guest: @@ -86,8 +86,8 @@ type: static netmask: 255.255.255.0 hardware: - num_cpus: 1 - memory_mb: 128 + num_cpus: 1 + memory_mb: 128 state: poweredoff folder: "{{ f0 }}" register: no_ip @@ -98,8 +98,8 @@ - name: assert that changes were not made assert: that: - - "not no_ip.changed" - - "\"'ip' is required if 'netmask' is specified under VM network list.\" in no_ip.msg" + - "not no_ip.changed" + - "\"'ip' is required if 'netmask' is specified under VM network list.\" in no_ip.msg" - name: create new VMs with network and without network name vmware_guest: @@ -119,8 +119,8 @@ netmask: 255.255.255 type: static hardware: - num_cpus: 1 - memory_mb: 128 + num_cpus: 1 + memory_mb: 128 state: poweredoff folder: "{{ f0 }}" register: no_network_name @@ -131,8 +131,8 @@ - name: assert that no changes were not made assert: that: - - "not no_network_name.changed" - - "\"Please specify at least a network name or a VLAN name under VM network list.\" in no_network_name.msg" + - "not no_network_name.changed" + - "\"Please specify at least a network name or a VLAN name under VM network list.\" in no_network_name.msg" - name: create new VMs with network and without network name vmware_guest: @@ -152,8 +152,8 @@ ip: 10.10.10.10 netmask: 255.255.255 hardware: - num_cpus: 1 - memory_mb: 128 + num_cpus: 1 + memory_mb: 128 state: poweredoff folder: "{{ f0 }}" register: no_network @@ -164,8 +164,8 @@ - name: assert that changes were not made assert: that: - - "not no_network.changed" - - "\"VLAN 'non_existing_vlan' does not exist.\" in no_network.msg" + - "not no_network.changed" + - "\"VLAN 'non_existing_vlan' does not exist.\" in no_network.msg" - name: create new VMs with invalid device type vmware_guest: @@ -186,8 +186,8 @@ netmask: 255.255.255 device_type: abc hardware: - num_cpus: 1 - memory_mb: 128 + num_cpus: 1 + memory_mb: 128 state: poweredoff folder: "{{ f0 }}" register: invalid_device_type @@ -198,8 +198,8 @@ - name: assert that changes were not made assert: that: - - "not invalid_device_type.changed" - - "\"Device type specified 'abc' is not valid.\" in invalid_device_type.msg" + - "not invalid_device_type.changed" + - "\"Device type specified 'abc' is not valid.\" in invalid_device_type.msg" - name: create new VMs with invalid device MAC address vmware_guest: @@ -221,8 +221,8 @@ device_type: e1000 mac: abcdef hardware: - num_cpus: 1 - memory_mb: 128 + num_cpus: 1 + memory_mb: 128 state: poweredoff folder: "{{ f0 }}" register: invalid_mac @@ -233,8 +233,8 @@ - name: assert that changes were not made assert: that: - - "not invalid_mac.changed" - - "\"Device MAC address 'abcdef' is invalid.\" in invalid_mac.msg" + - "not invalid_mac.changed" + - "\"Device MAC address 'abcdef' is invalid.\" in invalid_mac.msg" - name: create new VMs with invalid network type vmware_guest: @@ -257,8 +257,8 @@ mac: 01:23:45:67:89:ab type: aaaaa hardware: - num_cpus: 1 - memory_mb: 128 + num_cpus: 1 + memory_mb: 128 state: poweredoff folder: "{{ f0 }}" register: invalid_network_type @@ -269,8 +269,8 @@ - name: assert that changes were not made assert: that: - - "not invalid_network_type.changed" - - "\"Network type 'aaaaa' is not a valid parameter.\" in invalid_network_type.msg" + - "not invalid_network_type.changed" + - "\"Network type 'aaaaa' is not a valid parameter.\" in invalid_network_type.msg" - name: create new VMs with IP, netmask and network type as "DHCP" vmware_guest: @@ -293,8 +293,8 @@ mac: 01:23:45:67:89:ab type: dhcp hardware: - num_cpus: 1 - memory_mb: 128 + num_cpus: 1 + memory_mb: 128 state: poweredoff folder: "{{ f0 }}" register: invalid_dhcp_network_type @@ -305,8 +305,8 @@ - name: assert that changes were not made assert: that: - - "not invalid_dhcp_network_type.changed" - - "\"Static IP information provided for network\" in invalid_dhcp_network_type.msg" + - "not invalid_dhcp_network_type.changed" + - "\"Static IP information provided for network\" in invalid_dhcp_network_type.msg" - name: create new VMs with no network type which set network type as "DHCP" vmware_guest: @@ -324,8 +324,8 @@ networks: - name: "VM Network" hardware: - num_cpus: 1 - memory_mb: 128 + num_cpus: 1 + memory_mb: 128 state: poweredoff folder: "{{ f0 }}" register: no_network_type @@ -336,4 +336,4 @@ - name: assert that changes were made assert: that: - - "no_network_type.changed" + - "no_network_type.changed" diff --git a/tests/integration/targets/vmware_guest/tasks/reconfig_vm_to_latest_version.yml b/tests/integration/targets/vmware_guest/tasks/reconfig_vm_to_latest_version.yml index a3acc6d1..e7831760 100644 --- a/tests/integration/targets/vmware_guest/tasks/reconfig_vm_to_latest_version.yml +++ b/tests/integration/targets/vmware_guest/tasks/reconfig_vm_to_latest_version.yml @@ -15,16 +15,16 @@ folder: "{{ f0 }}" datastore: '{{ rw_datastore }}' hardware: - num_cpus: 1 - memory_mb: 1028 - version: 12 + num_cpus: 1 + memory_mb: 1028 + version: 12 state: present register: create_vm_with_version_12 - name: assert that changes were made assert: that: - - create_vm_with_version_12 is changed + - create_vm_with_version_12 is changed - name: Deploy New VM with latest hardware version vmware_guest: @@ -38,16 +38,16 @@ folder: "{{ f0 }}" datastore: '{{ rw_datastore }}' hardware: - num_cpus: 1 - memory_mb: 1028 - version: latest + num_cpus: 1 + memory_mb: 1028 + version: latest state: present register: deploy_vm_to_latest - name: assert that changes were made assert: that: - - deploy_vm_to_latest is changed + - deploy_vm_to_latest is changed - name: Upgrade VM to latest version in check mode vmware_guest: @@ -61,9 +61,9 @@ folder: "{{ f0 }}" datastore: '{{ rw_datastore }}' hardware: - num_cpus: 1 - memory_mb: 1028 - version: latest + num_cpus: 1 + memory_mb: 1028 + version: latest state: present register: upgrade_vm check_mode: true @@ -71,7 +71,7 @@ - name: assert that changes would be made assert: that: - - upgrade_vm is changed + - upgrade_vm is changed - name: Upgrade VM to latest version vmware_guest: @@ -85,13 +85,13 @@ folder: "{{ f0 }}" datastore: '{{ rw_datastore }}' hardware: - num_cpus: 1 - memory_mb: 1028 - version: latest + num_cpus: 1 + memory_mb: 1028 + version: latest state: present register: upgrade_vm - name: assert that changes were made assert: that: - - upgrade_vm is changed + - upgrade_vm is changed diff --git a/tests/integration/targets/vmware_guest/tasks/remove_vm_from_inventory.yml b/tests/integration/targets/vmware_guest/tasks/remove_vm_from_inventory.yml index 2dcc6782..1d815082 100644 --- a/tests/integration/targets/vmware_guest/tasks/remove_vm_from_inventory.yml +++ b/tests/integration/targets/vmware_guest/tasks/remove_vm_from_inventory.yml @@ -26,7 +26,7 @@ - name: assert that changes were made assert: that: - - create_vm_for_test is changed + - create_vm_for_test is changed - name: Remove VM from Inventory vmware_guest: @@ -42,7 +42,7 @@ - name: assert that changes were made assert: that: - - remove_vm_from_inventory is changed + - remove_vm_from_inventory is changed - name: Remove VM again from Inventory vmware_guest: @@ -58,4 +58,4 @@ - name: assert that changes were made assert: that: - - not (remove_again_vm_from_inventory is changed) + - not (remove_again_vm_from_inventory is changed) diff --git a/tests/integration/targets/vmware_guest/tasks/run_test_playbook.yml b/tests/integration/targets/vmware_guest/tasks/run_test_playbook.yml index 07f9230e..501a9e86 100644 --- a/tests/integration/targets/vmware_guest/tasks/run_test_playbook.yml +++ b/tests/integration/targets/vmware_guest/tasks/run_test_playbook.yml @@ -1,5 +1,5 @@ - block: - - include_tasks: '{{ test_playbook }}' + - include_tasks: '{{ test_playbook }}' always: - name: Collect the list of the existing VM vmware.vmware_rest.vcenter_vm_info: diff --git a/tests/integration/targets/vmware_guest/tasks/vapp_d1_c1_f0.yml b/tests/integration/targets/vmware_guest/tasks/vapp_d1_c1_f0.yml index 05b3950f..76b63f05 100644 --- a/tests/integration/targets/vmware_guest/tasks/vapp_d1_c1_f0.yml +++ b/tests/integration/targets/vmware_guest/tasks/vapp_d1_c1_f0.yml @@ -21,20 +21,20 @@ num_cpus: 1 scsi: paravirtual disk: - - size_mb: 128 - type: thin - datastore: "{{ rw_datastore }}" + - size_mb: 128 + type: thin + datastore: "{{ rw_datastore }}" vapp_properties: - - id: prop_id1 - category: category - label: prop_label1 - type: string - value: prop_value1 - - id: prop_id2 - category: category - label: prop_label2 - type: string - value: prop_value2 + - id: prop_id1 + category: category + label: prop_label1 + type: string + value: prop_value1 + - id: prop_id2 + category: category + label: prop_label2 + type: string + value: prop_value2 register: vapp_vm - debug: var=vapp_vm @@ -68,10 +68,10 @@ name: test_vm1 datacenter: "{{ dc1 }}" vapp_properties: - - id: prop_id1 - operation: remove - - id: prop_id2 - value: prop_value3 + - id: prop_id1 + operation: remove + - id: prop_id2 + value: prop_value3 state: present register: vapp_vm diff --git a/tests/integration/targets/vmware_guest/tasks/windows_vbs_d1_c1_f0.yml b/tests/integration/targets/vmware_guest/tasks/windows_vbs_d1_c1_f0.yml index af72c9fe..a7a30542 100644 --- a/tests/integration/targets/vmware_guest/tasks/windows_vbs_d1_c1_f0.yml +++ b/tests/integration/targets/vmware_guest/tasks/windows_vbs_d1_c1_f0.yml @@ -18,13 +18,13 @@ boot_firmware: efi scsi: paravirtual disk: - - size_mb: 128 - type: thin - datastore: '{{ rw_datastore }}' + - size_mb: 128 + type: thin + datastore: '{{ rw_datastore }}' cdrom: - - controller_number: 0 - unit_number: 0 - type: client + - controller_number: 0 + unit_number: 0 + type: client register: vbs_vm - debug: var=vbs_vm @@ -54,13 +54,13 @@ boot_firmware: efi scsi: paravirtual disk: - - size_mb: 128 - type: thin - datastore: '{{ rw_datastore }}' + - size_mb: 128 + type: thin + datastore: '{{ rw_datastore }}' cdrom: - - controller_number: 0 - unit_number: 0 - type: client + - controller_number: 0 + unit_number: 0 + type: client register: vbs_vm - debug: var=vbs_vm @@ -81,9 +81,9 @@ name: vbs-Test2 datacenter: "{{ f0 }}" disk: - - size_mb: 256 - type: thin - datastore: '{{ rw_datastore }}' + - size_mb: 256 + type: thin + datastore: '{{ rw_datastore }}' hardware: virt_based_security: true state: present @@ -107,9 +107,9 @@ name: vbs-Test2 datacenter: "{{ f0 }}" disk: - - size_mb: 256 - type: thin - datastore: '{{ rw_datastore }}' + - size_mb: 256 + type: thin + datastore: '{{ rw_datastore }}' hardware: virt_based_security: true state: present