diff --git a/ansible/roles/destroy/tasks/main.yml b/ansible/roles/destroy/tasks/main.yml index 13b59b7fbf..0ef20695d8 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 0000000000..2839cefe82 --- /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 1a89673173..762b2daf75 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."