Vagrantfile in sshkit-1.2.0 vs Vagrantfile in sshkit-1.3.0

- old
+ new

@@ -1,19 +1,17 @@ -# -# vi: set ft=ruby -# +VAGRANTFILE_API_VERSION = "2" -Vagrant::Config.run do |config| +Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| + config.vm.box = 'precise64' + config.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/precise/current/precise-server-cloudimg-amd64-vagrant-disk1.box" - config.vm.define :one do |one| - one.vm.box = "precise64" - end + json_config_path = File.join("test", "boxes.json") + list = File.open(json_config_path).read + list = JSON.parse(list) - config.vm.define :two do |one| - one.vm.box = "precise64" + list.each do |vm| + config.vm.define vm["name"] do |web| + web.vm.box = "precise64" + web.vm.network "forwarded_port", guest: 22, host: vm["port"] + end end - - config.vm.define :three do |one| - one.vm.box = "precise64" - end - end