Skip to content

Instantly share code, notes, and snippets.

@feload
Created June 30, 2016 02:14
Show Gist options
  • Save feload/d4123cdd905285e8d246f8787517a5cb to your computer and use it in GitHub Desktop.
Save feload/d4123cdd905285e8d246f8787517a5cb to your computer and use it in GitHub Desktop.
Multiple vagrant machines configuration
Vagrant.configure("2") do |config|
config.vm.define "webserver" do |webserver|
webserver.vm.box = "hashicorp/precise64"
webserver.vm.network "private_network", ip: "192.168.0.2"
webserver.vm.hostname = "webserver"
end
config.vm.define "ansible" do |ansible|
ansible.vm.box = "hashicorp/precise64"
ansible.vm.network "private_network", ip: "192.168.0.22"
ansible.vm.hostname = "ansible"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment