From fd718a71aa0b01739bcde6dcd97e8c9b8f0fd65c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Mon, 27 Jan 2014 11:15:52 +0100 Subject: [PATCH] Varantfile: fix general provisioner block before node loop --- Vagrantfile | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index b76a2aa..8651db7 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -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]