Files
kubevirt.core/tests/integration/targets/kubevirt_vm/playbook.yml.j2
Felix Matouschek 71ea312cfc kubevirt_vm: Run integration test in random namespace
Run the integration tests for kubevirt_vm in a random namespace
and cleanup after the tests finish.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-08-16 08:37:36 +02:00

43 lines
1.1 KiB
Django/Jinja

---
- name: Create VM
connection: local
gather_facts: false
hosts: localhost
tasks:
- name: Create a VM
kubevirt.core.kubevirt_vm:
name: testvm
namespace: {{ NAMESPACE }}
labels:
app: test
instancetype:
name: u1.small
preference:
name: centos.stream9
spec:
domain:
devices:
interfaces:
- name: default
masquerade: {}
- name: bridge-network
bridge: {}
networks:
- name: default
pod: {}
- name: bridge-network
multus:
networkName: {{ SECONDARY_NETWORK }}
volumes:
- containerDisk:
image: quay.io/containerdisks/centos-stream:9
name: containerdisk
- cloudInitNoCloud:
userData: |-
#cloud-config
ssh_authorized_keys:
- {{ '{{' }} lookup('file', 'testkey.pub') {{ '}}' }}
name: cloudinitdisk
wait: true
wait_timeout: 600