From 657224ccfea9fcde88875aa74e7ed00570ee586b Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Wed, 5 Jan 2022 00:34:50 +0100 Subject: vm/deploy: improved handling of primary disk --- roles/vm/guest/deploy/defaults/main.yml | 3 +++ roles/vm/guest/deploy/tasks/main.yml | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'roles/vm/guest') diff --git a/roles/vm/guest/deploy/defaults/main.yml b/roles/vm/guest/deploy/defaults/main.yml index c067ecbc..63deb439 100644 --- a/roles/vm/guest/deploy/defaults/main.yml +++ b/roles/vm/guest/deploy/defaults/main.yml @@ -5,3 +5,6 @@ vm_deploy_decompressors: "application/zstd": unzstd "application/x-bzip2": bunzip2 "application/x-xz": unxz + +# vm_deploy_primary_disk: +# path: /srv/root.img diff --git a/roles/vm/guest/deploy/tasks/main.yml b/roles/vm/guest/deploy/tasks/main.yml index f22af8af..5fb5b56f 100644 --- a/roles/vm/guest/deploy/tasks/main.yml +++ b/roles/vm/guest/deploy/tasks/main.yml @@ -7,7 +7,6 @@ register: output_image_info ## TODO: prepare directory for disk images - ## TODO: compute disk path based on install.disks.primary and install.disks.(scsi|virtio) ## TODO: actually call this directly and make file replacement atomic!! ## Probably by writing and action plugin based on this: https://github.com/socratesx/Ansible-Decompress - name: copy disk image @@ -15,7 +14,7 @@ prompt: | Please copy the image to the vm-host i.e. by calling this: - cat {{ output_image_info.stat.path }} | {{ vm_deploy_decompressors[output_image_info.stat.mimetype] }} | ssh {{ vm_host.name }} 'cat > {{ install.disks.scsi.sda.path }}' + cat {{ output_image_info.stat.path }} | {{ vm_deploy_decompressors[output_image_info.stat.mimetype] }} | ssh {{ vm_host.name }} 'cat > {{ vm_deploy_primary_disk.path }}' When done press ENTER to continue or CTRL-C then A to abort. -- cgit v1.2.3