Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ##############
- # Box Config #
- ##############
- # Specify any plugins you want installed on every `vagrant up` run
- # You need the hostsupdated plugin, but the others are useful too.
- required_plugins = %w(vagrant-hostsupdater vagrant-vbguest vagrant-triggers)
- plugins_to_install = required_plugins.select { |plugin| not Vagrant.has_plugin? plugin }
- if not plugins_to_install.empty?
- puts "Installing plugins: #{plugins_to_install.join(' ')}"
- if system "vagrant plugin install #{plugins_to_install.join(' ')}"
- exec "vagrant #{ARGV.join(' ')}"
- else
- abort "Installation of one or more plugins has failed. Aborting."
- end
- end
- Vagrant.configure("2") do |config|
- # [...] Typical config goes here
- # Update hosts file
- config.vm.hostname = "primarydomain"
- config.hostsupdater.aliases = ["aliasdomain_1", "aliasdomain_2", "aliasdomain_n-1", "aliasdomain_n"]
- # [...] Typical config goes here
- # Load bootstrap shell script into vm
- config.vm.provision :shell, :path => "config/bootstrap.sh"
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement