Skip to content

Instantly share code, notes, and snippets.

@badri
Created June 14, 2017 10:42
Show Gist options
  • Select an option

  • Save badri/616ade4f8def9c34e03567402f184c7a to your computer and use it in GitHub Desktop.

Select an option

Save badri/616ade4f8def9c34e03567402f184c7a to your computer and use it in GitHub Desktop.
Ansible 2 machine vagrant setup
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.define "app1" do |app|
app.vm.hostname = "app1.dev"
app.vm.network :private_network, ip: "192.168.60.4"
app.vm.provision "shell", inline: <<-SHELL
sudo apt-get update
sudo apt-get install -y software-properties-common
sudo apt-add-repository ppa:ansible/ansible
sudo apt-get update
sudo apt-get install -y ansible
SHELL
end
config.vm.define "app2" do |app|
app.vm.hostname = "app2.dev"
app.vm.network :private_network, ip: "192.168.60.5"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment