From c7c61fca06414735ed0bb3e62e90a098bd16be13 Mon Sep 17 00:00:00 2001 From: Borne Mace Date: Thu, 7 Jun 2018 13:44:24 -0700 Subject: [PATCH] Avoid removing kolla-cli directories on destroy When running the kolla-ansible destroy playbook most of the files under /etc/kolla are cleaned up. This change will cause the clean-up to skip the kolla-cli related directories. When running the deployment code in a container or a separate VM this is not an issue, but when doing an all-in-one or running the deployment process from one of the systems being deployed onto it would have previously destroyed the kolla-cli inventory and any generated certificates used for TLS. Change-Id: Icd62e177964b8fb31052131785c6d7b138975a28 --- tools/cleanup-host | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/cleanup-host b/tools/cleanup-host index b0917e1e30..d9ea768087 100755 --- a/tools/cleanup-host +++ b/tools/cleanup-host @@ -68,7 +68,9 @@ for dir in $FOLDER_PATH*; do if [ "$dir" == "$FOLDER_PATH""passwords.yml" ] || \ [ "$dir" == "$FOLDER_PATH""globals.yml" ] || \ [ "$dir" == "$FOLDER_PATH""kolla-build.conf" ] || \ - [ "$dir" == "$FOLDER_PATH""config" ]; then + [ "$dir" == "$FOLDER_PATH""config" ] || \ + [ "$dir" == "$FOLDER_PATH""kolla-cli" ] || \ + [ "$dir" == "$FOLDER_PATH""certificates" ]; then echo "Skipping:" $dir else rm -rfv $dir