tknerr / vagrant-managed-servers

Enables Vagrant to ssh into and provision managed servers
MIT License
185 stars 30 forks source link

rsync__exclude items ignored #24

Closed robbie-cahill closed 7 years ago

robbie-cahill commented 9 years ago

I noticed if you have an rsync shared folder set up and you specify items to exclude using rsync__exclude, those items are still synced over.

I took a quick look through https://github.com/tknerr/vagrant-managed-servers/blob/master/lib/vagrant-managed-servers/action/sync_folders.rb, I can't see anywhere it checks for the rsync__exclude option?

It would be good to have this option so that you can exclude things like environment specific config files etc...

robbie-cahill commented 9 years ago

My workaround for now (working for me):

Sync code to a codesync folder instead of the actual site folder.

Write a cookbook to rsync the code from the codesync folder to the site folder, excluding local config fies

tknerr commented 9 years ago

@insprintorob where does the rsync_exclude option come from? Am 04.10.2014 14:23 schrieb "insprintorob" notifications@github.com:

My workaround for now (working for me):

Sync code to a codesync folder instead of the actual site folder.

Write a cookbook to rsync the code from the codesync folder to the site folder, excluding local config fies

— Reply to this email directly or view it on GitHub https://github.com/tknerr/vagrant-managed-servers/issues/24#issuecomment-57903263 .

robbie-cahill commented 9 years ago

Its part of the rsync synced folder provider. There is documentation on it here https://docs.vagrantup.com/v2/synced-folders/rsync.html

tknerr commented 9 years ago

@insprintorob you could try to override the "." synced folder, but I'm not sure whether it will work with the managed-servers plugin (actually I think it will not :-(, but it's worth a try):

Vagrant.configure("2") do |config|
  ...
  config.vm.synced_folder ".", "/vagrant", type: "rsync", rsync__exclude: "foo.txt"
  ...
end
tknerr commented 9 years ago

Related to #17 btw

tknerr commented 7 years ago

fixed via #68