Retry docker save in case it errors

This commit is contained in:
Matthew Mosesohn 2017-03-13 15:11:27 +03:00
parent 7cb7eee29d
commit 42b81e264e

View file

@ -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)