Files
HetznerTerra/ansible/roles/bootstrap-image-prepull/tasks/main.yml
T
micqdf 17182f84a9
Deploy Cluster / Terraform (push) Successful in 4m16s
Deploy Cluster / Ansible (push) Failing after 13m57s
fix: remove runner image archive path
2026-05-02 00:41:25 +00:00

24 lines
580 B
YAML

---
- name: Pull bootstrap images into containerd
shell: |
if /usr/local/bin/ctr -n k8s.io images ls -q | grep -Fx -- "{{ item }}" >/dev/null; then
echo "already present"
exit 0
fi
for attempt in 1 2 3 4 5; do
if timeout 180s /usr/local/bin/ctr -n k8s.io images pull "{{ item }}"; then
echo "pulled image"
exit 0
fi
sleep 10
done
exit 1
args:
executable: /bin/bash
register: bootstrap_image_pull
loop: "{{ bootstrap_prepull_images }}"
changed_when: "'pulled image' in bootstrap_image_pull.stdout"