Class: Chef::Knife::Winrm

Inherits:
Chef::Knife show all
Includes:
KnifeWindowsBase, WinrmCommandSharedFunctions
Defined in:
lib/chef/knife/winrm.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from KnifeWindowsBase

#locate_config_value

Methods included from WinrmCommandSharedFunctions

included

Instance Attribute Details

#password=(value) ⇒ Object (writeonly)

Sets the attribute password

Parameters:

  • value

    the value to set the attribute password to.



39
40
41
# File 'lib/chef/knife/winrm.rb', line 39

def password=(value)
  @password = value
end

Instance Method Details

#execute_remote_commandObject



55
56
57
58
59
60
61
62
# File 'lib/chef/knife/winrm.rb', line 55

def execute_remote_command
  case @name_args[1]
  when "interactive"
    interactive
  else
    run_command(@name_args[1..-1].join(" "))
  end
end

#runObject



48
49
50
51
52
53
# File 'lib/chef/knife/winrm.rb', line 48

def run
  STDOUT.sync = STDERR.sync = true        

  configure_session
  execute_remote_command        
end