increase forward ssh port

This commit is contained in:
Jörg Thalheim 2014-01-27 16:06:09 +01:00
parent fd432cf35d
commit 7bcf201e4f

8
Vagrantfile vendored
View File

@ -50,6 +50,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
end end
config.vm.provision(:shell){ |shell| shell.path = "script/fix_stdin_error.sh" } config.vm.provision(:shell){ |shell| shell.path = "script/fix_stdin_error.sh" }
ssh_port = 2222
boxes.each do |box| boxes.each do |box|
config.vm.define box[:name] do |node| config.vm.define box[:name] do |node|
node.vm.provider :virtualbox do |vb| node.vm.provider :virtualbox do |vb|
@ -67,6 +68,13 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
"--macaddress2", box[:mac]] "--macaddress2", box[:mac]]
end end
config.vm.network :forwarded_port,
guest: 22,
host: ssh_port,
id: "ssh",
auto_correct: true
ssh_port += 1
node.vm.hostname = box[:name] node.vm.hostname = box[:name]
node.vm.provision :chef_solo do |chef| node.vm.provision :chef_solo do |chef|
chef_default.call(chef) chef_default.call(chef)