download/container: adapt to single key repo+tag -> image_name

This code will be deleted for the rework of the download role, for now
we minimally adapt it to the new structure of downloads.
This commit is contained in:
Max Gautier
2026-09-23 13:18:49 +02:00
parent 164f7fbf40
commit e013507027
4 changed files with 13 additions and 18 deletions
+3 -3
View File
@@ -21,7 +21,7 @@
- not download_always_pull
- debug: # noqa name[missing]
msg: "Pull {{ image_reponame }} required is: {{ pull_required }}"
msg: "Pull {{ download.image_name }} required is: {{ pull_required }}"
- name: Download_container | Determine if image is in cache
stat:
@@ -49,13 +49,13 @@
- name: Stop if image not in cache on ansible host when download_force_cache=true
assert:
that: image_is_cached
msg: "Image cache file {{ image_path_cached }} not found for {{ image_reponame }} on localhost"
msg: "Image cache file {{ image_path_cached }} not found for {{ download.image_name }} on localhost"
when:
- download_force_cache
- not download_run_once
- name: Download_container | Download image if required
command: "{{ image_pull_command_on_localhost if download_localhost else image_pull_command }} {{ image_reponame }}"
command: "{{ image_pull_command_on_localhost if download_localhost else image_pull_command }} {{ download.image_name }}"
delegate_to: "{{ download_delegate if download_run_once else inventory_hostname }}"
delegate_facts: true
run_once: "{{ download_run_once }}"