Name the shared-folders logical name using atomic counter to allow multiple chef solo provisioners.
This commit is contained in:
parent
16c21ed9d1
commit
1cb613367d
|
@ -76,12 +76,10 @@ module Vagrant
|
||||||
# Shares the given folders with the given prefix. The folders should
|
# Shares the given folders with the given prefix. The folders should
|
||||||
# be of the structure resulting from the `expanded_folders` function.
|
# be of the structure resulting from the `expanded_folders` function.
|
||||||
def share_folders(prefix, folders)
|
def share_folders(prefix, folders)
|
||||||
index = 0
|
|
||||||
folders.each do |type, local_path, remote_path|
|
folders.each do |type, local_path, remote_path|
|
||||||
if type == :host
|
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)
|
remote_path, local_path, :nfs => config.nfs)
|
||||||
index += 1
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue