bolt 1.15.0 → 1.16.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of bolt might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/bolt-modules/boltlib/lib/puppet/datatypes/target.rb +1 -1
- data/bolt-modules/boltlib/lib/puppet/functions/run_plan.rb +4 -4
- data/lib/bolt.rb +3 -0
- data/lib/bolt/analytics.rb +7 -2
- data/lib/bolt/applicator.rb +6 -2
- data/lib/bolt/bolt_option_parser.rb +4 -4
- data/lib/bolt/cli.rb +8 -4
- data/lib/bolt/config.rb +6 -6
- data/lib/bolt/executor.rb +2 -7
- data/lib/bolt/inventory.rb +37 -6
- data/lib/bolt/inventory/group2.rb +314 -0
- data/lib/bolt/inventory/inventory2.rb +261 -0
- data/lib/bolt/outputter/human.rb +3 -1
- data/lib/bolt/pal.rb +8 -7
- data/lib/bolt/puppetdb/client.rb +6 -5
- data/lib/bolt/target.rb +34 -14
- data/lib/bolt/task.rb +2 -2
- data/lib/bolt/transport/base.rb +2 -2
- data/lib/bolt/transport/docker.rb +1 -1
- data/lib/bolt/transport/docker/connection.rb +2 -0
- data/lib/bolt/transport/local.rb +9 -181
- data/lib/bolt/transport/local/shell.rb +202 -12
- data/lib/bolt/transport/local_windows.rb +203 -0
- data/lib/bolt/transport/orch.rb +6 -4
- data/lib/bolt/transport/orch/connection.rb +6 -2
- data/lib/bolt/transport/ssh.rb +10 -150
- data/lib/bolt/transport/ssh/connection.rb +15 -116
- data/lib/bolt/transport/sudoable.rb +163 -0
- data/lib/bolt/transport/sudoable/connection.rb +76 -0
- data/lib/bolt/transport/sudoable/tmpdir.rb +59 -0
- data/lib/bolt/transport/winrm.rb +4 -4
- data/lib/bolt/transport/winrm/connection.rb +1 -0
- data/lib/bolt/util.rb +2 -0
- data/lib/bolt/version.rb +1 -1
- data/lib/bolt_ext/puppetdb_inventory.rb +0 -1
- data/lib/bolt_server/transport_app.rb +3 -1
- data/lib/logging_extensions/logging.rb +13 -0
- data/lib/plan_executor/orch_client.rb +4 -0
- metadata +23 -2
data/lib/bolt/transport/winrm.rb
CHANGED
@@ -9,8 +9,8 @@ module Bolt
|
|
9
9
|
class WinRM < Base
|
10
10
|
def self.options
|
11
11
|
%w[
|
12
|
-
port user password connect-timeout ssl ssl-verify tmpdir
|
13
|
-
extensions interpreters file-protocol smb-port
|
12
|
+
host port user password connect-timeout ssl ssl-verify tmpdir
|
13
|
+
cacert extensions interpreters file-protocol smb-port
|
14
14
|
]
|
15
15
|
end
|
16
16
|
|
@@ -70,8 +70,8 @@ module Bolt
|
|
70
70
|
ensure
|
71
71
|
begin
|
72
72
|
conn&.disconnect
|
73
|
-
rescue StandardError =>
|
74
|
-
logger.info("Failed to close connection to #{target.uri} : #{
|
73
|
+
rescue StandardError => e
|
74
|
+
logger.info("Failed to close connection to #{target.uri} : #{e.message}")
|
75
75
|
end
|
76
76
|
end
|
77
77
|
|
@@ -12,6 +12,7 @@ module Bolt
|
|
12
12
|
DEFAULT_EXTENSIONS = ['.ps1', '.rb', '.pp'].freeze
|
13
13
|
|
14
14
|
def initialize(target, transport_logger)
|
15
|
+
raise Bolt::ValidationError, "Target #{target.name} does not have a host" unless target.host
|
15
16
|
@target = target
|
16
17
|
|
17
18
|
default_port = target.options['ssl'] ? HTTPS_PORT : HTTP_PORT
|
data/lib/bolt/util.rb
CHANGED
data/lib/bolt/version.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'sinatra'
|
4
|
+
require 'addressable/uri'
|
4
5
|
require 'bolt'
|
5
6
|
require 'bolt/error'
|
6
7
|
require 'bolt/target'
|
@@ -24,7 +25,7 @@ module BoltServer
|
|
24
25
|
Addressable::URI.parse("file:task"))
|
25
26
|
JSON::Validator.add_schema(shared_schema)
|
26
27
|
|
27
|
-
@executor = Bolt::Executor.new(0
|
28
|
+
@executor = Bolt::Executor.new(0)
|
28
29
|
|
29
30
|
@file_cache = BoltServer::FileCache.new(@config).setup
|
30
31
|
|
@@ -78,6 +79,7 @@ module BoltServer
|
|
78
79
|
opts['private-key'] = { 'key-data' => opts['private-key-content'] }
|
79
80
|
opts.delete('private-key-content')
|
80
81
|
end
|
82
|
+
opts['load-config'] = false
|
81
83
|
|
82
84
|
target = [Bolt::Target.new(body['target']['hostname'], opts)]
|
83
85
|
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'logging'
|
4
|
+
|
5
|
+
module LoggingExtensions
|
6
|
+
# the logging gem always sets itself up to initialize little-plugger
|
7
|
+
# https://github.com/TwP/logging/commit/5aeeffaaa9fe483c2258a23d3b9e92adfafb3b2e
|
8
|
+
# little-plugger calls Gem.find_files, incurring an expensive gem scan
|
9
|
+
def initialize_plugins; end
|
10
|
+
end
|
11
|
+
|
12
|
+
# monkey patch Logging to override the extended method with a no-op
|
13
|
+
Logging.extend(LoggingExtensions)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bolt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.16.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Puppet
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-04-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -66,6 +66,20 @@ dependencies:
|
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '1.34'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: hiera-eyaml
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '3'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '3'
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
84
|
name: logging
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -351,6 +365,8 @@ files:
|
|
351
365
|
- lib/bolt/executor.rb
|
352
366
|
- lib/bolt/inventory.rb
|
353
367
|
- lib/bolt/inventory/group.rb
|
368
|
+
- lib/bolt/inventory/group2.rb
|
369
|
+
- lib/bolt/inventory/inventory2.rb
|
354
370
|
- lib/bolt/logger.rb
|
355
371
|
- lib/bolt/node/errors.rb
|
356
372
|
- lib/bolt/node/output.rb
|
@@ -379,12 +395,16 @@ files:
|
|
379
395
|
- lib/bolt/transport/docker/connection.rb
|
380
396
|
- lib/bolt/transport/local.rb
|
381
397
|
- lib/bolt/transport/local/shell.rb
|
398
|
+
- lib/bolt/transport/local_windows.rb
|
382
399
|
- lib/bolt/transport/orch.rb
|
383
400
|
- lib/bolt/transport/orch/connection.rb
|
384
401
|
- lib/bolt/transport/powershell.rb
|
385
402
|
- lib/bolt/transport/remote.rb
|
386
403
|
- lib/bolt/transport/ssh.rb
|
387
404
|
- lib/bolt/transport/ssh/connection.rb
|
405
|
+
- lib/bolt/transport/sudoable.rb
|
406
|
+
- lib/bolt/transport/sudoable/connection.rb
|
407
|
+
- lib/bolt/transport/sudoable/tmpdir.rb
|
388
408
|
- lib/bolt/transport/winrm.rb
|
389
409
|
- lib/bolt/transport/winrm/connection.rb
|
390
410
|
- lib/bolt/util.rb
|
@@ -407,6 +427,7 @@ files:
|
|
407
427
|
- lib/bolt_spec/plans/action_stubs/upload_stub.rb
|
408
428
|
- lib/bolt_spec/plans/mock_executor.rb
|
409
429
|
- lib/bolt_spec/run.rb
|
430
|
+
- lib/logging_extensions/logging.rb
|
410
431
|
- lib/plan_executor/app.rb
|
411
432
|
- lib/plan_executor/applicator.rb
|
412
433
|
- lib/plan_executor/config.rb
|