solar/.vagrantplugins
Michal Rostecki ae138f91e2 Don't install vagrant-vbguest when using other providers
Also, allow to define another provider-specific plugins
when needed.

Change-Id: Ie40b5c52ea6aea19c150def65785356b0db3c54e
Closes-Bug: 1574627
2016-04-25 14:53:18 +02:00

22 lines
445 B
Plaintext

required_plugins = %w()
requires_restart = false
# Add vagrant-vbguest plugin only if using VirtualBox
Vagrant.configure("2") do |config|
config.vm.provider :virtualbox do
required_plugins.push("vagrant-vbguest")
end
end
required_plugins.each do |plugin|
unless Vagrant.has_plugin? plugin
system "vagrant plugin install #{plugin}"
requires_restart = true
end
end
if requires_restart
exec "vagrant #{ARGV.join' '}"
end