Class: Chef::Knife::BootstrapWindowsWinrm
- Inherits:
-
Bootstrap
- Object
- Bootstrap
- Chef::Knife::BootstrapWindowsWinrm
- Includes:
- BootstrapWindowsBase, WinrmBase, WinrmCommandSharedFunctions
- Defined in:
- lib/chef/knife/bootstrap_windows_winrm.rb
Instance Method Summary collapse
Methods included from WinrmCommandSharedFunctions
Methods included from WinrmBase
Methods included from BootstrapWindowsBase
#bootstrap, #bootstrap_context, #bootstrap_template, #default_bootstrap_template, #first_boot_attributes, included, #load_correct_secret, #load_template, #render_template
Methods included from KnifeWindowsBase
Instance Method Details
#run ⇒ Object
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/chef/knife/bootstrap_windows_winrm.rb', line 42 def run validate_name_args! if (Chef::Config[:validation_key] && !File.exist?(File.(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 unless locate_config_value(:winrm_shell) == :cmd ui.warn("The cmd shell is the only valid winrm-shell for 'knife bootstrap windows winrm'. Switching to the cmd shell.") config[:winrm_shell] = :cmd end config[:manual] = true configure_session bootstrap end |