mirror of
https://github.com/kubevirt/kubevirt.core.git
synced 2026-07-25 00:44:35 +00:00
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>
This commit is contained in:
2
examples/default.kubevirt.yml
Normal file
2
examples/default.kubevirt.yml
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
---
|
||||||
|
plugin: kubevirt.core.kubevirt
|
||||||
29
examples/play-create-stopped.yml
Normal file
29
examples/play-create-stopped.yml
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
---
|
||||||
|
- 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
|
||||||
Reference in New Issue
Block a user