Class: Chef::Knife::BootstrapWindowsWinrm
Instance Method Summary
collapse
Methods included from WinrmBase
included
#bootstrap, #bootstrap_bat_file, #bootstrap_command, #create_bootstrap_bat_command, included, #load_template, #locate_config_value, #render_template
Instance Method Details
#run ⇒ Object
40
41
42
|
# File 'lib/chef/knife/bootstrap_windows_winrm.rb', line 40
def run
bootstrap
end
|
#run_command(command = '') ⇒ Object
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
# File 'lib/chef/knife/bootstrap_windows_winrm.rb', line 44
def run_command(command = '')
winrm = Chef::Knife::Winrm.new
winrm.name_args = [ server_name, command ]
winrm.config[:winrm_user] = locate_config_value(:winrm_user)
winrm.config[:winrm_password] = locate_config_value(:winrm_password)
winrm.config[:winrm_transport] = locate_config_value(:winrm_transport)
winrm.config[:kerberos_keytab_file] = Chef::Config[:knife][:kerberos_keytab_file] if Chef::Config[:knife][:kerberos_keytab_file]
winrm.config[:kerberos_realm] = Chef::Config[:knife][:kerberos_realm] if Chef::Config[:knife][:kerberos_realm]
winrm.config[:kerberos_service] = Chef::Config[:knife][:kerberos_service] if Chef::Config[:knife][:kerberos_service]
winrm.config[:ca_trust_file] = Chef::Config[:knife][:ca_trust_file] if Chef::Config[:knife][:ca_trust_file]
winrm.config[:manual] = true
winrm.config[:winrm_port] = locate_config_value(:winrm_port)
winrm.run
end
|