Files
HetznerTerra/ansible/roles/bootstrap-image-prepull/tasks/main.yml
T

17 lines
581 B
YAML
Raw Normal View History

---
- name: Pre-pull bootstrap images into containerd
command: /usr/local/bin/ctr -n k8s.io images pull {{ item }}
register: bootstrap_image_pull
loop: "{{ bootstrap_prepull_images }}"
changed_when: bootstrap_image_pull.rc == 0
failed_when: false
- name: Report bootstrap images that did not pre-pull
debug:
msg: >-
Bootstrap image pre-pull failed for {{ item.item }}: {{ item.stderr | default('no stderr') }}
loop: "{{ bootstrap_image_pull.results | default([]) }}"
loop_control:
label: "{{ item.item }}"
when: item.rc is defined and item.rc != 0