#810: fixed ssh commands

This commit is contained in:
amartynov 2015-10-05 13:39:29 +03:00
parent c0219ab1be
commit 03e3b16aca

View File

@ -6,8 +6,10 @@ module SshCommands
end
def ssh_execute server, cmd
key_path = File.join(DevopsCid.config[:keys_dir], server[:private_key])
res = `ssh -i #{key_path} #{server[:remote_user]}@#{server[:host]} '#{cmd}'`
key_path = File.join(DevopsConfig.config[:keys_dir], server[:private_key])
ssh_cmd = "ssh -i #{key_path} #{server[:remote_user]}@#{server[:host]} '#{cmd}'"
DevopsLogger.logger.info "Ssh command: #{ssh_cmd}"
res = `#{ssh_cmd}`
return res, $?
end