diff options
author | Saku Ytti <saku@ytti.fi> | 2018-06-22 19:50:06 +0300 |
---|---|---|
committer | Saku Ytti <saku@ytti.fi> | 2018-06-22 19:50:06 +0300 |
commit | bd2c06fcc972560063499f25d685e11e7f16fc24 (patch) | |
tree | f584f27ed8ad87306debdbfb3fa27997a597d75f /lib/oxidized | |
parent | bb0ff49ad46be5b09dfb6ebde3995bf3a0efa32b (diff) |
smell reduction bug fixes
Diffstat (limited to 'lib/oxidized')
-rw-r--r-- | lib/oxidized/input/ssh.rb | 3 | ||||
-rw-r--r-- | lib/oxidized/node.rb | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/oxidized/input/ssh.rb b/lib/oxidized/input/ssh.rb index ccc3d1c..f881ff1 100644 --- a/lib/oxidized/input/ssh.rb +++ b/lib/oxidized/input/ssh.rb @@ -118,6 +118,7 @@ module Oxidized end def make_ssh_opts + secure = Oxidized.config.input.ssh.secure? ssh_opts = { port: (vars(:ssh_port) || 22).to_i, paranoid: secure, @@ -131,7 +132,7 @@ module Oxidized if proxy_host = vars(:ssh_proxy) proxy_command = "ssh " - proxy_command += "-o StrictHostKeyChecking=no " unless Oxidized.config.input.ssh.secure? + proxy_command += "-o StrictHostKeyChecking=no " unless secure proxy_command += "#{proxy_host} -W %h:%p" proxy = Net::SSH::Proxy::Command.new(proxy_command) ssh_opts[:proxy] = proxy diff --git a/lib/oxidized/node.rb b/lib/oxidized/node.rb index c3a6885..9dfeb19 100644 --- a/lib/oxidized/node.rb +++ b/lib/oxidized/node.rb @@ -223,7 +223,7 @@ module Oxidized value end - def git_type + def git_type opt type = opt[:output] || Oxidized.config.output.default return nil unless type[0..2] == "git" type |