mirror of
https://github.com/kubevirt/kubevirt.core.git
synced 2026-03-26 19:03:16 +00:00
kubevirt_vm: Allow to specify template spec
By allowing to specify the template spec unnecessary abstraction is avoided. The following module args are replaced by the 'spec' arg: - termination_grace_period - interfaces - networks - volumes Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
This commit is contained in:
8
examples/play-create-min.yml
Normal file
8
examples/play-create-min.yml
Normal file
@@ -0,0 +1,8 @@
|
||||
- hosts: localhost
|
||||
tasks:
|
||||
- name: Create VM
|
||||
kubernetes.kubevirt.kubevirt_vm:
|
||||
state: present
|
||||
name: testvm
|
||||
namespace: default
|
||||
running: no
|
||||
@@ -11,26 +11,29 @@
|
||||
name: u1.medium
|
||||
preference:
|
||||
name: fedora
|
||||
interfaces:
|
||||
- name: default
|
||||
masquerade: {}
|
||||
- name: bridge-network
|
||||
bridge: {}
|
||||
networks:
|
||||
- name: default
|
||||
pod: {}
|
||||
- name: bridge-network
|
||||
multus:
|
||||
networkName: kindexgw
|
||||
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
|
||||
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/fedora:latest
|
||||
name: containerdisk
|
||||
- cloudInitNoCloud:
|
||||
userData: |-
|
||||
#cloud-config
|
||||
# The default username is: fedora
|
||||
ssh_authorized_keys:
|
||||
- ssh-ed25519 AAAA...
|
||||
name: cloudinit
|
||||
wait: yes
|
||||
|
||||
Reference in New Issue
Block a user