Varantfile: fix general provisioner block before node loop

This commit is contained in:
Jörg Thalheim 2014-01-27 11:15:52 +01:00
parent e23be988b4
commit fd718a71aa

19
Vagrantfile vendored
View File

@ -39,6 +39,14 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
chef.roles_path = "roles" chef.roles_path = "roles"
end end
# Update Chef in VM to specific version before running chef provisioner
config.vm.provision :shell do |shell|
shell.path = "script/upgrade_chef.sh"
# target version
shell.args = "11.8.2"
end
config.vm.provision(:shell){ |shell| shell.path = "script/fix_stdin_error.sh" }
boxes.each do |box| boxes.each do |box|
config.vm.define box[:name] do |node| config.vm.define box[:name] do |node|
node.vm.provider :virtualbox do |vb| node.vm.provider :virtualbox do |vb|
@ -57,16 +65,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
end end
node.vm.hostname = box[:name] node.vm.hostname = box[:name]
node.vm.provision :chef_solo do |chef|
# Update Chef in VM to specific version before running chef provisioner
config.vm.provision :shell do |shell|
shell.path = "script/upgrade_chef.sh"
# target version
shell.args = "11.8.2"
end
config.vm.provision(:shell){ |shell| shell.path = "script/fix_stdin_error.sh" }
config.vm.provision :chef_solo do |chef|
chef_default.call(chef) chef_default.call(chef)
chef.add_role box[:role].to_s chef.add_role box[:role].to_s
chef.json = box[:json] chef.json = box[:json]