Created
April 16, 2015 14:03
-
-
Save thegass/58173a678deafcd9916b to your computer and use it in GitHub Desktop.
sample how to force vagrant plugins.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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