Skip to content

Instantly share code, notes, and snippets.

@jamiejackson
Last active October 9, 2019 21:03
Show Gist options
  • Save jamiejackson/60595125c185c185af8b456f0ca4f591 to your computer and use it in GitHub Desktop.
Save jamiejackson/60595125c185c185af8b456f0ca4f591 to your computer and use it in GitHub Desktop.
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/bionic64"
config.vm.define "vm1" do |machine|
machine.vm.hostname = "vm1"
machine.vm.network "private_network", ip: "192.168.50.77"
end
config.vm.define "vm2" do |machine|
machine.vm.hostname = "vm2"
machine.vm.network "private_network", ip: "192.168.50.78"
end
# allow guests to reach each other by hostname
config.vm.provision "allow_guest_host_resolution",
type: "shell",
inline: 'apt-get install -y avahi-daemon libnss-mdns'
SHELL
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment