Created
March 20, 2017 15:08
-
-
Save JDiPierro/fd1f2f975e9c33204e99a99647f8bf58 to your computer and use it in GitHub Desktop.
My Vagrant aliases
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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