Created
February 5, 2015 16:13
-
-
Save ss44/83e5138e404ffb78e935 to your computer and use it in GitHub Desktop.
Automatically install required vagrant plugins from within a vagrant script, as opposed to requiring users first install the needed plugins first. Not sure if this will cause any other issues but it does streamline the entire vagrant process.
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
required_plugins = %w( vagrant-hostsupdater vagrant-vbguest ) | |
_retry = false | |
required_plugins.each do |plugin| | |
unless Vagrant.has_plugin? plugin | |
system "vagrant plugin install #{plugin}" | |
_retry = true | |
end | |
end | |
if (_retry) | |
exec "vagrant " + ARGV.join(' ') | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment