Last active
August 29, 2015 14:07
-
-
Save choplin/6c18b2d8519f21e113db to your computer and use it in GitHub Desktop.
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
[ | |
{name: 'foo1', ip: '192.168.77.21'}, | |
{name: 'foo2', ip: '192.168.77.22'}, | |
{name: 'foo3', ip: '192.168.77.23'}, | |
{name: 'bar1', ip: '192.168.77.24'}, | |
{name: 'bar2', ip: '192.168.77.25'}, | |
{name: 'bar3', ip: '192.168.77.26'}, | |
].each do |m| | |
config.vm.define m[:name] do |c| | |
c.vm.box = "sl65" | |
c.vm.network "private_network", ip: m[:ip] | |
end | |
end | |
config.vm.define "foo1" do |c| | |
c.vm.provision "ansible" do |ansible| | |
ansible.playbook = "site.yml" | |
ansible.limit = 'all' | |
ansible.groups = { | |
"foo" => %w(foo1 foo2 foo3), | |
"bar" => %w(bar1 bar2 bar3) | |
} | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment