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:
parent
0453ed8235
commit
cbaa2b5773
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue