site-container: retry image pull

Sometimes pulling an image fails for network hickup, so let's retry 5
times at 5sec interval.

Signed-off-by: Sébastien Han <seb@redhat.com>
pull/3375/head
Sébastien Han 2018-11-26 11:05:13 +01:00 committed by Guillaume Abrioux
parent bd98193ce4
commit 5816cd4101
1 changed files with 5 additions and 1 deletions

View File

@ -82,7 +82,11 @@
# post-tasks for upcoming import - # post-tasks for upcoming import -
- name: "pull {{ ceph_docker_image }} image" - name: "pull {{ ceph_docker_image }} image"
command: "{{ container_binary }} pull {{ ceph_docker_registry}}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}" command: "{{ container_binary }} pull {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
register: container_pull
until: container_pull.rc == 0
retries: 5
delay: 5
changed_when: false changed_when: false
when: when:
- is_atomic - is_atomic