diff options
author | curiositycasualty <isa@opscode.com> | 2014-06-19 10:06:28 -0700 |
---|---|---|
committer | curiositycasualty <isa@opscode.com> | 2014-06-19 10:06:28 -0700 |
commit | fc02f9156f4a479efc04e91b0edd5909b28b5be9 (patch) | |
tree | 3695b7c11816f37d129c828781de7bfca536a319 /lib/chef/knife/ssh.rb | |
parent | 633204305f8accc3110f07fc210d86b7c6a76070 (diff) | |
download | chef-fc02f9156f4a479efc04e91b0edd5909b28b5be9.tar.gz |
Allow csshX to respect identity_file
Diffstat (limited to 'lib/chef/knife/ssh.rb')
-rw-r--r-- | lib/chef/knife/ssh.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/chef/knife/ssh.rb b/lib/chef/knife/ssh.rb index 4edc63d8d3..71762659f5 100644 --- a/lib/chef/knife/ssh.rb +++ b/lib/chef/knife/ssh.rb @@ -431,6 +431,11 @@ class Chef end raise Chef::Exceptions::Exec, "no command found for cssh" unless cssh_cmd + # pass in the consolidated itentity file option to cssh(X) + if config[:identity_file] + cssh_cmd << " --ssh_args '-i #{File.expand_path(config[:identity_file])}'" + end + session.servers_for.each do |server| cssh_cmd << " #{server.user ? "#{server.user}@#{server.host}" : server.host}" end |