Advertisement
Guest User

Untitled

a guest
Jul 24th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. ##############
  2. # Box Config #
  3. ##############
  4.  
  5. # Specify any plugins you want installed on every `vagrant up` run
  6. # You need the hostsupdated plugin, but the others are useful too.
  7. required_plugins = %w(vagrant-hostsupdater vagrant-vbguest vagrant-triggers)
  8.  
  9. plugins_to_install = required_plugins.select { |plugin| not Vagrant.has_plugin? plugin }
  10. if not plugins_to_install.empty?
  11. puts "Installing plugins: #{plugins_to_install.join(' ')}"
  12. if system "vagrant plugin install #{plugins_to_install.join(' ')}"
  13. exec "vagrant #{ARGV.join(' ')}"
  14. else
  15. abort "Installation of one or more plugins has failed. Aborting."
  16. end
  17. end
  18.  
  19.  
  20. Vagrant.configure("2") do |config|
  21.  
  22. # [...] Typical config goes here
  23.  
  24. # Update hosts file
  25. config.vm.hostname = "primarydomain"
  26. config.hostsupdater.aliases = ["aliasdomain_1", "aliasdomain_2", "aliasdomain_n-1", "aliasdomain_n"]
  27.  
  28. # [...] Typical config goes here
  29.  
  30. # Load bootstrap shell script into vm
  31. config.vm.provision :shell, :path => "config/bootstrap.sh"
  32.  
  33.  
  34. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement