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

Commit

Permalink
Merge branch 'rsync_excludes' of github.com:databus23/vagrant-aws int…
Browse files Browse the repository at this point in the history
…o databus23-rsync_excludes

Conflicts:
	lib/vagrant-aws/action/sync_folders.rb
  • Loading branch information
tralamazza committed Dec 17, 2013
2 parents eda00c3 + 23e9323 commit 169ac47
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/vagrant-aws/action/sync_folders.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,13 @@ def call(env)
env[:machine].communicate.sudo(
"chown -R #{ssh_info[:username]} '#{guestpath}'")

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

# Rsync over to the guest path using the SSH info
command = [
"rsync", "--verbose", "--archive", "-z",
"--exclude", ".vagrant/", "--exclude", "Vagrantfile",
*excludes.map{|e|['--exclude', e]}.flatten,
"-e", "ssh -p #{ssh_info[:port]} -o StrictHostKeyChecking=no #{ssh_key_options(ssh_info)}",
hostpath,
"#{ssh_info[:username]}@#{ssh_info[:host]}:#{guestpath}"]
Expand Down

0 comments on commit 169ac47

Please sign in to comment.