diff options
author | Grant Ridder <shortdudey123@gmail.com> | 2017-02-21 15:12:17 -0800 |
---|---|---|
committer | Grant Ridder <shortdudey123@gmail.com> | 2017-02-21 16:16:46 -0800 |
commit | 03e0bbe62ecdbcd6701544c638bf5e60c3c02885 (patch) | |
tree | 37632d2d101faa7bdfa8c68b18b466dfb2e1ab54 /lib | |
parent | 97395b8b81949a3d0c648031d71c17fbf313a28a (diff) | |
download | chef-03e0bbe62ecdbcd6701544c638bf5e60c3c02885.tar.gz |
Fix spec testing for ssh_gateway_identity option
Signed-off-by: Grant Ridder <shortdudey123@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/chef/knife/ssh.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/chef/knife/ssh.rb b/lib/chef/knife/ssh.rb index 825160756f..cfe85ee156 100644 --- a/lib/chef/knife/ssh.rb +++ b/lib/chef/knife/ssh.rb @@ -94,8 +94,7 @@ class Chef option :ssh_gateway_identity, :long => "--ssh-gateway-identity SSH_GATEWAY_IDENTITY", - :description => "The SSH identity file used for gateway authentication", - :proc => Proc.new { |key| Chef::Config[:knife][:ssh_gateway_identity] = key.strip } + :description => "The SSH identity file used for gateway authentication" option :forward_agent, :short => "-A", @@ -554,6 +553,11 @@ class Chef config[:ssh_identity_file] = get_stripped_unfrozen_value(config[:ssh_identity_file] || config[:identity_file] || Chef::Config[:knife][:ssh_identity_file]) end + def configure_ssh_gateway_identity + # config[:identity_file] is DEPRECATED in favor of :ssh_identity_file + config[:ssh_gateway_identity] = get_stripped_unfrozen_value(config[:ssh_gateway_identity] || Chef::Config[:knife][:ssh_gateway_identity]) + end + def run @longest = 0 @@ -561,6 +565,7 @@ class Chef configure_password @password = config[:ssh_password] if config[:ssh_password] configure_ssh_identity_file + configure_ssh_gateway_identity configure_gateway configure_session |