From c8e02ddd7845d98316876140cb5d011e23702b2c Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Thu, 6 Mar 2014 12:18:13 -0800 Subject: [PATCH] synced_folders/rsync: rsync__auto options --- plugins/synced_folders/rsync/command/rsync_auto.rb | 4 ++++ website/docs/source/v2/synced-folders/rsync.html.md | 3 +++ 2 files changed, 7 insertions(+) diff --git a/plugins/synced_folders/rsync/command/rsync_auto.rb b/plugins/synced_folders/rsync/command/rsync_auto.rb index 3419cd9fe..1f6627198 100644 --- a/plugins/synced_folders/rsync/command/rsync_auto.rb +++ b/plugins/synced_folders/rsync/command/rsync_auto.rb @@ -36,6 +36,10 @@ module VagrantPlugins next if !folders || folders.empty? folders.each do |id, folder_opts| + # If we marked this folder to not auto sync, then + # don't do it. + next if folder_opts.has_key?(:auto) && !folder_opts[:auto] + hostpath = folder_opts[:hostpath] hostpath = File.expand_path(hostpath, machine.env.root_path) paths[hostpath] ||= [] diff --git a/website/docs/source/v2/synced-folders/rsync.html.md b/website/docs/source/v2/synced-folders/rsync.html.md index 0d99c5364..0ddc58a13 100644 --- a/website/docs/source/v2/synced-folders/rsync.html.md +++ b/website/docs/source/v2/synced-folders/rsync.html.md @@ -42,6 +42,9 @@ The rsync synced folder type accepts the following options: * `rsync__args` (string or array of strings) - A list of arguments to supply to `rsync`. By default this is "--verbose --archive --delete -z". +* `rsync__auto` (boolean) - If false, then `rsync-auto` will not + watch and automatically sync this folder. By default, this is true. + * `rsync__exclude` (string or array of strings) - A list of files or directories to exclude from the sync. The values can be any acceptable rsync exclude pattern. By default, the ".vagrant/" directory is excluded. We recommend