Force cleanup cloud-init data, if it was
Change-Id: I84dd9e0cadea8b9cf559cc33c0369a3849b046b4
diff --git a/common/ubuntu_cleanup.sh b/common/ubuntu_cleanup.sh
index 919f64a..686e95e 100644
--- a/common/ubuntu_cleanup.sh
+++ b/common/ubuntu_cleanup.sh
@@ -34,6 +34,14 @@
rm -v /done_ubuntu_base || true
rm -v /done_ubuntu_salt_bootstrap || true
+# Force cleanup cloud-init data, if it was
+if [[ -d '/var/lib/cloud/' ]] ; then
+ rm -rf /var/lib/cloud/* || true
+ cloud-init clean
+ echo > /var/log/cloud-init-output.log || true
+ echo > /var/log/cloud-init.log || true
+fi
+
# Clear\drop cache's
sync
echo 3 > /proc/sys/vm/drop_caches