summaryrefslogtreecommitdiff
path: root/roles/vm/guest/deploy/tasks/main.yml
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2022-01-04 14:39:23 +0100
committerChristian Pointner <equinox@spreadspace.org>2022-01-04 14:39:23 +0100
commitc3df634ef65332b68a509c4651a0eb8657642321 (patch)
treea8555a07e1490f15cbd0b09f03f2f0c9d956f135 /roles/vm/guest/deploy/tasks/main.yml
parentsensor: i2c bus detection using regex for name (diff)
parentadd some todo docs (diff)
Merge branch 'topic/openwrt-vm'
Diffstat (limited to 'roles/vm/guest/deploy/tasks/main.yml')
-rw-r--r--roles/vm/guest/deploy/tasks/main.yml27
1 files changed, 27 insertions, 0 deletions
diff --git a/roles/vm/guest/deploy/tasks/main.yml b/roles/vm/guest/deploy/tasks/main.yml
new file mode 100644
index 00000000..f22af8af
--- /dev/null
+++ b/roles/vm/guest/deploy/tasks/main.yml
@@ -0,0 +1,27 @@
+---
+- name: fetch infos from image file
+ delegate_to: localhost
+ stat:
+ path: "{{ output_images | first }}"
+ get_mime: yes
+ 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
+ pause:
+ 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 }}'
+
+ When done press ENTER to continue or CTRL-C then A to abort.
+
+- name: define vm
+ vars:
+ vm_define_installer: no
+ delegate_to: "{{ vm_host.name }}"
+ import_role:
+ name: vm/guest/define