Sha256: c5bed33461926a32a01627b3f74e53854fd1beffb6efa68961b972add1958cc4
Contents?: true
Size: 727 Bytes
Versions: 22
Compression:
Stored size: 727 Bytes
Contents
# frozen_string_literal: true require 'bolt/node/errors' require 'bolt/transport/base' module Bolt module Transport class WinRM < Simple def initialize super require 'winrm' require 'winrm-fs' @transport_logger = Logging.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 'bolt/transport/winrm/connection'
Version data entries
22 entries across 22 versions & 1 rubygems