mirror of
https://github.com/kubevirt/kubevirt.core.git
synced 2026-11-23 07:30:20 +00:00
ansible-core 2.23 requires Python >= 3.10 on targets, CentOS Stream 9 only ships 3.9. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
43 lines
1.1 KiB
Django/Jinja
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.stream10
|
|
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:10
|
|
name: containerdisk
|
|
- cloudInitNoCloud:
|
|
userData: |-
|
|
#cloud-config
|
|
ssh_authorized_keys:
|
|
- {{ '{{' }} lookup('file', 'testkey.pub') {{ '}}' }}
|
|
name: cloudinitdisk
|
|
wait: true
|
|
wait_timeout: 600
|