Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.

support user specified rsync excludes. #156

Merged
merged 1 commit into from
Dec 17, 2013

Conversation

databus23
Copy link
Contributor

This pull request is a simple solution for configurable rsync excludes requested in #140 and #152.

Instead of introducing a new plugin specific configuration option this change uses the already existing options hash of synced folders.
It allows to specify excludes for each defined synced folder in the Vagrantfile.
e.g.:

config.vm.synced_folder '.', '/vagrant', :rsync_excludes => ['chef/tmp', 'tmp']

This commit allows to specify subfolders that should be excluded from syncing via synced_folder options:
e.g.:
config.vm.synced_folder '.', '/vagrant', :rsync_excludes => ['chef/tmp', 'tmp']
@tralamazza
Copy link
Collaborator

haha I had the exact same implementation in a local branch ;)

@tralamazza
Copy link
Collaborator

I'm still not convinced about super specific rsync flags though :/

@@ -66,11 +66,14 @@ def call(env)
env[:machine].communicate.sudo("mkdir -p '#{guestpath}'")
env[:machine].communicate.sudo(
"chown #{ssh_info[:username]} '#{guestpath}'")

#collect rsync excludes specified :rsync_excludes=>['path1',...] in synced_folder options
excludes = ['.vagrant/', 'Vagrantfile', *Array(data[:rsync_excludes])]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adding a .uniq wouldn't hurt I think

@johntdyer
Copy link

👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants