diff options
author | Vivek Singh <vivek.singh@msystechnologies.com> | 2019-05-13 17:14:26 +0530 |
---|---|---|
committer | Vivek Singh <vivek.singh@msystechnologies.com> | 2019-05-13 17:14:26 +0530 |
commit | 8cd081315998097bdd9199d54c432c0211c85691 (patch) | |
tree | c744bf0a4384200e03e472b7d95f95f45b2f7047 /lib/chef | |
parent | 4e485c6944764bedb5e2b9b7b4ab9c5347df43d1 (diff) | |
download | chef-8cd081315998097bdd9199d54c432c0211c85691.tar.gz |
Winrm check code refactor
Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
Diffstat (limited to 'lib/chef')
-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' |