Skip to content
A package that adds WinRM functionality into Capistrano
Ruby
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib
README
Rakefile
VERSION

README

'winrm' can be used just like 'run'.  For instance:

task :ipconfig, :roles => :winrm do
  winrm 'ipconfig'
end

This will run ipconfig across all hosts in the :winrm role.

'winrm' will also accept a block exactly like 'run':

task :ipconfig, :roles => :winrm do
  host_data = {}
  winrm 'ipconfig' do |channel, stream, data|
    host_data[channel[:host]] = "" unless host_data[channel[:host]].is_a?(String)
    host_data[channel[:host]] << data
  end

  host_data.each_pair do |host,data|
    puts "HOST: #{host}"
    puts "---------------------------------------"
    puts data
    puts "---------------------------------------"
  end
end


Something went wrong with that request. Please try again.