Class: Vagrant::Provisioners::Winrm

Inherits:
Base
  • Object
show all
Defined in:
lib/vagrant-windows/provisioners/winrm.rb

Defined Under Namespace

Classes: Config

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.config_classObject



17
18
19
# File 'lib/vagrant-windows/provisioners/winrm.rb', line 17

def self.config_class
  Config
end

Instance Method Details

#provision!Object



21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/vagrant-windows/provisioners/winrm.rb', line 21

def provision!
  env[:vm].channel.sudo(config.inline) do |type, data|
    if [:stderr, :stdout].include?(type)
      # Output the data with the proper color based on the stream.
      color = type == :stdout ? :green : :red

      # Note: Be sure to chomp the data to avoid the newlines that the
      # Chef outputs.
      env[:ui].info(data.chomp, :color => color, :prefix => false)
    end
  end
end