From 855ac41c1220daf85717bb48ce2d4d2828109aa5 Mon Sep 17 00:00:00 2001 From: "wu.zhihui" Date: Sat, 11 Mar 2017 10:19:21 +0800 Subject: env cleanup If IF_DEBUG is True, there is not cleanup step. If IF_DEBUG is False, host file and keypair will be deleted on local and public key will be removed from remote nodes in the end of test. Change-Id: I4a88acc2d428e41e4abaedacb011e27468b2cb57 Signed-off-by: wu.zhihui (cherry picked from commit d37dad746e504e833abcf2ae058f2b81e2a9d365) --- qtip/scripts/cleanup_creds.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 qtip/scripts/cleanup_creds.sh (limited to 'qtip/scripts') diff --git a/qtip/scripts/cleanup_creds.sh b/qtip/scripts/cleanup_creds.sh new file mode 100755 index 00000000..b4eee924 --- /dev/null +++ b/qtip/scripts/cleanup_creds.sh @@ -0,0 +1,11 @@ +#! /bin/bash + +DEST_IP=$1 +HOSTNAME=$(hostname) +sshoptions="-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" + +case "$INSTALLER_TYPE" in + fuel) + ssh $sshoptions -i ./config/QtipKey root@$DEST_IP "sed -i '/root@$HOSTNAME/d' /root/.ssh/authorized_keys" + ;; +esac -- cgit 1.2.3-korg