Retry Remove all Docker containers in reset (#1623)

Due to various occasional docker bugs, removing a container will sometimes fail. This can often be mitigated by trying again.
This commit is contained in:
Chad Swenson 2017-09-06 06:23:16 -05:00 committed by Matthew Mosesohn
parent 0453ed8235
commit cbaa2b5773

View file

@ -38,6 +38,10 @@
- name: reset | remove all containers - name: reset | remove all containers
shell: "{{ docker_bin_dir }}/docker ps -aq | xargs -r docker rm -fv" shell: "{{ docker_bin_dir }}/docker ps -aq | xargs -r docker rm -fv"
register: remove_all_containers
retries: 4
until: remove_all_containers.rc == 0
delay: 5
tags: ['docker'] tags: ['docker']
- name: reset | restart docker if needed - name: reset | restart docker if needed