diff options
-rw-r--r-- | lib/chef/knife/bootstrap.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/chef/knife/bootstrap.rb b/lib/chef/knife/bootstrap.rb index 3f8f3642b5..0ba0e72f66 100644 --- a/lib/chef/knife/bootstrap.rb +++ b/lib/chef/knife/bootstrap.rb @@ -69,8 +69,7 @@ class Chef option :session_timeout, long: "--session-timeout SECONDS", description: "The number of seconds to wait for each connection operation to be acknowledged while running bootstrap.", - proc: Proc.new { |protocol| Chef::Config[:knife][:session_timeout] = protocol }, - default: 60 + proc: Proc.new { |protocol| Chef::Config[:knife][:session_timeout] = protocol } # WinRM Authentication option :winrm_ssl_peer_fingerprint, @@ -839,7 +838,7 @@ class Chef return opts if connection_protocol == "winrm" opts[:non_interactive] = true # Prevent password prompts from underlying net/ssh opts[:forward_agent] = (config_value(:ssh_forward_agent) === true) - opts[:connection_timeout] = config_value(:session_timeout).to_i + opts[:connection_timeout] = config_value(:session_timeout)&.to_i || 60 opts end @@ -938,7 +937,7 @@ class Chef opts[:ca_trust_file] = config_value(:ca_trust_file) end - opts[:operation_timeout] = config_value(:session_timeout).to_i + opts[:operation_timeout] = config_value(:session_timeout)&.to_i || 60 opts end |