Create a gist now

Instantly share code, notes, and snippets.

#!/usr/bin/env bash
sudo ls > /dev/null
provider=virtualbox
sudo rm -rf .vagrant/machines/default/*/cache
banner() {
msg=$1
echo
echo
echo '--------------------------------'
echo "-- ${msg}"
}
vagrant destroy -f
vagrant up --provider=${provider} --no-provision
banner "First provision ${provider}"
time vagrant provision
banner 'Cleanup'
vagrant destroy -f
vagrant up --provider=${provider} --no-provision
banner "-- Second provision ${provider}"
time vagrant provision
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment