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>
This commit is contained in:
Felix Matouschek
2024-03-01 15:33:01 +01:00
parent b928cb5b29
commit ed642885ab
4 changed files with 26 additions and 28 deletions

View File

@@ -4,21 +4,18 @@
gather_facts: false
hosts: localhost
tasks:
- name: Create a VirtualMachine
- name: Create a VM
kubevirt.core.kubevirt_vm:
state: present
name: testvm3
name: testvm
namespace: default
labels:
app: test
wait: true
wait_timeout: 600
instancetype:
name: u1.small
preference:
name: centos.stream9
spec:
domain:
cpu:
sockets: 1
memory:
guest: 1536Mi
devices:
interfaces:
- name: default
@@ -39,5 +36,7 @@
userData: |-
#cloud-config
ssh_authorized_keys:
- {{ lookup('file', 'pub_key') }}
name: cloudinit
- {{ lookup('file', 'testkey.pub') }}
name: cloudinitdisk
wait: true
wait_timeout: 600