Files
kubevirt.core/tests/integration/targets/kubevirt_vm/playbook.yml
Felix Matouschek ed642885ab ci: Cleanup kubevirt_vm integration test
- Use uniform way of naming plays, tasks and VMs
- Use uniform way of ordering task parameters
- Use defaults where possible
- Use CentOS 9 Stream instancetype and preference
- Generate SSH private key with empty password (-N "")
- Disable strict host key checking
- Add .gitignore for test files
- Fix skipping test key creation if already existent

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-03-04 14:02:08 +01:00

43 lines
1.1 KiB
YAML

---
- name: Create VM
connection: local
gather_facts: false
hosts: localhost
tasks:
- name: Create a VM
kubevirt.core.kubevirt_vm:
name: testvm
namespace: default
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: kindexgw
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