Sha256: 6764d651effdae497956e9f6ad456aeb8a67f09762b5ee1a8e0146bb004168bb
Contents?: true
Size: 1.02 KB
Versions: 9
Compression:
Stored size: 1.02 KB
Contents
require 'veewee/provider/core/helper/winrm' module Veewee module Provider module Core module BoxCommand def winrm(command=nil,options={}) raise Veewee::Error,"Box is not running" unless self.running? winrm_options={:user => definition.winrm_user,:password => definition.winrm_password, :port => definition.winrm_host_port, :exitcode => '*'} if (command.nil?) env.ui.info "This is a simple interactive shell" env.ui.info "To exit interactive mode, use 'quit!'" while 1 command = ui.ask("veewee>") case command.strip when 'quit!' env.ui.info 'Bye!' break else winrm_execute(self.ip_address,command,winrm_options.merge(options)) end end else winrm_execute(self.ip_address,command,winrm_options.merge(options)) end end end # Module end # Module end # Module end # Module
Version data entries
9 entries across 9 versions & 1 rubygems