cxdlwa
Last Updated: February 25, 2016
·
3.005K
· davidlonjon

Vagrant logging when provisioning and vagrant aliases

I found that while trying to setup my vagrant dev machine I wanted to debug more easily problems with the provisioning process.

To provision my vagrant machine I use Salt provisioner which in verbose mode (very useful for debug) output a very long trail of information on the screen (not to useful for debug ^^), so I simply output all the debug info in a log file as well as on screen:

vagrant provision 2>&1 | tee vagrant.log
vagrant reload --provision 2>&1 | tee vagrant.log

Actually I created a whole set of alias to make my vagrant workflow faster:

alias vup="vagrant up"
alias vupl="vagrant up 2>&1 | tee vagrant.log"
alias vh="vagrant halt"
alias vs="vagrant suspend"
alias vr="vagrant resume"
alias vrld="vagrant reload"
alias vrldp="vagrant reload --provision"
alias vrldpl="vagrant reload --provision 2>&1 | tee vagrant.log"
alias vssh="vagrant ssh"
alias vstat="vagrant status"
alias vp="vagrant provision"
alias vpl="vagrant provision 2>&1 | tee vagrant.log"

1 Response
Add your response

15058

Nice!

over 1 year ago ·