From a037fbe8654f1b311c1f87210d02555c4a0abf76 Mon Sep 17 00:00:00 2001 From: Andrey Gubarev Date: Thu, 25 May 2023 08:29:01 +0400 Subject: [PATCH] add cloud-init --- molecule_qemu/playbooks/create.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/molecule_qemu/playbooks/create.yml b/molecule_qemu/playbooks/create.yml index 48e2490..d0cee39 100644 --- a/molecule_qemu/playbooks/create.yml +++ b/molecule_qemu/playbooks/create.yml @@ -108,10 +108,12 @@ - name: Launch VMs # noqa: no-changed-when ansible.builtin.command: > qemu-system-{{ item.vm_arch }} - -m {{ item.vm_memory }} + -boot d + -cdrom {{ molecule_ephemeral_directory }}/run/cloud-init/{{ item.name }}.iso -hda {{ item.vm_run_diskfile }} - -net user,hostfwd=tcp::{{ item.vm_ssh_port }}-:22 + -m {{ item.vm_memory }} -net nic + -net user,hostfwd=tcp::{{ item.vm_ssh_port }}-:22 -display none -daemonize -pidfile {{ item.vm_run_pidfile }}