From 04ffb2c68ac7f069bd9f33f39c77095c979aaec1 Mon Sep 17 00:00:00 2001 From: Saku Ytti Date: Fri, 22 Jun 2018 19:31:12 +0300 Subject: rubycop fixes --- lib/oxidized/input/ssh.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/oxidized/input') 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) -- cgit v1.2.1