Skip to content

Commit

Permalink
Merge pull request #571 from MsysTechnologiesllc/dh/fix_ssh_agent_add…
Browse files Browse the repository at this point in the history
…_key_issue

Fix ssh agent add key issue
  • Loading branch information
tas50 authored May 13, 2019
2 parents cc1f0c2 + 3e2f5ed commit afa4251
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/chef/knife/ec2_server_create.rb
Original file line number Diff line number Diff line change
Expand Up @@ -778,6 +778,7 @@ def bootstrap_common_params(bootstrap)
bootstrap.config[:bootstrap_template] = locate_config_value(:bootstrap_template)
bootstrap.config[:use_sudo_password] = locate_config_value(:use_sudo_password)
bootstrap.config[:yes] = locate_config_value(:yes)

# If --chef-tag is provided then it will be set in chef as single value e.g. --chef-tag "myTag"
# Otherwise if --tag-node-in-chef is provided then it will tag the chef in key=value pair of --tags option
# e.g. --tags "key=value"
Expand Down Expand Up @@ -821,6 +822,7 @@ def bootstrap_for_windows_node(server, fqdn)
bootstrap.config[:ssh_password] = locate_config_value(:ssh_password)
bootstrap.config[:ssh_port] = locate_config_value(:ssh_port)
bootstrap.config[:identity_file] = locate_config_value(:identity_file)
bootstrap.config[:ssh_identity_file] = locate_config_value(:identity_file)
bootstrap.config[:no_host_key_verify] = locate_config_value(:no_host_key_verify)
bootstrap.config[:forward_agent] = locate_config_value(:forward_agent)
else
Expand Down Expand Up @@ -848,6 +850,7 @@ def bootstrap_for_linux_node(server, ssh_host)
bootstrap.config[:ssh_port] = config[:ssh_port]
bootstrap.config[:ssh_gateway] = config[:ssh_gateway]
bootstrap.config[:identity_file] = config[:identity_file]
bootstrap.config[:ssh_identity_file] = locate_config_value(:identity_file)

if locate_config_value(:chef_node_name)
bootstrap.config[:chef_node_name] = evaluate_node_name(locate_config_value(:chef_node_name))
Expand Down

0 comments on commit afa4251

Please sign in to comment.