summaryrefslogtreecommitdiff
path: root/roles
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2022-01-05 00:34:50 +0100
committerChristian Pointner <equinox@spreadspace.org>2022-01-05 00:34:50 +0100
commit657224ccfea9fcde88875aa74e7ed00570ee586b (patch)
treeee77a8c160adee6805090e3dc302b70bd92eea2e /roles
parentMerge branch 'topic/openwrt-vm' (diff)
vm/deploy: improved handling of primary disk
Diffstat (limited to 'roles')
-rw-r--r--roles/vm/guest/deploy/defaults/main.yml3
-rw-r--r--roles/vm/guest/deploy/tasks/main.yml3
2 files changed, 4 insertions, 2 deletions
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.