Demo entry 2843063

Vagrant

   

Submitted by Vagrant1 on Oct 17, 2015 at 12:12
Language: Ruby. Code size: 854 Bytes.

### Vagrant with multible boxes ###
VAGRANTFILE_API_VERSION ='2'

HOST_NAME = 'box001'
HOST_NAME2 = 'box002'

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
	
	config.vm.provider :virtualbox do |vb|
    	vb.customize ['modifyvm', :id, '--memory', 256]
  	end
  	config.vm.define HOST_NAME do |stating|
	  	stating.vm.hostname = HOST_NAME
		stating.vm.box = 'ubuntu/trusty64'
		stating.vm.network "forwarded_port", guest: 80, host: 8080
		stating.vm.network :private_network,
	    	ip: '192.168.56.65',
	    	netmask: '255.255.255.0'
    end

    config.vm.define HOST_NAME2 do |production|
	  	production.vm.hostname = HOST_NAME2
		production.vm.box = 'ubuntu/trusty64'
		production.vm.network "forwarded_port", guest: 80, host: 8080
		production.vm.network :private_network,
	    	ip: '192.168.56.64',
	    	netmask: '255.255.255.0'
    end
end

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).