Class: Chef::Knife::Winrm
- Inherits:
-
Chef::Knife
- Object
- Chef::Knife
- Chef::Knife::Winrm
- Includes:
- 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 WinrmCommandSharedFunctions
Instance Attribute Details
#password=(value) ⇒ Object (writeonly)
Sets the attribute password
37 38 39 |
# File 'lib/chef/knife/winrm.rb', line 37 def password=(value) @password = value end |
Instance Method Details
#execute_remote_command ⇒ Object
58 59 60 61 62 63 64 65 |
# File 'lib/chef/knife/winrm.rb', line 58 def execute_remote_command case @name_args[1] when "interactive" interactive else run_command(@name_args[1..-1].join(" ")) end end |
#run ⇒ Object
46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/chef/knife/winrm.rb', line 46 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 |