From 491f325611c5c2038e27e0604252f44d6285f23d Mon Sep 17 00:00:00 2001 From: guppy Date: Wed, 17 May 2023 09:04:09 +0200 Subject: [PATCH] fix cloud-init issue --- ansible/create-vm-template.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ansible/create-vm-template.yaml b/ansible/create-vm-template.yaml index 8d59c3a..5785eae 100644 --- a/ansible/create-vm-template.yaml +++ b/ansible/create-vm-template.yaml @@ -27,7 +27,6 @@ - name: Install Cloud-init apt: name: - - cloud-init - libguestfs-tools become: yes @@ -37,6 +36,10 @@ state: directory mode: '0755' + - name: Install cloud-init on img + command: "virt-customize -a {{ vm.cloud_image_path }} --install cloud-init" + become: yes + - name: Install QEMU agent on img command: "virt-customize -a {{ vm.cloud_image_path }} --install qemu-guest-agent" become: yes