Files
kubevirt.core/examples/play-create-stopped.yml
Felix Matouschek 5e1271b609 chore(inventory): Add examples for stopped VMs
Add examples that show how to use the collection with stopped VMs.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-07-03 16:04:51 +02:00

30 lines
805 B
YAML

---
- name: Playbook creating a stopped virtual machine
hosts: localhost
tasks:
- name: Create VM
kubevirt.core.kubevirt_vm:
state: present
name: testvm-stopped
namespace: default
running: false
instancetype:
name: u1.medium
preference:
name: fedora
spec:
domain:
devices: {}
volumes:
- containerDisk:
image: quay.io/containerdisks/fedora:latest
name: containerdisk
- cloudInitNoCloud:
userData: |-
#cloud-config
# The default username is: fedora
ssh_authorized_keys:
- ssh-ed25519 AAAA...
name: cloudinit
wait: true