Name the shared-folders logical name using atomic counter to allow multiple chef solo provisioners.

This commit is contained in:
Mitchell Hashimoto 2011-07-22 23:09:37 -07:00
parent 16c21ed9d1
commit 1cb613367d
1 changed files with 1 additions and 3 deletions

View File

@ -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