Skip to content

Commit

Permalink
vagrant: add verbose for moving old config
Browse files Browse the repository at this point in the history
Signed-off-by: Dominik Rosiek <drosiek@sumologic.com>
  • Loading branch information
Dominik Rosiek authored and sumo-drosiek committed Mar 9, 2021
1 parent 8f59342 commit 40de324
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vagrant/scripts/get-kubeconfig.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ clean_up() {
rm "${SSH_CONFIG_PATH}" || true
rm "${CONFIG_PATH}" || true
rmdir "${TEMP_DIR}" || true
popd || true
popd > /dev/null || true
}

err_report() {
Expand All @@ -30,7 +30,7 @@ vagrant ssh-config > "${SSH_CONFIG_PATH}"
ssh -o StrictHostKeyChecking=no -F "${SSH_CONFIG_PATH}" default 'kubectl config view --raw' | \
sed "s/127.0.0.1/${VAGRANT_IP}/g" > "${CONFIG_PATH}"

mv "${KUBECONFIG_PATH}" "${KUBECONFIG_PATH}.bkp.$(date +%s)"
mv -v "${KUBECONFIG_PATH}" "${KUBECONFIG_PATH}.bkp.$(date +%s)"
cp "${CONFIG_PATH}" "${KUBECONFIG_PATH}"

clean_up

0 comments on commit 40de324

Please sign in to comment.