Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 1877862: oVirt UPI - Fix templates check and optimize image check #4157

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 5 additions & 3 deletions upi/ovirt/create-templates-and-vms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,20 @@
get_attributes: no
path: "{{ rhcos.local_image_path }}"
register: image_stats
loop:
- "{{ rhcos.local_cmp_image_path }}"
- "{{ rhcos.local_image_path }}"

- name: Download RHCOS image
get_url:
url: "{{ rhcos.image_url }}"
dest: "{{ rhcos.local_cmp_image_path}}"
force: no
when: not image_stats.results[1].stat.exists

- name: Extract RHCOS image
shell: "gunzip -c {{ rhcos.local_cmp_image_path }} > {{ rhcos.local_image_path }}"
when: not image_stats.stat.exists
when: not image_stats.results[0].stat.exists

- name: Get templates info
ovirt_template_info:
Expand All @@ -38,9 +42,7 @@
templates_list: >-
{{
templates_list | default([]) +
[
item.ovirt_templates | map(attribute='name') | list
]
}}
with_items: "{{ templates_info.results }}"

Expand Down