Skip to content

Instantly share code, notes, and snippets.

@thegass
Created April 16, 2015 14:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thegass/58173a678deafcd9916b to your computer and use it in GitHub Desktop.
Save thegass/58173a678deafcd9916b to your computer and use it in GitHub Desktop.
sample how to force vagrant plugins.
# enforce mandatory plugins
plugins = {
'vagrant-hostmanager' => nil,
'vagrant-vbguest' => nil
}
plugins.each do |plugin, version|
unless Vagrant.has_plugin? plugin
error = "The '#{plugin}' plugin is not installed! Try running:\nvagrant plugin install #{plugin}"
error += " --plugin-version #{version}" if version
raise error
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment