lib/cloud_providers/connections.rb
# hostname or ip to use when running remote commands
hostname or ip to use when running remote commands
hostname or ip to use when running remote commands
def rsync( opts={} )
      raise StandardError.new("You must pass a :source=>uri option to rsync") unless opts[:source]
      ssh_error_msg="SSH is not available for this node. perhaps you need to authorize it?"
      raise PoolParty::PoolPartyError.create("SSHError", ssh_error_msg) unless ssh_available?
      destination_path = opts[:destination] || opts[:source]
      rsync_opts = opts[:rsync_opts] || '-va'
      rsync_opts += %q% --rsync-path="sudo rsync"% unless user=="root"
      rsync_opts += %q% --exclude=.svn --exclude=.git --exclude=.cvs %
      cmd_string =  "rsync -L  -e 'ssh #{ssh_options}' #{rsync_opts} #{opts[:source]}  #{user}@#{host}:#{destination_path}"
      out = system_run(cmd_string, :quiet => true)
      out
    end
def rsync ( opts = { } ) raise StandardError . new ( "You must pass a :source=>uri option to rsync" ) unless opts [ :source ] ssh_error_msg = "SSH is not available for this node. perhaps you need to authorize it?" raise PoolParty :: PoolPartyError . create ( "SSHError" , ssh_error_msg ) unless ssh_available? destination_path = opts [ :destination ] || opts [ :source ] rsync_opts = opts [ :rsync_opts ] || '-va' rsync_opts += %q% --rsync-path="sudo rsync"% unless user == "root" rsync_opts += %q% --exclude=.svn --exclude=.git --exclude=.cvs % cmd_string = "rsync -L  -e 'ssh #{ssh_options}' #{rsync_opts} #{opts[:source]}  #{user}@#{host}:#{destination_path}" out = system_run ( cmd_string , :quiet => true ) out end
hostname or ip to use when running remote commands
hostname or ip to use when running remote commands
opts