mirror of
https://github.com/kubevirt/kubevirt.core.git
synced 2026-11-21 22:50:21 +00:00
tests: Cleanup after inventory test
Cleanup the created the created VMs after the inventory integration tests collected the inventory test results to not leave running VMs behind after the test finished. Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
---
|
||||
- name: Create VMs
|
||||
connection: local
|
||||
gather_facts: false
|
||||
hosts: localhost
|
||||
tasks:
|
||||
- name: Create a VM
|
||||
kubevirt.core.kubevirt_vm:
|
||||
state: absent
|
||||
name: testvm1
|
||||
namespace: default
|
||||
wait: true
|
||||
|
||||
- name: Create another VM
|
||||
kubevirt.core.kubevirt_vm:
|
||||
state: absent
|
||||
name: testvm2
|
||||
namespace: default
|
||||
wait: true
|
||||
@@ -13,4 +13,6 @@ ansible-inventory -i test.kubevirt.yml -y --list --output all.yml "$@"
|
||||
ansible-inventory -i test.label.kubevirt.yml -y --list --output label.yml "$@"
|
||||
ansible-inventory -i test.net.kubevirt.yml -y --list --output net.yml "$@"
|
||||
|
||||
ansible-playbook cleanup.yml "$@"
|
||||
|
||||
ansible-playbook verify.yml "$@"
|
||||
|
||||
Reference in New Issue
Block a user