diff options
author | Michael Hale <mike@hales.ws> | 2011-01-13 02:05:22 -0500 |
---|---|---|
committer | Bryan McLellan <btm@opscode.com> | 2011-07-19 08:07:39 -0700 |
commit | 8eb2a8414782dbadd58767f5f8e15ddbd5519835 (patch) | |
tree | 2be4661d01dd96c3eb1fee68f693936396662c35 /chef/lib/chef/knife/ssh.rb | |
parent | 2c68c54b36dce7dd86b01a5bf0f576aa50dcb39a (diff) | |
download | chef-8eb2a8414782dbadd58767f5f8e15ddbd5519835.tar.gz |
configure a default ssh attribute in knife.rb
Diffstat (limited to 'chef/lib/chef/knife/ssh.rb')
-rw-r--r-- | chef/lib/chef/knife/ssh.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/chef/lib/chef/knife/ssh.rb b/chef/lib/chef/knife/ssh.rb index ca9b60fe42..a3286c9848 100644 --- a/chef/lib/chef/knife/ssh.rb +++ b/chef/lib/chef/knife/ssh.rb @@ -301,11 +301,21 @@ class Chef end end + def configure_attribute + if Chef::Config[:knife][:ssh_attribute] + config[:attribute] = Chef::Config[:knife][:ssh_attribute] + end + config[:attribute] ||= "fqdn" + config[:attribute].strip! + end + def run extend Chef::Mixin::Command @longest = 0 + configure_attribute + configure_session case @name_args[1] |