lib/kitchen/transport/ssh.rb in test-kitchen-1.9.0 vs lib/kitchen/transport/ssh.rb in test-kitchen-1.9.1
- old
+ new
@@ -317,11 +317,12 @@
# construction.
#
# @param data [Hash] merged configuration and mutable state data
# @return [Hash] hash of connection options
# @api private
- def connection_options(data) # rubocop:disable Metrics/MethodLength
+ # rubocop:disable Metrics/MethodLength, Metrics/AbcSize, Metrics/CyclomaticComplexity
+ def connection_options(data)
opts = {
:logger => logger,
:user_known_hosts_file => "/dev/null",
:paranoid => false,
:hostname => data[:hostname],
@@ -340,9 +341,10 @@
opts[:keys_only] = true if data[:ssh_key]
opts[:keys] = Array(data[:ssh_key]) if data[:ssh_key]
opts[:auth_methods] = ["publickey"] if data[:ssh_key]
opts[:password] = data[:password] if data.key?(:password)
opts[:forward_agent] = data[:forward_agent] if data.key?(:forward_agent)
+ opts[:verbose] = data[:verbose].to_sym if data.key?(:verbose)
opts
end
# Creates a new SSH Connection instance and save it for potential future