Skip to content

Instantly share code, notes, and snippets.

@JDiPierro
Created March 20, 2017 15:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JDiPierro/fd1f2f975e9c33204e99a99647f8bf58 to your computer and use it in GitHub Desktop.
Save JDiPierro/fd1f2f975e9c33204e99a99647f8bf58 to your computer and use it in GitHub Desktop.
My Vagrant aliases
function vnuke() {
if [ $# -ne 0 ]; then
vagrant destroy -f $@
return
fi
running_vms=`vagrant status | grep running | awk '{ print $1 }' | xargs`
echo $running_vms
for killme in `echo $running_vms`; do
vagrant destroy -f $killme
done
}
alias vup="vagrant up"
alias vpro="vagrant provision"
alias vsalt="vagrant provision"
alias vrunning="vagrant status | grep running"
alias voff="vagrant status | grep 'not created'"
alias vsnap="vagrant snapshot take"
alias vback="vagrant snapshot back"
function vphoenix() {
vnuke $@ &&
vup $@
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment