diff options
author | brettcave <brett@cave.za.net> | 2014-06-26 04:35:04 +0200 |
---|---|---|
committer | Grant Ridder <shortdudey123@gmail.com> | 2017-02-21 14:03:43 -0800 |
commit | 1c0d4f3e05c3adb88bef0a2302dcca90e885181d (patch) | |
tree | 003c5d53147476cea52fd8788f6941964a210347 /lib/chef/knife/bootstrap.rb | |
parent | 8f318ae3a874f0708cbde3855096d110bb75e5bb (diff) | |
download | chef-1c0d4f3e05c3adb88bef0a2302dcca90e885181d.tar.gz |
CHEF-4538 - add an option for gateway_identity_file that will allow key-based authentication on the gateway.
CHEF-4538 - rename option to be consistent with knife-ec2 option.
CHEF-4538 - added parameter to config. Added config merge from parameter for ssh. Added ssh test for gateway identity.
CHEF-4538 - bootstrap parameter for gateway identity
Diffstat (limited to 'lib/chef/knife/bootstrap.rb')
-rw-r--r-- | lib/chef/knife/bootstrap.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/chef/knife/bootstrap.rb b/lib/chef/knife/bootstrap.rb index ee4d9ce7af..f9dca7896a 100644 --- a/lib/chef/knife/bootstrap.rb +++ b/lib/chef/knife/bootstrap.rb @@ -67,6 +67,11 @@ class Chef :description => "The ssh gateway", :proc => Proc.new { |key| Chef::Config[:knife][:ssh_gateway] = key } + 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 } + option :forward_agent, :short => "-A", :long => "--forward-agent", @@ -438,6 +443,7 @@ class Chef ssh.config[:ssh_password] = config[:ssh_password] ssh.config[:ssh_port] = config[:ssh_port] ssh.config[:ssh_gateway] = config[:ssh_gateway] + ssh.config[:ssh_gateway_identity] = config[:ssh_gateway_identity] ssh.config[:forward_agent] = config[:forward_agent] ssh.config[:ssh_identity_file] = config[:ssh_identity_file] || config[:identity_file] ssh.config[:manual] = true |