diff options
Diffstat (limited to 'roles/vmm/tasks/generate_disk.yml')
-rw-r--r-- | roles/vmm/tasks/generate_disk.yml | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/roles/vmm/tasks/generate_disk.yml b/roles/vmm/tasks/generate_disk.yml deleted file mode 100644 index 1c44471..0000000 --- a/roles/vmm/tasks/generate_disk.yml +++ /dev/null @@ -1,21 +0,0 @@ - -# vmm ~~ tasks/generate_disk.yml - ---- - -- name: Check existence of disk directory - file: - path: "{{ vmm.disk_dir }}" - state: directory - -- name: Get existing disk file size - stat: - path: "{{ vmm.disk_dir }}/{{ guest.name }}.{{ vmm.disk_format }}" - register: st - -- name: Generate vm disk for {{ guest.name }} - shell: | - disk="{{ vmm.disk_dir }}/{{ guest.name }}.{{ vmm.disk_format }}" - rm "${disk}" - vmctl create -s {{ guest.size }} "${disk}" - when: not st.stat.exists or st.stat.size < 32 |