aboutsummaryrefslogtreecommitdiff
path: root/tools/cleanup-host
diff options
context:
space:
mode:
authorMauricio Lima <mauriciolimab@gmail.com>2016-04-07 16:13:46 -0400
committerMauricio Lima <mauriciolimab@gmail.com>2016-04-09 14:35:33 -0400
commit4ce13676425250df1f56be40446a14c1316247c3 (patch)
treedf1cb03e220eb5668b8aeec64d8d15727665e1d0 /tools/cleanup-host
parente081c746910e3dac2c416f100f76ef91bb3a9afe (diff)
downloadkolla-ansible-4ce13676425250df1f56be40446a14c1316247c3.tar.gz
kolla-ansible-4ce13676425250df1f56be40446a14c1316247c3.zip
Remove /etc/kolla configuration folders
Kolla deployment creates /etc/kolla folder on a target host with multiple configuration files. In some scenarios, the presence of these files prevent successful deployment of certain services especially when their configuration parameters have been changed on the deployment host. Change-Id: Iefd544b50fc90b7f00d6e137bc14ab4807ef7c0f Closes-Bug: #1561055
Diffstat (limited to 'tools/cleanup-host')
-rwxr-xr-xtools/cleanup-host12
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/cleanup-host b/tools/cleanup-host
index 5bb357c4a..75ed47bd3 100755
--- a/tools/cleanup-host
+++ b/tools/cleanup-host
@@ -32,3 +32,15 @@ sudo cp /etc/fstab /etc/fstab_backup
echo "Removing ceph references from fstab..."
sudo sed -i '/\/var\/lib\/ceph\/osd\//d' /etc/fstab
+
+echo "Getting folders name..."
+FOLDER_PATH="/etc/kolla/"
+for dir in $FOLDER_PATH*; do
+ if [ "$dir" == "$FOLDER_PATH""passwords.yml" ] || \
+ [ "$dir" == "$FOLDER_PATH""globals.yml" ] || \
+ [ "$dir" == "$FOLDER_PATH""config" ]; then
+ echo "Skipping:" $dir
+ else
+ rm -rfv $dir
+ fi
+done