[modify-image] Ensure qemu-img is installed
The role relies on qemu-image rpm, let's ensure it's installed. It used to be installed with tripleoclient before [1], since the role relies on that rpm let's have it as part of role. Also use set -eo pipefail for convert image task so that task fail if any part of the script fails. [1] https://review.rdoproject.org/r/#/c/30690/ Closes-Bug: #1906486 Change-Id: I532e236caad86941db8a4cfcffa4be67c76502b5
This commit is contained in:
parent
2c5d8abd97
commit
c7905f0b44
|
@ -13,6 +13,12 @@
|
|||
set_fact:
|
||||
mount_tempdir: "{{ mktemp_command.stdout }}"
|
||||
|
||||
- name: Ensure qemu-img is installed
|
||||
package:
|
||||
name: qemu-img
|
||||
state: present
|
||||
become: true
|
||||
|
||||
- when: not initramfs_image|bool
|
||||
block:
|
||||
|
||||
|
@ -23,6 +29,7 @@
|
|||
|
||||
- name: Convert image
|
||||
shell: >
|
||||
set -eo pipefail;
|
||||
qemu-img convert -f qcow2 -O raw {{ image_to_modify_qcow }} {{ image_to_modify_raw }};
|
||||
rm -rf "{{ image_to_modify_qcow }}";
|
||||
|
||||
|
|
Loading…
Reference in New Issue