blob: f70d56378a44046ab6737bdfe2d989ef511c2a43 (
plain) (
tree)
|
|
# disks ~~ roles/vmm/tasks/disks.yml
---
- name: get existing disk file size
stat:
path: "{{ vmm.disk_dir }}/{{ guest.name }}.{{ vmm.disk_format }}"
register: st
- name: generate vm disk
shell: |
disk="{{ vmm.disk_dir }}/{{ guest.name }}_{{ disk.id }}.{{ vmm.disk_format }}"
rm "${disk}"
vmctl create -s {{ disk.size }} "${disk}"
#when: not st.stat.exists or st.stat.size < 32
loop: "{{ guest.disks }}"
loop_control:
loop_var: disk
|