summaryrefslogtreecommitdiff
path: root/lib/chef
diff options
context:
space:
mode:
authorsiddheshwar-more <siddheshwar.more@clogeny.com>2014-10-09 21:45:16 +0530
committersiddheshwar-more <siddheshwar.more@clogeny.com>2014-10-09 21:45:16 +0530
commit19cd53bcf0dad14c8def6aaf719f548b86d46164 (patch)
treee3c93cdaa720182f5f5950011662fd3931529505 /lib/chef
parentd75c5b69de9ec183a0ba1c90c6dc5e3c58799301 (diff)
downloadchef-19cd53bcf0dad14c8def6aaf719f548b86d46164.tar.gz
Fixed issue related to precedence of knife config options
Diffstat (limited to 'lib/chef')
-rw-r--r--lib/chef/knife/bootstrap.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/chef/knife/bootstrap.rb b/lib/chef/knife/bootstrap.rb
index a992cf5779..7552156ba5 100644
--- a/lib/chef/knife/bootstrap.rb
+++ b/lib/chef/knife/bootstrap.rb
@@ -280,14 +280,14 @@ class Chef
ssh = Chef::Knife::Ssh.new
ssh.ui = ui
ssh.name_args = [ server_name, ssh_command ]
- ssh.config[:ssh_user] = Chef::Config[:knife][:ssh_user] || config[:ssh_user]
+ ssh.config[:ssh_user] = config[:ssh_user] || Chef::Config[:knife][:ssh_user]
ssh.config[:ssh_password] = config[:ssh_password]
- ssh.config[:ssh_port] = Chef::Config[:knife][:ssh_port] || config[:ssh_port]
- ssh.config[:ssh_gateway] = Chef::Config[:knife][:ssh_gateway] || config[:ssh_gateway]
- ssh.config[:forward_agent] = Chef::Config[:knife][:forward_agent] || config[:forward_agent]
- ssh.config[:identity_file] = Chef::Config[:knife][:identity_file] || config[:identity_file]
+ ssh.config[:ssh_port] = config[:ssh_port] || Chef::Config[:knife][:ssh_port]
+ ssh.config[:ssh_gateway] = config[:ssh_gateway] || Chef::Config[:knife][:ssh_gateway]
+ ssh.config[:forward_agent] = config[:forward_agent] || Chef::Config[:knife][:forward_agent]
+ ssh.config[:identity_file] = config[:identity_file] || Chef::Config[:knife][:identity_file]
ssh.config[:manual] = true
- ssh.config[:host_key_verify] = Chef::Config[:knife][:host_key_verify] || config[:host_key_verify]
+ ssh.config[:host_key_verify] = config[:host_key_verify] || Chef::Config[:knife][:host_key_verify]
ssh.config[:on_error] = :raise
ssh
end