Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Trying to configure multi-machine, where each machine has it's own SSH IP and port
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "hashicorp/precise32"
config.vm.define :servera do |servera_config|
servera_config.vm.host_name = "servera"
servera_config.ssh.port = "2301"
servera_config.ssh.host = "192.168.50.11"
servera_config.vm.network "private_network", ip: "192.168.50.11"
end
config.vm.define :serverb do |serverb_config|
serverb_config.vm.host_name = "serverb"
serverb_config.ssh.port = "2302"
serverb_config.ssh.host = "192.168.50.12"
serverb_config.vm.network "private_network", ip: "192.168.50.12"
end
config.vm.define :serverc do |serverc_config|
serverc_config.vm.host_name = "serverc"
serverc_config.ssh.port = "2303"
serverc_config.ssh.host = "192.168.50.13"
serverc_config.vm.network "private_network", ip: "192.168.50.13"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.