Skip to content

Commit

Permalink
Merge branch 'amalivert-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Rodrique Heron committed Dec 28, 2019
2 parents 5b594a9 + 0176c7c commit 847d9e1
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tasks/deploy-vm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,16 @@
os_disk_size: "{{ os_virtual_disk_size.stdout | human_to_bytes }}"
when: os_disk_created.stat.exists

- name: get os qcow device disk name
shell: >
virt-filesystems --partitions --long
-a "{{ os_qcow_template }}" | awk '/partition /{print $1}'
register: os_disk_device
changed_when: false

- name: Push base image onto vm operating system disk
command: >
virt-resize --expand /dev/sda1 "{{ os_qcow_template }}" "{{ os_disk }}"
virt-resize --expand "{{ os_disk_device.stdout }}" "{{ os_qcow_template }}" "{{ os_disk }}"
register: resize_os_disk_results
changed_when: '"Resize operation completed with no errors" in resize_os_disk_results.stdout'
when: os_disk_created.stat.exists and os_disk_size|int < '1073741824'|int
Expand Down

0 comments on commit 847d9e1

Please sign in to comment.