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
1 changed files with 9 additions and 10 deletions

19
Vagrantfile vendored
View File

@ -39,6 +39,14 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
chef.roles_path = "roles"
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|
config.vm.define box[:name] do |node|
node.vm.provider :virtualbox do |vb|
@ -57,16 +65,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
end
node.vm.hostname = box[:name]
# 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|
node.vm.provision :chef_solo do |chef|
chef_default.call(chef)
chef.add_role box[:role].to_s
chef.json = box[:json]