Merge "Ensure docker running before execute the destroy action"
This commit is contained in:
commit
95cd334707
@ -1,6 +1,8 @@
|
|||||||
---
|
---
|
||||||
- include: copy_tools.yml
|
- include: copy_tools.yml
|
||||||
|
|
||||||
|
- include: validate_docker_execute.yml
|
||||||
|
|
||||||
- include: cleanup_containers.yml
|
- include: cleanup_containers.yml
|
||||||
|
|
||||||
- include: cleanup_images.yml
|
- include: cleanup_images.yml
|
||||||
|
3
ansible/roles/destroy/tasks/validate_docker_execute.yml
Normal file
3
ansible/roles/destroy/tasks/validate_docker_execute.yml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
- name: Ensure the docker service is running
|
||||||
|
command: /tmp/kolla-cleanup/tools/validate-docker-execute.sh
|
@ -4,8 +4,6 @@
|
|||||||
REAL_PATH=$(python -c "import os,sys;print os.path.realpath('$0')")
|
REAL_PATH=$(python -c "import os,sys;print os.path.realpath('$0')")
|
||||||
cd "$(dirname "$REAL_PATH")/.."
|
cd "$(dirname "$REAL_PATH")/.."
|
||||||
|
|
||||||
. tools/validate-docker-execute.sh
|
|
||||||
|
|
||||||
function process_cmd {
|
function process_cmd {
|
||||||
if [[ -z "$KOLLA_IMAGES" ]]; then
|
if [[ -z "$KOLLA_IMAGES" ]]; then
|
||||||
echo "No images to cleanup, exit now."
|
echo "No images to cleanup, exit now."
|
||||||
|
Loading…
Reference in New Issue
Block a user