Sha256: f8ac348ff1abdf7e11bb1afe622d096ca0524971470cffb01211f2d2b094dfd2
Contents?: true
Size: 1.52 KB
Versions: 53
Compression:
Stored size: 1.52 KB
Contents
# frozen_string_literal: true require 'bolt/error' require 'bolt/config/transport/base' module Bolt class Config module Transport class WinRM < Base OPTIONS = %w[ basic-auth-only cacert cleanup connect-timeout extensions file-protocol host interpreters password port realm smb-port ssl ssl-verify tmpdir user ].freeze DEFAULTS = { "basic-auth-only" => false, "cleanup" => true, "connect-timeout" => 10, "ssl" => true, "ssl-verify" => true, "file-protocol" => "winrm" }.freeze private def validate super if @config['ssl'] if @config['file-protocol'] == 'smb' raise Bolt::ValidationError, "SMB file transfers are not allowed with SSL enabled" end if @config['cacert'] @config['cacert'] = File.expand_path(@config['cacert'], @project) Bolt::Util.validate_file('cacert', @config['cacert']) end end if !@config['ssl'] && @config['basic-auth-only'] raise Bolt::ValidationError, "Basic auth is only allowed when using SSL" end if @config['interpreters'] @config['interpreters'] = normalize_interpreters(@config['interpreters']) end end end end end end
Version data entries
53 entries across 53 versions & 1 rubygems