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.
pull/1632/head
Chad Swenson 2017-09-06 06:23:16 -05:00 committed by Matthew Mosesohn
parent 0453ed8235
commit cbaa2b5773
1 changed files with 4 additions and 0 deletions

View File

@ -38,6 +38,10 @@
- name: reset | remove all containers
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']
- name: reset | restart docker if needed