diff options
author | Tyler Ball <tball@chef.io> | 2019-05-13 10:23:06 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-13 10:23:06 -0600 |
commit | 8a9f86e86a8f3c36292123b4ab80e61460ed391d (patch) | |
tree | c744bf0a4384200e03e472b7d95f95f45b2f7047 | |
parent | 4e485c6944764bedb5e2b9b7b4ab9c5347df43d1 (diff) | |
parent | 8cd081315998097bdd9199d54c432c0211c85691 (diff) | |
download | chef-8a9f86e86a8f3c36292123b4ab80e61460ed391d.tar.gz |
Merge pull request #8522 from MsysTechnologiesllc/VSingh/bootstrap-winrm-minor-code-refactor
Chef 15: Minor winrm check code refactor
-rw-r--r-- | lib/chef/knife/bootstrap.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/chef/knife/bootstrap.rb b/lib/chef/knife/bootstrap.rb index 59d7e7007c..e143ebfe31 100644 --- a/lib/chef/knife/bootstrap.rb +++ b/lib/chef/knife/bootstrap.rb @@ -833,7 +833,7 @@ class Chef def ssh_opts opts = {} - return opts if connection_protocol == "winrm" + return opts if winrm? opts[:non_interactive] = true # Prevent password prompts from underlying net/ssh opts[:forward_agent] = (config_value(:ssh_forward_agent) === true) opts @@ -841,7 +841,7 @@ class Chef def ssh_identity_opts opts = {} - return opts if connection_protocol == "winrm" + return opts if winrm? identity_file = config_value(:ssh_identity_file) if identity_file opts[:key_files] = [identity_file] @@ -901,7 +901,7 @@ class Chef # REVIEW NOTE: knife bootstrap did not pull sudo values from Chef::Config, # should we change that for consistency? def sudo_opts - return {} if connection_protocol == "winrm" + return {} if winrm? opts = { sudo: false } if config[:use_sudo] opts[:sudo] = true @@ -916,7 +916,7 @@ class Chef end def winrm_opts - return {} unless connection_protocol == "winrm" + return {} unless winrm? auth_method = config_value(:winrm_auth_method, :winrm_auth_method, "negotiate") opts = { winrm_transport: auth_method, # winrm gem and train calls auth method 'transport' |