Provisioners now sync folders

This commit is contained in:
Mitchell Hashimoto 2013-01-23 09:44:53 -08:00
parent 9cb86706b8
commit 7e55e96bd9
2 changed files with 7 additions and 6 deletions

View File

@ -111,9 +111,10 @@ module VagrantPlugins
def share_folders(root_config, prefix, folders)
folders.each do |type, local_path, remote_path|
if type == :host
root_config.vm.share_folder(
"v-#{prefix}-#{self.class.get_and_update_counter(:shared_folder)}",
remote_path, local_path, :nfs => @config.nfs)
root_config.vm.synced_folder(
local_path, remote_path,
:id => "v-#{prefix}-#{self.class.get_and_update_counter(:shared_folder)}",
:nfs => @config.nfs)
end
end
end

View File

@ -28,15 +28,15 @@ module VagrantPlugins
end
# Share the manifests directory with the guest
root_config.vm.share_folder(
"manifests", manifests_guest_path, @expanded_manifests_path)
root_config.vm.synced_folder(
@expanded_manifests_path, manifests_guest_path)
# Share the module paths
count = 0
@module_paths.each do |from, to|
# Sorry for the cryptic key here, but VirtualBox has a strange limit on
# maximum size for it and its something small (around 10)
root_config.vm.share_folder("v-pp-m#{count}", to, from)
root_config.vm.synced_folder(from, to)
count += 1
end
end