diff --git a/ansible/roles/destroy/tasks/cleanup_host.yml b/ansible/roles/destroy/tasks/cleanup_host.yml index 228fb70bbd..38ca03f78a 100644 --- a/ansible/roles/destroy/tasks/cleanup_host.yml +++ b/ansible/roles/destroy/tasks/cleanup_host.yml @@ -2,6 +2,7 @@ - name: Destroying Kolla host configuration command: > env enable_haproxy={{ enable_haproxy }} + enable_swift={{ enable_swift }} kolla_internal_vip_address={{ kolla_internal_vip_address }} kolla_external_vip_address={{ kolla_external_vip_address }} /tmp/kolla-cleanup/tools/cleanup-host diff --git a/tools/cleanup-host b/tools/cleanup-host index 9800b70833..cc2aa322ab 100755 --- a/tools/cleanup-host +++ b/tools/cleanup-host @@ -45,6 +45,12 @@ done echo "Removing ceph references from fstab..." sudo sed -i '/\/var\/lib\/ceph\/osd\//d' /etc/fstab +if [[ "$enable_swift" == "yes" ]]; then + echo "Removing swift references from fstab..." + cat /etc/fstab | grep "/srv/node/d*" | xargs umount + sed -i '/\/srv\/node\//d' /etc/fstab +fi + echo "Getting folders name..." FOLDER_PATH="/etc/kolla/" for dir in $FOLDER_PATH*; do