Skip to content

Instantly share code, notes, and snippets.

@marclambrichs
Created December 5, 2015 07:41
Show Gist options
  • Save marclambrichs/cd69bd8116f1d35c156d to your computer and use it in GitHub Desktop.
Save marclambrichs/cd69bd8116f1d35c156d to your computer and use it in GitHub Desktop.
install plugins
################################################################################
# check plugins
################################################################################
required_plugins = %w(vagrant-hostmanager vagrant-hosts vagrant-vbguest)
plugins_to_install = required_plugins.select { |plugin| not Vagrant.has_plugin? plugin }
if not plugins_to_install.empty?
puts "Installing plugins: #{plugins_to_install.join(' ')}"
if system "vagrant plugin install #{plugins_to_install.join(' ')}"
exec "vagrant #{ARGV.join(' ')}"
else
abort "Installation of one or more plugins has failed. Aborting."
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment