Vagrant tipps and tricks

This time a few things which make life easier.

Check for Windows

There a quit some situations for Vagrant where you have platform specific steps to do. Here an example for Windows.

Set a default provider

By default, VirtualBox is the default provider for Vagrant but sometimes it is needed to change.

It is possible to use environment variables in Vagrantfile. So the 2nd option is to set provider inside Vagrantfile!

Multiple Vagrantfiles in one directory

Sometimes it could happen that you have multiple Vagrantfiles in one directory. In such case environment variables helps.

Create log files

To enable detailed logging use the VAGRANT_LOG environmental variable.

Level names can be “debug”, “info”, “warn” and “error”.

Jenkins log without colored output

For Jenkins log, the color output is superfluous! Here an simple example: