Created
June 30, 2015 20:36
-
-
Save jeff1evesque/4924a3251d53fdfb2d1f to your computer and use it in GitHub Desktop.
Vagrantfile used to install vagrant-r10k plugin
This file contains hidden or 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
Vagrant.configure(2) do |config| | |
## Variables (ruby syntax) | |
required_plugins = %w(vagrant-r10k) | |
plugin_installed = false | |
## Install Vagrant Plugins | |
required_plugins.each do |plugin| | |
unless Vagrant.has_plugin? plugin | |
system "vagrant plugin install #{plugin}" | |
plugin_installed = true | |
end | |
end | |
## Restart Vagrant: if new plugin installed | |
if plugin_installed == true | |
exec "vagrant #{ARGV.join(' ')}" | |
end | |
## Every Vagrant development environment requires a box. You can search for | |
# boxes at https://atlas.hashicorp.com/search. | |
config.vm.box = "ubuntu/trusty64" | |
## Create 'puppet/modules' directory for puppet provisioner(s) | |
# | |
# :ALL, denotes the successive commands will be applied to all vagrant | |
# commands. | |
# -p, create directory, and parent directories if needed | |
config.trigger.before :ALL do | |
run "mkdir -p puppet/modules" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment