Skip to content

Commit

Permalink
Provisioners now sync folders
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchellh committed Jan 23, 2013
1 parent 9cb8670 commit 7e55e96
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
7 changes: 4 additions & 3 deletions plugins/provisioners/chef/provisioner/chef_solo.rb
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,10 @@ def expanded_folders(paths, appended_folder=nil)
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
Expand Down
6 changes: 3 additions & 3 deletions plugins/provisioners/puppet/provisioner/puppet.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ def configure(root_config)
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
Expand Down

0 comments on commit 7e55e96

Please sign in to comment.