VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(2) do |config|

  config.vm.box = "ubuntu/trusty64"

  config.vm.synced_folder "./", "/srv/NGINX-Demos/random-files"

  config.vm.define "frontend" do |frontend|
    frontend.vm.network "private_network", :ip => "10.2.2.65"
    frontend.vm.provision "ansible" do |ansible|
      ansible.playbook = "./setup_random_files_frontend.yml"
      ansible.sudo = true
    end
  end

  config.vm.define "backend" do |backend|
    backend.vm.network "private_network", :ip => "10.2.2.90"
    backend.vm.provision "ansible" do |ansible|
      ansible.playbook = "./setup_random_files_backend.yml"
      ansible.sudo = true
    end
  end
end
