diff options
author | Saku Ytti <saku@ytti.fi> | 2018-06-22 19:31:12 +0300 |
---|---|---|
committer | Saku Ytti <saku@ytti.fi> | 2018-06-22 19:31:12 +0300 |
commit | 04ffb2c68ac7f069bd9f33f39c77095c979aaec1 (patch) | |
tree | a2e99dd5d0806d10f88f0140b3ab98e6c265b5c6 /lib/oxidized/input | |
parent | 7a99cd83da26e21921311011fea63dacfd2999ae (diff) |
rubycop fixes
Diffstat (limited to 'lib/oxidized/input')
-rw-r--r-- | lib/oxidized/input/ssh.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/oxidized/input/ssh.rb b/lib/oxidized/input/ssh.rb index 82335f9..01f7063 100644 --- a/lib/oxidized/input/ssh.rb +++ b/lib/oxidized/input/ssh.rb @@ -24,7 +24,7 @@ module Oxidized @log = File.open(Oxidized::Config::Log + "/#{@node.ip}-ssh", 'w') if Oxidized.config.input.debug? Oxidized.logger.debug "lib/oxidized/input/ssh.rb: Connecting to #{@node.name}" - @ssh = Net::SSH.start(@node.ip, @node.auth[:username], get_ssh_opts) + @ssh = Net::SSH.start(@node.ip, @node.auth[:username], make_ssh_opts) unless @exec shell_open @ssh begin @@ -117,13 +117,13 @@ module Oxidized end end - def get_ssh_opts + def make_ssh_opts ssh_opts = { port: (vars(:ssh_port) || 22).to_i, paranoid: secure, keepalive: true, password: @node.auth[:password], timeout: Oxidized.config.timeout, - number_of_password_prompts: 0 + number_of_password_prompts: 0 } auth_methods = vars(:auth_methods) || %w(none publickey password) |