Class: Chef::Knife::BootstrapWindowsWinrm

Inherits:
Bootstrap
  • Object
show all
Includes:
BootstrapWindowsBase, WinrmBase, WinrmCommandSharedFunctions
Defined in:
lib/chef/knife/bootstrap_windows_winrm.rb

Instance Method Summary collapse

Methods included from WinrmCommandSharedFunctions

included

Methods included from WinrmBase

included

Methods included from BootstrapWindowsBase

#bootstrap, #bootstrap_context, #bootstrap_template, #default_bootstrap_template, included, #load_correct_secret, #load_template, #render_template

Methods included from KnifeWindowsBase

#locate_config_value

Instance Method Details

#runObject



42
43
44
45
46
47
48
49
50
51
52
53
54
# File 'lib/chef/knife/bootstrap_windows_winrm.rb', line 42

def run
  if (Chef::Config[:validation_key] && !File.exist?(File.expand_path(Chef::Config[:validation_key])))
    if !negotiate_auth? && !(locate_config_value(:winrm_transport) == 'ssl')
      ui.error('Validatorless bootstrap over unsecure winrm channels could expose your key to network sniffing')
      exit 1
    end
  end

  config[:manual] = true
  configure_session

  bootstrap
end