diff options
author | sawanoboly <sawanoboriyu@higanworks.com> | 2017-04-23 13:22:55 +0900 |
---|---|---|
committer | Bryan McLellan <btm@loftninjas.org> | 2017-07-25 14:30:55 -0400 |
commit | 93fe1aca2beff64b30910daa2aac615bc623d259 (patch) | |
tree | 5aa01c98e777bcb6b91d4ada7be8543c83c3002c /lib/chef/knife/ssh.rb | |
parent | 06da66921afc15816b72491311de2bf2ff2bf9d1 (diff) | |
download | chef-93fe1aca2beff64b30910daa2aac615bc623d259.tar.gz |
use ServerAliveInterval option if exists in ssh_config.
Signed-off-by: SAWANOBORI Yukihiko <sawanoboriyu@higanworks.com>
use keepalive settings if exists in ssh_config.
write spec to check whether it has been keepalive option was loaded from ssh_config.
Diffstat (limited to 'lib/chef/knife/ssh.rb')
-rw-r--r-- | lib/chef/knife/ssh.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/chef/knife/ssh.rb b/lib/chef/knife/ssh.rb index 380a60fdd6..ae14ce9954 100644 --- a/lib/chef/knife/ssh.rb +++ b/lib/chef/knife/ssh.rb @@ -273,6 +273,10 @@ class Chef opts[:paranoid] = false opts[:user_known_hosts_file] = "/dev/null" end + if ssh_config[:keepalive] + opts[:keepalive] = true + opts[:keepalive_interval] = ssh_config[:keepalive_interval] + end end end |