Skip to content

Instantly share code, notes, and snippets.

@jeff1evesque
Created June 30, 2015 20:36
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 jeff1evesque/4924a3251d53fdfb2d1f to your computer and use it in GitHub Desktop.
Save jeff1evesque/4924a3251d53fdfb2d1f to your computer and use it in GitHub Desktop.
Vagrantfile used to install vagrant-r10k plugin
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