mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-10-30 22:16:23 -02:30
The pull by digest hasn't been working since 800c84dcc (download: use
full hash form (including hash alg), 2025-01-14), where the key was
renamed to checksum, but the download_container still checked sha256.
Stop pretending we pull by digest.
15 lines
920 B
YAML
15 lines
920 B
YAML
---
|
|
# The image_info_command depends on the Container Runtime and will output something like the following:
|
|
# nginx:1.15,gcr.io/google-containers/kube-proxy:v1.14.1,gcr.io/google-containers/kube-proxy@sha256:44af2833c6cbd9a7fc2e9d2f5244a39dfd2e31ad91bf9d4b7d810678db738ee9,gcr.io/google-containers/kube-apiserver:v1.14.1,etc...
|
|
- name: Check_pull_required | Generate a list of information about the images on a node # noqa command-instead-of-shell - image_info_command contains a pipe, therefore requiring shell
|
|
shell: "{{ image_info_command }}"
|
|
register: docker_images
|
|
changed_when: false
|
|
check_mode: false
|
|
when: not download_always_pull
|
|
|
|
- name: Check_pull_required | Set pull_required if the desired image is not yet loaded
|
|
set_fact:
|
|
pull_required: "{{ (download.image_name | regex_replace('^docker\\.io/(library/)?', '')) not in docker_images.stdout.split(',') }}"
|
|
when: not download_always_pull
|