Created
June 14, 2017 10:42
-
-
Save badri/616ade4f8def9c34e03567402f184c7a to your computer and use it in GitHub Desktop.
Ansible 2 machine vagrant setup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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