Sha256: 7fc640b836a9b8e7c884df3c9f0c647366e9308f8224688a07c98bad0365f06c
Contents?: true
Size: 756 Bytes
Versions: 18
Compression:
Stored size: 756 Bytes
Contents
# frozen_string_literal: true require_relative '../../bolt/node/errors' require_relative '../../bolt/transport/base' module Bolt module Transport class WinRM < Simple def initialize super require 'winrm' require 'winrm-fs' @transport_logger = Bolt::Logger.logger(::WinRM) @transport_logger.level = :warn end def with_connection(target) conn = Connection.new(target, @transport_logger) conn.connect yield conn ensure begin conn&.disconnect rescue StandardError => e logger.info("Failed to close connection to #{target.safe_name} : #{e.message}") end end end end end require_relative 'winrm/connection'
Version data entries
18 entries across 18 versions & 1 rubygems