From 8427c4bf08ab2d3afa590cef5dcf7087674c2b91 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Wed, 5 Jan 2022 00:53:41 +0100 Subject: vm/deploy: create containing dir for primary disk image --- roles/vm/guest/deploy/tasks/main.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'roles/vm/guest/deploy/tasks') diff --git a/roles/vm/guest/deploy/tasks/main.yml b/roles/vm/guest/deploy/tasks/main.yml index 5fb5b56f..f203fdff 100644 --- a/roles/vm/guest/deploy/tasks/main.yml +++ b/roles/vm/guest/deploy/tasks/main.yml @@ -6,7 +6,12 @@ get_mime: yes register: output_image_info - ## TODO: prepare directory for disk images +- name: make sure primary disk image path exists + delegate_to: "{{ vm_host.name }}" + file: + path: "{{ vm_deploy_primary_disk.path | dirname }}" + state: directory + ## 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 -- cgit v1.2.3