def ssh_file(opts, dest_path, contents=None, kwargs=None, local_file=None):
 if (opts.get('file_transport', 'sftp') == 'sftp'):
  return sftp_file(dest_path, contents, kwargs, local_file)
 return scp_file(dest_path, contents, kwargs, local_file)

def ssh_file ( opts , dest_path , contents = None , kwargs = None , local_file = None ) : if ( opts . get ( 'file_transport' , 'sftp' ) == 'sftp' ) : return sftp_file ( dest_path , contents , kwargs , local_file ) return scp_file ( dest_path , contents , kwargs , local_file )
copies a file to the remote ssh target using either sftp or scp .