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
This commit is contained in:
Borne Mace 2018-06-07 13:44:24 -07:00
parent e88b9a7ad4
commit c7c61fca06
1 changed files with 3 additions and 1 deletions

View File

@ -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