summaryrefslogtreecommitdiff
path: root/chef/lib/chef/knife/ssh.rb
diff options
context:
space:
mode:
authorMichael Hale <mike@hales.ws>2011-01-13 02:05:22 -0500
committerBryan McLellan <btm@opscode.com>2011-07-19 08:07:39 -0700
commit8eb2a8414782dbadd58767f5f8e15ddbd5519835 (patch)
tree2be4661d01dd96c3eb1fee68f693936396662c35 /chef/lib/chef/knife/ssh.rb
parent2c68c54b36dce7dd86b01a5bf0f576aa50dcb39a (diff)
downloadchef-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.rb10
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]