diff --git a/ansible/roles/destroy/tasks/main.yml b/ansible/roles/destroy/tasks/main.yml index 13b59b7fbfd95a3018dd97388ed8e2a54c470814..0ef20695d82526a67b0673ebb1499d11f322b7cc 100644 --- a/ansible/roles/destroy/tasks/main.yml +++ b/ansible/roles/destroy/tasks/main.yml @@ -1,6 +1,8 @@ --- - include: copy_tools.yml +- include: validate_docker_execute.yml + - include: cleanup_containers.yml - include: cleanup_images.yml diff --git a/ansible/roles/destroy/tasks/validate_docker_execute.yml b/ansible/roles/destroy/tasks/validate_docker_execute.yml new file mode 100644 index 0000000000000000000000000000000000000000..2839cefe82c6666c71d1d2a3cd69b63c5a4cade7 --- /dev/null +++ b/ansible/roles/destroy/tasks/validate_docker_execute.yml @@ -0,0 +1,3 @@ +--- +- name: Ensure the docker service is running + command: /tmp/kolla-cleanup/tools/validate-docker-execute.sh diff --git a/tools/cleanup-images b/tools/cleanup-images index 1a89673173dc362cdaf23999dc5520b80d6a380a..762b2daf75ec28ec7160d8336f2007905a595149 100755 --- a/tools/cleanup-images +++ b/tools/cleanup-images @@ -4,8 +4,6 @@ REAL_PATH=$(python -c "import os,sys;print os.path.realpath('$0')") cd "$(dirname "$REAL_PATH")/.." -. tools/validate-docker-execute.sh - function process_cmd { if [[ -z "$KOLLA_IMAGES" ]]; then echo "No images to cleanup, exit now."