diff --git a/roles/download/tasks/main.yml b/roles/download/tasks/main.yml index b4eb79053..fcdabc9a2 100644 --- a/roles/download/tasks/main.yml +++ b/roles/download/tasks/main.yml @@ -130,6 +130,9 @@ shell: "{{ docker_bin_dir }}/docker save {{ pull_args }} | gzip -{{ download_compress }} > {{ fname }}" delegate_to: "{{ download_delegate }}" register: saved + until: saved|success and "Error" not in saved.stderr + retries: 4 + delay: "{{ retry_stagger | random + 3 }}" run_once: true when: (not ansible_os_family in ["CoreOS", "Container Linux by CoreOS"] or download_delegate == "localhost") and download_run_once|bool and download.enabled|bool and download.container|bool and (container_changed|bool or not img.stat.exists)