Add Fedora CoreOS kubevirt image for tests (#6337)

This commit is contained in:
bozzo
2020-07-10 10:07:48 +02:00
committed by GitHub
parent 22996babcf
commit 8cb644fbec
2 changed files with 15 additions and 3 deletions

View File

@@ -13,16 +13,22 @@
with_dict:
- "{{ images }}"
- name: Unxz compressed images
command: unxz --force {{ images_dir }}/{{ item.value.filename }}
with_dict:
- "{{ images }}"
when:
- item.value.filename.endswith('.xz')
- name: Convert images which is not in qcow2 format
command: qemu-img convert -O qcow2 {{ images_dir }}/{{ item.value.filename }} {{ images_dir }}/{{ item.key }}.qcow2
command: qemu-img convert -O qcow2 {{ images_dir }}/{{ item.value.filename.rstrip('.xz') }} {{ images_dir }}/{{ item.key }}.qcow2
with_dict:
- "{{ images }}"
when:
- not (item.value.converted|bool)
register: converted
- name: Make sure all images are ending with qcow2
command: cp {{ images_dir }}/{{ item.value.filename }} {{ images_dir }}/{{ item.key }}.qcow2
command: cp {{ images_dir }}/{{ item.value.filename.rstrip('.xz') }} {{ images_dir }}/{{ item.key }}.qcow2
with_dict:
- "{{ images }}"
when: