Last Updated: February 25, 2016
·
467
· gildegoma

Set global options to all your Vagrant machines

Vagrant actually merges the settings defined in different Vagrantfiles (see full details in section "Load Order and Merging" of the docs).

It is therefore quite convenient to set some global settings in ~/.vagrant.d/Vagrantfile. Here is a very simple example:

Vagrant.configure("2") do |config|

  if Vagrant.has_plugin?("vagrant-cachier")
    config.cache.scope = :box
  end

end

I recommend this kind of trick when using Test-Kitchen with Vagrant, instead of tweaking kitchen-vagrant options.