From 1cb613367dae4646b3072b7a4e1127585859643a Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Fri, 22 Jul 2011 23:09:37 -0700 Subject: [PATCH] Name the shared-folders logical name using atomic counter to allow multiple chef solo provisioners. --- lib/vagrant/provisioners/chef_solo.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/vagrant/provisioners/chef_solo.rb b/lib/vagrant/provisioners/chef_solo.rb index 977116198..7e7d0c4bb 100644 --- a/lib/vagrant/provisioners/chef_solo.rb +++ b/lib/vagrant/provisioners/chef_solo.rb @@ -76,12 +76,10 @@ module Vagrant # Shares the given folders with the given prefix. The folders should # be of the structure resulting from the `expanded_folders` function. def share_folders(prefix, folders) - index = 0 folders.each do |type, local_path, remote_path| if type == :host - env.config.vm.share_folder("v-#{prefix}-#{index}", + env.config.vm.share_folder("v-#{prefix}-#{self.class.get_and_update_counter}", remote_path, local_path, :nfs => config.nfs) - index += 1 end end end