master
1# -*- mode: ruby -*-
2# vi: set ft=ruby :
3
4# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
5VAGRANTFILE_API_VERSION = "2"
6
7Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
8 (1..3).each do |i|
9 vmname = "team#{i}"
10 config.vm.define vmname.to_sym do |team_conf|
11 team_conf.vm.hostname = vmname
12 team_conf.vm.box = "precise64"
13 team_conf.vm.box_url = "http://files.vagrantup.com/precise64.box"
14 team_conf.vm.network :public_network, :bridge => 'eth0', :auto_config => false
15 team_conf.vm.network :forwarded_port, guest: 22, host: 2200+i
16 team_conf.ssh.port = 2200+i
17 config.vm.provision :ansible do |ansible|
18 ansible.verbose = true
19 ansible.playbook = "target_playbook.yml"
20 ansible.inventory_file = "target_inventory"
21 ansible.extra_vars = {
22 address:"192.168.33.#{20+i}/24",
23 device:"eth1",
24 ansible_ssh_port: 2200+i}
25 end
26 end
27 end
28end
29