ae138f91e2
Also, allow to define another provider-specific plugins when needed. Change-Id: Ie40b5c52ea6aea19c150def65785356b0db3c54e Closes-Bug: 1574627
22 lines
445 B
Plaintext
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
|