lib/fdlcap/recipes/rsync.rb in factorylabs-fdlcap-0.3.27 vs lib/fdlcap/recipes/rsync.rb in factorylabs-fdlcap-0.3.28
- old
+ new
@@ -13,10 +13,11 @@
task :pull_shared , :roles => :app do
servers = find_servers :roles => :app, :except => { :no_release => true }
server = servers.first
if server
symlink_dirs.each do |share|
+ `echo '#{password}' | /usr/bin/pbcopy`
execute( "rsync -P -a -h -e 'ssh -p #{server.port || 22}' #{user}@#{server.host}:#{shared_path}/#{share}/* #{share}", "unable to run rsync files")
end
else
puts 'no server found'
end
@@ -28,9 +29,10 @@
task :push_shared , :roles => :app do
servers = find_servers :roles => :app, :except => { :no_release => true }
server = servers.first
if server
symlink_dirs.each do |share|
+ `echo '#{password}' | /usr/bin/pbcopy`
execute( "rsync -P -a -h -e 'ssh -p #{server.port || 22}' #{share}/* #{user}@#{server.host}:#{shared_path}/#{share}/", "unable to run rsync files")
end
else
puts 'no server found'
end
\ No newline at end of file