From d2711f703bb0f6e704cb56b4ebec3d370f9b746a Mon Sep 17 00:00:00 2001 From: Graham Taylor Date: Wed, 5 Feb 2014 15:15:26 +0000 Subject: [PATCH] Use release_roles instead of roles so we only run rsync on nodes we are deploying on to --- lib/capistrano/rsync.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/capistrano/rsync.rb b/lib/capistrano/rsync.rb index 758d96b..14ba310 100644 --- a/lib/capistrano/rsync.rb +++ b/lib/capistrano/rsync.rb @@ -27,7 +27,7 @@ desc "Stage and rsync to the server (or its cache)." task :rsync => %w[rsync:stage] do - roles(:all).each do |role| + release_roles(:all).each do |role| user = role.user + "@" if !role.user.nil? rsync = %w[rsync] @@ -80,7 +80,7 @@ next if !fetch(:rsync_cache) copy = %(#{fetch(:rsync_copy)} "#{rsync_cache.call}/" "#{release_path}/") - on roles(:all).each do execute copy end + on release_roles(:all).each do execute copy end end # Matches the naming scheme of git tasks.