diff options
| author | Paul Buetow (uranus) <paul@buetow.org> | 2015-10-18 11:32:40 +0100 |
|---|---|---|
| committer | Paul Buetow (uranus) <paul@buetow.org> | 2015-10-18 11:32:40 +0100 |
| commit | b3c43baa3eb2afef0f017a5d4bc8329ffe8a8035 (patch) | |
| tree | 9c6e9c5e90603794dde5d4b12fb918c0199c79d1 | |
| parent | 3b105ce6d00260229eefdadfc94db94bddc9eb99 (diff) | |
refactor
| -rwxr-xr-x | rubyfy.rb | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -104,8 +104,9 @@ private log(:VERBOSE,"#{server}::Connecting") sudo = root ? "sudo " : "" Net::SSH.start(server, user) do |session| - log(:VERBOSE, "#{server}::Executing #{sudo}#{command}") - session.exec!("#{sudo}sh -c \"#{command}\"") do |channel, stream, data| + exec_command = "#{sudo}sh -c \"#{command}\"" + log(:VERBOSE, "#{server}::Executing #{exec_command}") + session.exec!(exec_command) do |channel, stream, data| log(:OUT, "#{server}::#{data}") unless @conf["silent"] end end |
