diff options
author | Jeff Blaine <jblaine@kickflop.net> | 2015-08-31 14:48:43 -0400 |
---|---|---|
committer | Bryan McLellan <btm@chef.io> | 2015-11-23 18:02:07 -0500 |
commit | 3419637a9d287782162b3fd76041a449bc5f07e7 (patch) | |
tree | f3213bca57f04bdfc31550005f5cba85db5bb538 /lib | |
parent | 2fe875ce8d38631bf9b5975ff3f3cf5b532be2bd (diff) | |
download | chef-3419637a9d287782162b3fd76041a449bc5f07e7.tar.gz |
Migrate to --ssh-identity-file instead of --identity-file
Fixes #3434
Introduces --ssh-identity-file which is more like the
other SSH arguments (they all begin with --ssh except
this one). Behavior is unchanged.
Migrates '-i' over with --ssh-identity-file
Retains --identity-file with a deprecation statement.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/chef/knife/bootstrap.rb | 10 | ||||
-rw-r--r-- | lib/chef/knife/ssh.rb | 6 |
2 files changed, 13 insertions, 3 deletions
diff --git a/lib/chef/knife/bootstrap.rb b/lib/chef/knife/bootstrap.rb index 6830342b89..5d9c2a46ba 100644 --- a/lib/chef/knife/bootstrap.rb +++ b/lib/chef/knife/bootstrap.rb @@ -74,8 +74,12 @@ class Chef :boolean => true option :identity_file, - :short => "-i IDENTITY_FILE", :long => "--identity-file IDENTITY_FILE", + :description => "The SSH identity file used for authentication. [DEPRECATED] Use --ssh-identity-file instead." + + option :ssh_identity_file, + :short => "-i IDENTITY_FILE", + :long => "--ssh-identity-file IDENTITY_FILE", :description => "The SSH identity file used for authentication" option :chef_node_name, @@ -426,7 +430,8 @@ class Chef ssh.config[:ssh_port] = config[:ssh_port] ssh.config[:ssh_gateway] = config[:ssh_gateway] ssh.config[:forward_agent] = config[:forward_agent] - ssh.config[:identity_file] = config[:identity_file] + ssh.config[:identity_file] = config[:identity_file] # DEPRECATED + ssh.config[:ssh_identity_file] = config[:ssh_identity_file] ssh.config[:manual] = true ssh.config[:host_key_verify] = config[:host_key_verify] ssh.config[:on_error] = :raise @@ -436,6 +441,7 @@ class Chef def knife_ssh_with_password_auth ssh = knife_ssh ssh.config[:identity_file] = nil + ssh.config[:ssh_identity_file] = nil ssh.config[:ssh_password] = ssh.get_password ssh end diff --git a/lib/chef/knife/ssh.rb b/lib/chef/knife/ssh.rb index 81eeea6286..eeed7827f4 100644 --- a/lib/chef/knife/ssh.rb +++ b/lib/chef/knife/ssh.rb @@ -94,8 +94,12 @@ class Chef :boolean => true option :identity_file, - :short => "-i IDENTITY_FILE", :long => "--identity-file IDENTITY_FILE", + :description => "The SSH identity file used for authentication. [DEPRECATED] Use --ssh-identity-file instead." + + option :ssh_identity_file, + :short => "-i IDENTITY_FILE", + :long => "--ssh-identity-file IDENTITY_FILE", :description => "The SSH identity file used for authentication" option :host_key_verify, |