Class: Chef::Knife::Winrm
- Inherits:
-
Chef::Knife
- Object
- Chef::Knife
- Chef::Knife::Winrm
- Includes:
- KnifeWindowsBase, WinrmCommandSharedFunctions
- Defined in:
- lib/chef/knife/winrm.rb
Instance Attribute Summary collapse
-
#password ⇒ Object
writeonly
Sets the attribute password.
Instance Method Summary collapse
Methods included from KnifeWindowsBase
Methods included from WinrmCommandSharedFunctions
Instance Attribute Details
#password=(value) ⇒ Object (writeonly)
Sets the attribute password
39 40 41 |
# File 'lib/chef/knife/winrm.rb', line 39 def password=(value) @password = value end |
Instance Method Details
#execute_remote_command ⇒ Object
60 61 62 63 64 65 66 67 |
# File 'lib/chef/knife/winrm.rb', line 60 def execute_remote_command case @name_args[1] when "interactive" interactive else run_command(@name_args[1..-1].join(" ")) end end |
#run ⇒ Object
48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/chef/knife/winrm.rb', line 48 def run STDOUT.sync = STDERR.sync = true configure_session exit_status = execute_remote_command if exit_status != 0 exit exit_status else exit_status end end |