bolt 1.19.0 → 1.20.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/applyresult.rb +2 -0
- data/bolt-modules/boltlib/lib/puppet/datatypes/result.rb +2 -0
- data/bolt-modules/boltlib/lib/puppet/datatypes/resultset.rb +1 -0
- data/bolt-modules/boltlib/lib/puppet/functions/add_facts.rb +3 -10
- data/bolt-modules/boltlib/lib/puppet/functions/add_to_group.rb +3 -10
- data/bolt-modules/boltlib/lib/puppet/functions/apply_prep.rb +3 -9
- data/bolt-modules/boltlib/lib/puppet/functions/facts.rb +2 -8
- data/bolt-modules/boltlib/lib/puppet/functions/fail_plan.rb +2 -2
- data/bolt-modules/boltlib/lib/puppet/functions/get_resources.rb +3 -8
- data/bolt-modules/boltlib/lib/puppet/functions/get_targets.rb +2 -8
- data/bolt-modules/boltlib/lib/puppet/functions/puppetdb_fact.rb +2 -7
- data/bolt-modules/boltlib/lib/puppet/functions/puppetdb_query.rb +2 -7
- data/bolt-modules/boltlib/lib/puppet/functions/run_command.rb +2 -7
- data/bolt-modules/boltlib/lib/puppet/functions/run_plan.rb +1 -6
- data/bolt-modules/boltlib/lib/puppet/functions/run_script.rb +2 -7
- data/bolt-modules/boltlib/lib/puppet/functions/run_task.rb +7 -33
- data/bolt-modules/boltlib/lib/puppet/functions/set_feature.rb +3 -10
- data/bolt-modules/boltlib/lib/puppet/functions/set_var.rb +3 -10
- data/bolt-modules/boltlib/lib/puppet/functions/upload_file.rb +2 -7
- data/bolt-modules/boltlib/lib/puppet/functions/vars.rb +2 -8
- data/bolt-modules/boltlib/lib/puppet/functions/wait_until_available.rb +2 -7
- data/bolt-modules/boltlib/lib/puppet/functions/without_default_logging.rb +1 -1
- data/lib/bolt/applicator.rb +7 -3
- data/lib/bolt/apply_result.rb +8 -21
- data/lib/bolt/bolt_option_parser.rb +2 -2
- data/lib/bolt/catalog.rb +0 -1
- data/lib/bolt/cli.rb +51 -29
- data/lib/bolt/config.rb +0 -2
- data/lib/bolt/executor.rb +38 -50
- data/lib/bolt/inventory/group.rb +5 -0
- data/lib/bolt/inventory/group2.rb +5 -0
- data/lib/bolt/logger.rb +7 -3
- data/lib/bolt/outputter.rb +6 -4
- data/lib/bolt/outputter/human.rb +90 -6
- data/lib/bolt/outputter/json.rb +4 -4
- data/lib/bolt/outputter/logger.rb +53 -0
- data/lib/bolt/pal.rb +3 -3
- data/lib/bolt/pal/yaml_plan/step.rb +1 -1
- data/lib/bolt/plugin.rb +2 -0
- data/lib/bolt/plugin/terraform.rb +84 -0
- data/lib/bolt/result.rb +12 -8
- data/lib/bolt/result_set.rb +4 -0
- data/lib/bolt/transport/orch.rb +4 -4
- data/lib/bolt/version.rb +1 -1
- metadata +4 -3
- data/lib/bolt/notifier.rb +0 -23
data/lib/bolt/transport/orch.rb
CHANGED
@@ -75,7 +75,7 @@ module Bolt
|
|
75
75
|
# If it's finished or already has a proper error simply pass it to the
|
76
76
|
# the result otherwise make sure an error is generated
|
77
77
|
if state == 'finished' || (result && result['_error'])
|
78
|
-
Bolt::Result.new(target, value: result,
|
78
|
+
Bolt::Result.new(target, value: result, action: 'task', object: task_name)
|
79
79
|
elsif state == 'skipped'
|
80
80
|
Bolt::Result.new(
|
81
81
|
target,
|
@@ -84,7 +84,7 @@ module Bolt
|
|
84
84
|
'msg' => "Node #{target.host} was skipped",
|
85
85
|
'details' => {}
|
86
86
|
} },
|
87
|
-
|
87
|
+
action: 'task', object: task_name
|
88
88
|
)
|
89
89
|
else
|
90
90
|
# Make a generic error with a unkown exit_code
|
@@ -230,7 +230,7 @@ module Bolt
|
|
230
230
|
# run_task generates a result that makes sense for a generic task which
|
231
231
|
# needs to be unwrapped to extract stdout/stderr/exitcode.
|
232
232
|
#
|
233
|
-
def unwrap_bolt_result(target, result,
|
233
|
+
def unwrap_bolt_result(target, result, action, obj)
|
234
234
|
if result.error_hash
|
235
235
|
# something went wrong return the failure
|
236
236
|
return result
|
@@ -240,7 +240,7 @@ module Bolt
|
|
240
240
|
result.value['stdout'],
|
241
241
|
result.value['stderr'],
|
242
242
|
result.value['exit_code'],
|
243
|
-
|
243
|
+
action, obj)
|
244
244
|
end
|
245
245
|
end
|
246
246
|
end
|
data/lib/bolt/version.rb
CHANGED
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.20.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-05-
|
11
|
+
date: 2019-05-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -370,10 +370,10 @@ files:
|
|
370
370
|
- lib/bolt/logger.rb
|
371
371
|
- lib/bolt/node/errors.rb
|
372
372
|
- lib/bolt/node/output.rb
|
373
|
-
- lib/bolt/notifier.rb
|
374
373
|
- lib/bolt/outputter.rb
|
375
374
|
- lib/bolt/outputter/human.rb
|
376
375
|
- lib/bolt/outputter/json.rb
|
376
|
+
- lib/bolt/outputter/logger.rb
|
377
377
|
- lib/bolt/pal.rb
|
378
378
|
- lib/bolt/pal/issues.rb
|
379
379
|
- lib/bolt/pal/logging.rb
|
@@ -386,6 +386,7 @@ files:
|
|
386
386
|
- lib/bolt/plan_result.rb
|
387
387
|
- lib/bolt/plugin.rb
|
388
388
|
- lib/bolt/plugin/puppetdb.rb
|
389
|
+
- lib/bolt/plugin/terraform.rb
|
389
390
|
- lib/bolt/puppetdb.rb
|
390
391
|
- lib/bolt/puppetdb/client.rb
|
391
392
|
- lib/bolt/puppetdb/config.rb
|
data/lib/bolt/notifier.rb
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Bolt
|
4
|
-
class Notifier
|
5
|
-
def initialize(executor = nil)
|
6
|
-
# lazy-load expensive gem code
|
7
|
-
require 'concurrent'
|
8
|
-
|
9
|
-
@executor = executor || Concurrent::SingleThreadExecutor.new
|
10
|
-
end
|
11
|
-
|
12
|
-
def notify(callback, event)
|
13
|
-
@executor.post do
|
14
|
-
callback.call(event)
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
def shutdown
|
19
|
-
@executor.shutdown
|
20
|
-
@executor.wait_for_termination
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|