# -*- mode: ruby -*- # vi: set ft=ruby : Vagrant.configure("2") do |config| <%- services.each do |k, v| -%> config.vm.define :<%= k %> do |c| c.vm.box = "<%= v['box'] %>" c.vm.synced_folder ".", "/vagrant", disabled: true <%- if v['url'] -%> c.vm.box_url = "<%= v['url'] %>" <%- end -%> c.vm.hostname = "<%= k %>" <%- if v['ip'] -%> c.vm.network "private_network", ip: "<%= v['ip'] %>" <%- end -%> <%- if v['forwarded_port'] -%> <%- v['forwarded_port'].each do |port| -%> c.vm.network "forwarded_port", guest: <%= port['guest'] %>, host: <%= port['host'] %> <%- end -%> <%- end -%> <%- if v['synced_folder'] -%> <%- v['synced_folder'].each do |volume| -%> c.vm.synced_folder "<%= volume['host'] %>", "<%= volume['guest'] %>" <%- end -%> <%- end -%> <%- if v['memory'] -%> c.vm.provider :virtualbox do |vb| vb.customize ["modifyvm", :id, "--memory", "<%= v['memory'] %>"] end <%- end -%> end <%- end -%> end