Skip to content

Instantly share code, notes, and snippets.

@bcatubig
Last active February 16, 2016 16:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bcatubig/1156967dbce1d671f33b to your computer and use it in GitHub Desktop.
Save bcatubig/1156967dbce1d671f33b to your computer and use it in GitHub Desktop.
Simple Vagrant Ansible Config
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
config.vm.define "acs" do |acs|
acs.vm.box = "ubuntu/trusty64"
acs.vm.hostname = "acs"
acs.vm.network "private_network", ip: "192.168.33.10"
acs.vm.provision "shell", inline: <<-SHELL
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential
sudo apt-get install python-pip
sudo apt-get install sshpass
SHELL
end
config.vm.define "web" do |web|
web.vm.box = "bento/centos-7.1"
web.vm.hostname = "web"
web.vm.network "private_network", ip: "192.168.33.20"
web.vm.network "forwarded_port", guest: 80, host: 8080
end
config.vm.define "db" do |db|
db.vm.box = "bento/centos-7.1"
db.vm.hostname = "db"
db.vm.network "private_network", ip: "192.168.33.30"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment