1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

kubevirt: Fix cloud_init in kubevirt_vm (#52999)

This commit is contained in:
Ondra Machacek 2019-03-01 11:06:17 +01:00 committed by John R Barker
parent ccad79d162
commit b54f2799f1
2 changed files with 6 additions and 4 deletions

View file

@ -255,12 +255,14 @@ class KubeVirtRawModule(KubernetesRawModule):
if machine_type: if machine_type:
template_spec['domain']['machine']['type'] = 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 # Define disks
self._define_disks(disks, template_spec) 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: # Define interfaces:
self._define_interfaces(interfaces, template_spec) self._define_interfaces(interfaces, template_spec)

View file

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