# -*- mode: ruby -*-
# vi: set ft=ruby :

# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  (1..3).each do |i|
    vmname = "team#{i}"
    config.vm.define vmname.to_sym do |team_conf|
      team_conf.vm.hostname = vmname
      team_conf.vm.box = "precise64"
      team_conf.vm.box_url = "http://files.vagrantup.com/precise64.box"
      team_conf.vm.network :public_network, :bridge => 'eth0', :auto_config => false
      team_conf.vm.network :forwarded_port, guest: 22, host: 2200+i
      team_conf.ssh.port = 2200+i
      config.vm.provision :ansible do |ansible|
        ansible.verbose = true
        ansible.playbook = "target_playbook.yml"
        ansible.inventory_file = "target_inventory"
        ansible.extra_vars = {
            address:"192.168.33.#{20+i}/24", 
            device:"eth1", 
            ansible_ssh_port: 2200+i}
      end
    end
  end
end

