Commit 19d989f4e6d5c62984d5c2f8a549c6b04b5c0f37
Committed by
Sergio Oliveira
1 parent
ce4c1dd0
Exists in
master
and in
39 other branches
Vagrantfile: simplify setup
With just one VM, there is no need to name it
Showing
1 changed file
with
16 additions
and
20 deletions
Show diff stats
Vagrantfile
| ... | ... | @@ -18,27 +18,23 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| |
| 18 | 18 | |
| 19 | 19 | # Every Vagrant virtual environment requires a box to build off of. |
| 20 | 20 | |
| 21 | - config.vm.define "colab" do |colab| | |
| 22 | - | |
| 23 | - colab.vm.box = distro | |
| 24 | - | |
| 25 | - if distro == "precise64" | |
| 26 | - colab.vm.box_url = "https://cloud-images.ubuntu.com/vagrant/precise/current/precise-server-cloudimg-amd64-vagrant-disk1.box" | |
| 27 | - config.vm.provision "shell", path: "vagrant/ubuntu.sh" | |
| 28 | - elsif distro == "trusty64" | |
| 29 | - colab.vm.box_url = "https://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box" | |
| 30 | - config.vm.provision "shell", path: "vagrant/ubuntu.sh" | |
| 31 | - elsif distro == "centos6.5" | |
| 32 | - colab.vm.box_url = "https://github.com/2creatives/vagrant-centos/releases/download/v6.5.3/centos65-x86_64-20140116.box" | |
| 33 | - config.vm.provision "shell", path: "vagrant/centos.sh" | |
| 34 | - end | |
| 35 | - config.vm.provision "shell", privileged: false, keep_color: true, path: "vagrant/provision.sh" | |
| 36 | - | |
| 37 | - colab.vm.network :forwarded_port, guest: 8000, host: 8000 # Colab (runserver) | |
| 38 | - colab.vm.network :forwarded_port, guest: 5280, host: 5280 # BOSH server | |
| 39 | - colab.vm.network :forwarded_port, guest: 8983, host: 8983 # Solr | |
| 40 | - | |
| 21 | + config.vm.box = distro | |
| 22 | + | |
| 23 | + if distro == "precise64" | |
| 24 | + config.vm.box_url = "https://cloud-images.ubuntu.com/vagrant/precise/current/precise-server-cloudimg-amd64-vagrant-disk1.box" | |
| 25 | + config.vm.provision "shell", path: "vagrant/ubuntu.sh" | |
| 26 | + elsif distro == "trusty64" | |
| 27 | + config.vm.box_url = "https://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box" | |
| 28 | + config.vm.provision "shell", path: "vagrant/ubuntu.sh" | |
| 29 | + elsif distro == "centos6.5" | |
| 30 | + config.vm.box_url = "https://github.com/2creatives/vagrant-centos/releases/download/v6.5.3/centos65-x86_64-20140116.box" | |
| 31 | + config.vm.provision "shell", path: "vagrant/centos.sh" | |
| 41 | 32 | end |
| 33 | + config.vm.provision "shell", privileged: false, keep_color: true, path: "vagrant/provision.sh" | |
| 34 | + | |
| 35 | + config.vm.network :forwarded_port, guest: 8000, host: 8000 # Colab (runserver) | |
| 36 | + config.vm.network :forwarded_port, guest: 5280, host: 5280 # BOSH server | |
| 37 | + config.vm.network :forwarded_port, guest: 8983, host: 8983 # Solr | |
| 42 | 38 | |
| 43 | 39 | # Disable automatic box update checking. If you disable this, then |
| 44 | 40 | # boxes will only be checked for updates when the user runs | ... | ... |