synced_folders/rsync: rsync__chown [GH-3810]
This commit is contained in:
parent
e107202050
commit
34b7cace7b
|
@ -15,6 +15,8 @@ BUG FIXES:
|
|||
- guests/freebsd: Properly register the rsync_pre capability
|
||||
- guests/windows: Certain executed provisioners won't leave output
|
||||
and exit status behind. [GH-3729]
|
||||
- synced\_folders/rsync: `rsync__chown` can be set to `false` to
|
||||
disable recursive chown after sync. [GH-3810]
|
||||
|
||||
## 1.6.2 (May 12, 2014)
|
||||
|
||||
|
|
|
@ -17,6 +17,10 @@ module VagrantPlugins
|
|||
end
|
||||
|
||||
def self.rsync_post(machine, opts)
|
||||
if opts.has_key?(:chown) && !opts[:chown]
|
||||
return
|
||||
end
|
||||
|
||||
machine.communicate.sudo(
|
||||
"find '#{opts[:guestpath]}' '(' ! -user #{opts[:owner]} -or ! -group #{opts[:group]} ')' -print0 | " +
|
||||
"xargs -0 -r chown #{opts[:owner]}:#{opts[:group]}")
|
||||
|
|
|
@ -23,6 +23,10 @@ module VagrantPlugins
|
|||
end
|
||||
|
||||
def self.rsync_post(machine, opts)
|
||||
if opts.has_key?(:chown) && !opts[:chown]
|
||||
return
|
||||
end
|
||||
|
||||
machine.communicate.sudo(
|
||||
"find '#{opts[:guestpath]}' '(' ! -user #{opts[:owner]} -or ! -group #{opts[:group]} ')' -print0 | " +
|
||||
"xargs -0 -r chown #{opts[:owner]}:#{opts[:group]}")
|
||||
|
|
|
@ -17,6 +17,10 @@ module VagrantPlugins
|
|||
end
|
||||
|
||||
def self.rsync_post(machine, opts)
|
||||
if opts.has_key?(:chown) && !opts[:chown]
|
||||
return
|
||||
end
|
||||
|
||||
machine.communicate.sudo(
|
||||
"find '#{opts[:guestpath]}' " +
|
||||
"'!' -type l -a " +
|
||||
|
|
|
@ -45,6 +45,11 @@ The rsync synced folder type accepts the following options:
|
|||
* `rsync__auto` (boolean) - If false, then `rsync-auto` will not
|
||||
watch and automatically sync this folder. By default, this is true.
|
||||
|
||||
* `rsync__chown` (boolean) - If false, then the `owner` and `group`
|
||||
options for the synced folder are ignored and Vagrant won't execute
|
||||
a recursive `chown`. This defaults to true. This option exists because
|
||||
the `chown` causes issues for some development environments.
|
||||
|
||||
* `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
|
||||
|
|
Loading…
Reference in New Issue