kubevirt: Fix cloud_init in kubevirt_vm (#52999)

pull/53173/head
Ondra Machacek 6 years ago committed by John R Barker
parent ccad79d162
commit b54f2799f1

@ -255,12 +255,14 @@ class KubeVirtRawModule(KubernetesRawModule):
if machine_type:
template_spec['domain']['machine']['type'] = machine_type
# Define cloud init disk if defined:
self._define_cloud_init(cloud_init_nocloud, template_spec)
# Define disks
self._define_disks(disks, template_spec)
# Define cloud init disk if defined:
# Note, that this must be called after _define_disks, so the cloud_init
# is not first in order and it's not used as boot disk:
self._define_cloud_init(cloud_init_nocloud, template_spec)
# Define interfaces:
self._define_interfaces(interfaces, template_spec)

@ -159,8 +159,8 @@ EXAMPLES = '''
namespace: vms
memory: 1024M
cloud_init_nocloud:
#cloud-config
userData: |-
#cloud-config
password: fedora
chpasswd: { expire: False }
disks:

Loading…
Cancel
Save