bolt 2.32.0 → 2.36.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/Puppetfile +6 -6
- data/bolt-modules/boltlib/lib/puppet/datatypes/applyresult.rb +1 -0
- data/bolt-modules/boltlib/lib/puppet/functions/catch_errors.rb +1 -3
- data/bolt-modules/boltlib/lib/puppet/functions/download_file.rb +17 -6
- data/bolt-modules/boltlib/lib/puppet/functions/facts.rb +6 -0
- data/bolt-modules/boltlib/lib/puppet/functions/parallelize.rb +56 -0
- data/bolt-modules/boltlib/lib/puppet/functions/puppetdb_query.rb +2 -2
- data/bolt-modules/boltlib/lib/puppet/functions/run_command.rb +24 -6
- data/bolt-modules/boltlib/lib/puppet/functions/run_script.rb +27 -8
- data/bolt-modules/boltlib/lib/puppet/functions/run_task.rb +21 -1
- data/bolt-modules/boltlib/lib/puppet/functions/run_task_with.rb +18 -1
- data/bolt-modules/boltlib/lib/puppet/functions/upload_file.rb +24 -6
- data/guides/logging.txt +18 -0
- data/lib/bolt/analytics.rb +27 -8
- data/lib/bolt/apply_result.rb +3 -3
- data/lib/bolt/bolt_option_parser.rb +43 -15
- data/lib/bolt/cli.rb +79 -227
- data/lib/bolt/config.rb +131 -52
- data/lib/bolt/config/options.rb +46 -8
- data/lib/bolt/config/transport/base.rb +10 -19
- data/lib/bolt/config/transport/local.rb +0 -7
- data/lib/bolt/config/transport/options.rb +1 -1
- data/lib/bolt/config/transport/ssh.rb +8 -14
- data/lib/bolt/config/validator.rb +231 -0
- data/lib/bolt/error.rb +37 -3
- data/lib/bolt/executor.rb +103 -17
- data/lib/bolt/inventory/group.rb +2 -1
- data/lib/bolt/module_installer.rb +2 -1
- data/lib/bolt/module_installer/specs/forge_spec.rb +5 -4
- data/lib/bolt/module_installer/specs/git_spec.rb +4 -3
- data/lib/bolt/outputter/human.rb +21 -9
- data/lib/bolt/outputter/rainbow.rb +1 -1
- data/lib/bolt/pal.rb +48 -30
- data/lib/bolt/pal/yaml_plan.rb +11 -2
- data/lib/bolt/pal/yaml_plan/evaluator.rb +23 -1
- data/lib/bolt/pal/yaml_plan/loader.rb +14 -9
- data/lib/bolt/plan_creator.rb +160 -0
- data/lib/bolt/plugin.rb +1 -8
- data/lib/bolt/project.rb +30 -36
- data/lib/bolt/project_manager.rb +199 -0
- data/lib/bolt/{project_migrator/config.rb → project_manager/config_migrator.rb} +43 -5
- data/lib/bolt/{project_migrator/inventory.rb → project_manager/inventory_migrator.rb} +5 -5
- data/lib/bolt/{project_migrator/base.rb → project_manager/migrator.rb} +2 -2
- data/lib/bolt/{project_migrator/modules.rb → project_manager/module_migrator.rb} +3 -3
- data/lib/bolt/puppetdb/client.rb +3 -2
- data/lib/bolt/puppetdb/config.rb +9 -8
- data/lib/bolt/result.rb +23 -11
- data/lib/bolt/shell/bash.rb +12 -7
- data/lib/bolt/shell/powershell.rb +12 -7
- data/lib/bolt/task/run.rb +1 -1
- data/lib/bolt/transport/base.rb +18 -18
- data/lib/bolt/transport/docker.rb +23 -6
- data/lib/bolt/transport/orch.rb +23 -19
- data/lib/bolt/transport/orch/connection.rb +10 -3
- data/lib/bolt/transport/remote.rb +3 -3
- data/lib/bolt/transport/simple.rb +6 -6
- data/lib/bolt/transport/ssh/exec_connection.rb +6 -2
- data/lib/bolt/util.rb +19 -7
- data/lib/bolt/version.rb +1 -1
- data/lib/bolt/yarn.rb +23 -0
- data/lib/bolt_server/base_config.rb +3 -1
- data/lib/bolt_server/config.rb +3 -1
- data/lib/bolt_server/file_cache.rb +2 -0
- data/lib/bolt_server/schemas/partials/task.json +2 -2
- data/lib/bolt_server/transport_app.rb +42 -11
- data/lib/bolt_spec/plans/action_stubs/command_stub.rb +1 -1
- data/lib/bolt_spec/plans/action_stubs/script_stub.rb +1 -1
- data/lib/bolt_spec/plans/mock_executor.rb +9 -6
- data/libexec/apply_catalog.rb +1 -1
- data/libexec/custom_facts.rb +1 -1
- data/libexec/query_resources.rb +1 -1
- metadata +12 -14
- data/lib/bolt/project_migrator.rb +0 -80
- data/modules/secure_env_vars/plans/init.pp +0 -20
data/lib/bolt/config.rb
CHANGED
@@ -7,6 +7,7 @@ require 'bolt/project'
|
|
7
7
|
require 'bolt/logger'
|
8
8
|
require 'bolt/util'
|
9
9
|
require 'bolt/config/options'
|
10
|
+
require 'bolt/config/validator'
|
10
11
|
|
11
12
|
module Bolt
|
12
13
|
class UnknownTransportError < Bolt::Error
|
@@ -32,53 +33,97 @@ module Bolt
|
|
32
33
|
end
|
33
34
|
|
34
35
|
def self.from_project(project, overrides = {})
|
35
|
-
logs
|
36
|
+
logs = []
|
37
|
+
deprecations = []
|
38
|
+
|
36
39
|
conf = if project.project_file == project.config_file
|
37
40
|
project.data
|
38
41
|
else
|
39
42
|
c = Bolt::Util.read_optional_yaml_hash(project.config_file, 'config')
|
43
|
+
|
44
|
+
# Validate the config against the schema. This will raise a single error
|
45
|
+
# with all validation errors.
|
46
|
+
Validator.new.tap do |validator|
|
47
|
+
validator.validate(c, bolt_schema, project.config_file.to_s)
|
48
|
+
|
49
|
+
validator.warnings.each { |warning| logs << { warn: warning } }
|
50
|
+
|
51
|
+
validator.deprecations.each do |dep|
|
52
|
+
deprecations << { type: "#{BOLT_CONFIG_NAME} #{dep[:option]}", msg: dep[:message] }
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
40
56
|
logs << { debug: "Loaded configuration from #{project.config_file}" } if File.exist?(project.config_file)
|
41
57
|
c
|
42
58
|
end
|
43
59
|
|
44
60
|
data = load_defaults(project).push(
|
45
|
-
filepath:
|
46
|
-
data:
|
47
|
-
logs:
|
48
|
-
deprecations:
|
61
|
+
filepath: project.config_file,
|
62
|
+
data: conf,
|
63
|
+
logs: logs,
|
64
|
+
deprecations: deprecations
|
49
65
|
)
|
50
66
|
|
51
67
|
new(project, data, overrides)
|
52
68
|
end
|
53
69
|
|
54
70
|
def self.from_file(configfile, overrides = {})
|
55
|
-
project
|
56
|
-
logs
|
71
|
+
project = Bolt::Project.create_project(Pathname.new(configfile).expand_path.dirname)
|
72
|
+
logs = []
|
73
|
+
deprecations = []
|
57
74
|
|
58
75
|
conf = if project.project_file == project.config_file
|
59
76
|
project.data
|
60
77
|
else
|
61
78
|
c = Bolt::Util.read_yaml_hash(configfile, 'config')
|
79
|
+
|
80
|
+
# Validate the config against the schema. This will raise a single error
|
81
|
+
# with all validation errors.
|
82
|
+
Validator.new.tap do |validator|
|
83
|
+
validator.validate(c, bolt_schema, project.config_file.to_s)
|
84
|
+
|
85
|
+
validator.warnings.each { |warning| logs << { warn: warning } }
|
86
|
+
|
87
|
+
validator.deprecations.each do |dep|
|
88
|
+
deprecations << { type: "#{BOLT_CONFIG_NAME} #{dep[:option]}", msg: dep[:message] }
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
62
92
|
logs << { debug: "Loaded configuration from #{configfile}" }
|
63
93
|
c
|
64
94
|
end
|
65
95
|
|
66
96
|
data = load_defaults(project).push(
|
67
|
-
filepath:
|
68
|
-
data:
|
69
|
-
logs:
|
70
|
-
deprecations:
|
97
|
+
filepath: configfile,
|
98
|
+
data: conf,
|
99
|
+
logs: logs,
|
100
|
+
deprecations: deprecations
|
71
101
|
)
|
72
102
|
|
73
103
|
new(project, data, overrides)
|
74
104
|
end
|
75
105
|
|
76
|
-
def self.
|
77
|
-
|
78
|
-
|
106
|
+
def self.defaults_schema
|
107
|
+
base = OPTIONS.slice(*BOLT_DEFAULTS_OPTIONS)
|
108
|
+
inventory = INVENTORY_OPTIONS.each_with_object({}) do |(option, definition), acc|
|
109
|
+
acc[option] = TRANSPORT_CONFIG.key?(option) ? definition.merge(TRANSPORT_CONFIG[option].schema) : definition
|
110
|
+
end
|
111
|
+
|
112
|
+
base['inventory-config'][:properties] = inventory
|
113
|
+
base
|
114
|
+
end
|
79
115
|
|
116
|
+
def self.bolt_schema
|
117
|
+
inventory = INVENTORY_OPTIONS.each_with_object({}) do |(option, definition), acc|
|
118
|
+
acc[option] = TRANSPORT_CONFIG.key?(option) ? definition.merge(TRANSPORT_CONFIG[option].schema) : definition
|
119
|
+
end
|
120
|
+
|
121
|
+
OPTIONS.slice(*BOLT_OPTIONS).merge(inventory)
|
122
|
+
end
|
123
|
+
|
124
|
+
def self.system_path
|
80
125
|
if Bolt::Util.windows?
|
81
|
-
Pathname.new(File.join(
|
126
|
+
Pathname.new(File.join(ENV['ALLUSERSPROFILE'], 'PuppetLabs', 'bolt', 'etc'))
|
82
127
|
else
|
83
128
|
Pathname.new(File.join('/etc', 'puppetlabs', 'bolt'))
|
84
129
|
end
|
@@ -94,9 +139,10 @@ module Bolt
|
|
94
139
|
# projects. This file does not allow project-specific configuration such as 'hiera-config' and
|
95
140
|
# 'inventoryfile', and nests all default inventory configuration under an 'inventory-config' key.
|
96
141
|
def self.load_bolt_defaults_yaml(dir)
|
97
|
-
filepath
|
98
|
-
data
|
99
|
-
logs
|
142
|
+
filepath = dir + BOLT_DEFAULTS_NAME
|
143
|
+
data = Bolt::Util.read_yaml_hash(filepath, 'config')
|
144
|
+
logs = [{ debug: "Loaded configuration from #{filepath}" }]
|
145
|
+
deprecations = []
|
100
146
|
|
101
147
|
# Warn if 'bolt.yaml' detected in same directory.
|
102
148
|
if File.exist?(bolt_yaml = dir + BOLT_CONFIG_NAME)
|
@@ -106,6 +152,18 @@ module Bolt
|
|
106
152
|
)
|
107
153
|
end
|
108
154
|
|
155
|
+
# Validate the config against the schema. This will raise a single error
|
156
|
+
# with all validation errors.
|
157
|
+
Validator.new.tap do |validator|
|
158
|
+
validator.validate(data, defaults_schema, filepath)
|
159
|
+
|
160
|
+
validator.warnings.each { |warning| logs << { warn: warning } }
|
161
|
+
|
162
|
+
validator.deprecations.each do |dep|
|
163
|
+
deprecations << { type: "#{BOLT_DEFAULTS_NAME} #{dep[:option]}", msg: dep[:message] }
|
164
|
+
end
|
165
|
+
end
|
166
|
+
|
109
167
|
# Remove project-specific config such as hiera-config, etc.
|
110
168
|
project_config = data.slice(*(BOLT_PROJECT_OPTIONS - BOLT_DEFAULTS_OPTIONS))
|
111
169
|
|
@@ -148,19 +206,31 @@ module Bolt
|
|
148
206
|
data = data.merge(data.delete('inventory-config'))
|
149
207
|
end
|
150
208
|
|
151
|
-
{ filepath: filepath, data: data, logs: logs, deprecations:
|
209
|
+
{ filepath: filepath, data: data, logs: logs, deprecations: deprecations }
|
152
210
|
end
|
153
211
|
|
154
212
|
# Loads a 'bolt.yaml' file, the legacy configuration file. There's no special munging needed
|
155
213
|
# here since Bolt::Config will just ignore any invalid keys.
|
156
214
|
def self.load_bolt_yaml(dir)
|
157
|
-
filepath
|
158
|
-
data
|
159
|
-
logs
|
215
|
+
filepath = dir + BOLT_CONFIG_NAME
|
216
|
+
data = Bolt::Util.read_yaml_hash(filepath, 'config')
|
217
|
+
logs = [{ debug: "Loaded configuration from #{filepath}" }]
|
160
218
|
deprecations = [{ type: 'Using bolt.yaml for system configuration',
|
161
219
|
msg: "Configuration file #{filepath} is deprecated and will be removed in a future version "\
|
162
220
|
"of Bolt. Use '#{dir + BOLT_DEFAULTS_NAME}' instead." }]
|
163
221
|
|
222
|
+
# Validate the config against the schema. This will raise a single error
|
223
|
+
# with all validation errors.
|
224
|
+
Validator.new.tap do |validator|
|
225
|
+
validator.validate(data, bolt_schema, filepath)
|
226
|
+
|
227
|
+
validator.warnings.each { |warning| logs << { warn: warning } }
|
228
|
+
|
229
|
+
validator.deprecations.each do |dep|
|
230
|
+
deprecations << { type: "#{BOLT_CONFIG_NAME} #{dep[:option]}", msg: dep[:message] }
|
231
|
+
end
|
232
|
+
end
|
233
|
+
|
164
234
|
{ filepath: filepath, data: data, logs: logs, deprecations: deprecations }
|
165
235
|
end
|
166
236
|
|
@@ -206,12 +276,14 @@ module Bolt
|
|
206
276
|
@config_files = []
|
207
277
|
|
208
278
|
default_data = {
|
279
|
+
'apply-settings' => {},
|
209
280
|
'apply_settings' => {},
|
210
281
|
'color' => true,
|
211
282
|
'compile-concurrency' => Etc.nprocessors,
|
212
283
|
'concurrency' => default_concurrency,
|
213
284
|
'format' => 'human',
|
214
285
|
'log' => { 'console' => {} },
|
286
|
+
'plugin-hooks' => {},
|
215
287
|
'plugin_hooks' => {},
|
216
288
|
'plugins' => {},
|
217
289
|
'puppetdb' => {},
|
@@ -271,7 +343,7 @@ module Bolt
|
|
271
343
|
|
272
344
|
# Set console log to debug if in debug mode
|
273
345
|
if options[:debug]
|
274
|
-
overrides['log'] = { 'console' => { 'level' =>
|
346
|
+
overrides['log'] = { 'console' => { 'level' => 'debug' } }
|
275
347
|
end
|
276
348
|
|
277
349
|
if options[:puppetfile_path]
|
@@ -280,6 +352,9 @@ module Bolt
|
|
280
352
|
|
281
353
|
overrides['trace'] = opts['trace'] if opts.key?('trace')
|
282
354
|
|
355
|
+
# Validate the overrides
|
356
|
+
Validator.new.validate(overrides, OPTIONS, 'command line')
|
357
|
+
|
283
358
|
overrides
|
284
359
|
end
|
285
360
|
|
@@ -296,7 +371,7 @@ module Bolt
|
|
296
371
|
when *TRANSPORT_CONFIG.keys
|
297
372
|
Bolt::Util.deep_merge(val1, val2)
|
298
373
|
# Hash values are shallow merged
|
299
|
-
when 'puppetdb', 'plugin_hooks', 'apply_settings', 'log'
|
374
|
+
when 'puppetdb', 'plugin-hooks', 'plugin_hooks', 'apply-settings', 'apply_settings', 'log'
|
300
375
|
val1.merge(val2)
|
301
376
|
# All other values are overwritten
|
302
377
|
else
|
@@ -333,8 +408,9 @@ module Bolt
|
|
333
408
|
end
|
334
409
|
|
335
410
|
# Filter hashes to only include valid options
|
336
|
-
|
337
|
-
|
411
|
+
%w[apply-settings apply_settings puppetfile].each do |opt|
|
412
|
+
@data[opt] = @data[opt].slice(*OPTIONS.dig(opt, :properties).keys)
|
413
|
+
end
|
338
414
|
end
|
339
415
|
|
340
416
|
private def normalize_log(target)
|
@@ -397,37 +473,18 @@ module Bolt
|
|
397
473
|
"is automatically appended to the modulepath and cannot be configured."
|
398
474
|
end
|
399
475
|
|
400
|
-
keys = OPTIONS.keys - %w[plugins plugin_hooks puppetdb]
|
401
|
-
keys.each do |key|
|
402
|
-
next unless Bolt::Util.references?(@data[key])
|
403
|
-
valid_keys = TRANSPORT_CONFIG.keys + %w[plugins plugin_hooks puppetdb]
|
404
|
-
raise Bolt::ValidationError,
|
405
|
-
"Found unsupported key _plugin in config setting #{key}. Plugins are only available in "\
|
406
|
-
"#{valid_keys.join(', ')}."
|
407
|
-
end
|
408
|
-
|
409
|
-
unless concurrency.is_a?(Integer) && concurrency > 0
|
410
|
-
raise Bolt::ValidationError,
|
411
|
-
"Concurrency must be a positive Integer, received #{concurrency.class} #{concurrency}"
|
412
|
-
end
|
413
|
-
|
414
|
-
unless compile_concurrency.is_a?(Integer) && compile_concurrency > 0
|
415
|
-
raise Bolt::ValidationError,
|
416
|
-
"Compile concurrency must be a positive Integer, received #{compile_concurrency.class} "\
|
417
|
-
"#{compile_concurrency}"
|
418
|
-
end
|
419
|
-
|
420
476
|
compile_limit = 2 * Etc.nprocessors
|
421
477
|
unless compile_concurrency < compile_limit
|
422
478
|
raise Bolt::ValidationError, "Compilation is CPU-intensive, set concurrency less than #{compile_limit}"
|
423
479
|
end
|
424
480
|
|
425
|
-
|
426
|
-
|
481
|
+
%w[hiera-config trusted-external-command inventoryfile].each do |opt|
|
482
|
+
Bolt::Util.validate_file(opt, @data[opt]) if @data[opt]
|
427
483
|
end
|
428
484
|
|
429
|
-
|
430
|
-
|
485
|
+
if File.exist?(default_inventoryfile)
|
486
|
+
Bolt::Util.validate_file('inventory file', default_inventoryfile)
|
487
|
+
end
|
431
488
|
|
432
489
|
unless TRANSPORT_CONFIG.include?(transport)
|
433
490
|
raise UnknownTransportError, transport
|
@@ -513,7 +570,18 @@ module Bolt
|
|
513
570
|
end
|
514
571
|
|
515
572
|
def plugin_hooks
|
516
|
-
@data['plugin_hooks']
|
573
|
+
if @data['plugin-hooks'].any? && @data['plugin_hooks'].any?
|
574
|
+
Bolt::Logger.warn_once(
|
575
|
+
"plugin-hooks and plugin_hooks set",
|
576
|
+
"Detected configuration for 'plugin-hooks' and 'plugin_hooks'. Bolt will ignore 'plugin_hooks'."
|
577
|
+
)
|
578
|
+
|
579
|
+
@data['plugin-hooks']
|
580
|
+
elsif @data['plugin-hooks'].any?
|
581
|
+
@data['plugin-hooks']
|
582
|
+
else
|
583
|
+
@data['plugin_hooks']
|
584
|
+
end
|
517
585
|
end
|
518
586
|
|
519
587
|
def trusted_external
|
@@ -521,7 +589,18 @@ module Bolt
|
|
521
589
|
end
|
522
590
|
|
523
591
|
def apply_settings
|
524
|
-
@data['apply_settings']
|
592
|
+
if @data['apply-settings'].any? && @data['apply_settings'].any?
|
593
|
+
Bolt::Logger.warn_once(
|
594
|
+
"apply-settings and apply_settings set",
|
595
|
+
"Detected configuration for 'apply-settings' and 'apply_settings'. Bolt will ignore 'apply_settings'."
|
596
|
+
)
|
597
|
+
|
598
|
+
@data['apply-settings']
|
599
|
+
elsif @data['apply-settings'].any?
|
600
|
+
@data['apply-settings']
|
601
|
+
else
|
602
|
+
@data['apply_settings']
|
603
|
+
end
|
525
604
|
end
|
526
605
|
|
527
606
|
def transport
|
data/lib/bolt/config/options.rb
CHANGED
@@ -104,6 +104,21 @@ module Bolt
|
|
104
104
|
# files and is not used by Bolt to actually set default values.
|
105
105
|
OPTIONS = {
|
106
106
|
"apply_settings" => {
|
107
|
+
description: "A map of Puppet settings to use when applying Puppet code using the `apply` "\
|
108
|
+
"plan function or the `bolt apply` command.",
|
109
|
+
type: Hash,
|
110
|
+
properties: {
|
111
|
+
"show_diff" => {
|
112
|
+
description: "Whether to log and report a contextual diff.",
|
113
|
+
type: [TrueClass, FalseClass],
|
114
|
+
_example: true,
|
115
|
+
_default: false
|
116
|
+
}
|
117
|
+
},
|
118
|
+
_plugin: false,
|
119
|
+
_deprecation: "This option will be removed in Bolt 3.0. Use `apply-settings` instead."
|
120
|
+
},
|
121
|
+
"apply-settings" => {
|
107
122
|
description: "A map of Puppet settings to use when applying Puppet code using the `apply` "\
|
108
123
|
"plan function or the `bolt apply` command.",
|
109
124
|
type: Hash,
|
@@ -169,6 +184,9 @@ module Bolt
|
|
169
184
|
"files](inventory_file_v2.md).",
|
170
185
|
type: String,
|
171
186
|
_plugin: false,
|
187
|
+
_deprecation: "This option will be removed in Bolt 3.0. Use the `--inventoryfile` command-line option "\
|
188
|
+
"to use a non-default inventory file or move the file contents to `inventory.yaml` in the "\
|
189
|
+
"project directory.",
|
172
190
|
_example: "~/.puppetlabs/bolt/inventory.yaml",
|
173
191
|
_default: "project/inventory.yaml"
|
174
192
|
},
|
@@ -183,7 +201,8 @@ module Bolt
|
|
183
201
|
properties: {
|
184
202
|
"console" => {
|
185
203
|
description: "Configuration for logs output to the console.",
|
186
|
-
type: Hash,
|
204
|
+
type: [String, Hash],
|
205
|
+
enum: ['disable'],
|
187
206
|
properties: {
|
188
207
|
"level" => {
|
189
208
|
description: "The type of information to log.",
|
@@ -276,14 +295,14 @@ module Bolt
|
|
276
295
|
},
|
277
296
|
"name" => {
|
278
297
|
description: "The name of the Bolt project. When this option is configured, the project is considered a "\
|
279
|
-
"[Bolt project](
|
280
|
-
"
|
298
|
+
"[Bolt project](projects.md), allowing Bolt to load content from the project directory "\
|
299
|
+
"as though it were a module.",
|
281
300
|
type: String,
|
282
301
|
_plugin: false,
|
283
302
|
_example: "myproject"
|
284
303
|
},
|
285
304
|
"plans" => {
|
286
|
-
description: "A list of plan names
|
305
|
+
description: "A list of plan names and glob patterns to filter the project's plans by. This option is used "\
|
287
306
|
"to limit the visibility of plans for users of the project. For example, project authors "\
|
288
307
|
"might want to limit the visibility of plans that are bundled with Bolt or plans that should "\
|
289
308
|
"only be run as part of another plan. When this option is not configured, all plans are "\
|
@@ -291,9 +310,19 @@ module Bolt
|
|
291
310
|
"list.",
|
292
311
|
type: Array,
|
293
312
|
_plugin: false,
|
294
|
-
_example: ["myproject", "myproject::foo", "myproject::bar"]
|
313
|
+
_example: ["myproject", "myproject::foo", "myproject::bar", "myproject::deploy::*"]
|
295
314
|
},
|
296
315
|
"plugin_hooks" => {
|
316
|
+
description: "A map of [plugin hooks](writing_plugins.md#hooks) and which plugins a hook should use. "\
|
317
|
+
"The only configurable plugin hook is `puppet_library`, which can use two possible plugins: "\
|
318
|
+
"[`puppet_agent`](https://github.com/puppetlabs/puppetlabs-puppet_agent#puppet_agentinstall) "\
|
319
|
+
"and [`task`](using_plugins.md#task).",
|
320
|
+
type: Hash,
|
321
|
+
_plugin: true,
|
322
|
+
_example: { "puppet_library" => { "plugin" => "puppet_agent", "version" => "6.15.0", "_run_as" => "root" } },
|
323
|
+
_deprecation: "This option will be removed in Bolt 3.0. Use `plugin-hooks` instead."
|
324
|
+
},
|
325
|
+
"plugin-hooks" => {
|
297
326
|
description: "A map of [plugin hooks](writing_plugins.md#hooks) and which plugins a hook should use. "\
|
298
327
|
"The only configurable plugin hook is `puppet_library`, which can use two possible plugins: "\
|
299
328
|
"[`puppet_agent`](https://github.com/puppetlabs/puppetlabs-puppet_agent#puppet_agentinstall) "\
|
@@ -307,7 +336,11 @@ module Bolt
|
|
307
336
|
"its value is a map of configuration data. Configurable options are specified by the plugin. "\
|
308
337
|
"Read more about configuring plugins in [Using plugins](using_plugins.md#configuring-plugins).",
|
309
338
|
type: Hash,
|
310
|
-
|
339
|
+
additionalProperties: {
|
340
|
+
type: Hash,
|
341
|
+
_plugin: true
|
342
|
+
},
|
343
|
+
_plugin: false,
|
311
344
|
_example: { "pkcs7" => { "keysize" => 1024 } }
|
312
345
|
},
|
313
346
|
"puppetdb" => {
|
@@ -402,7 +435,7 @@ module Bolt
|
|
402
435
|
_default: true
|
403
436
|
},
|
404
437
|
"tasks" => {
|
405
|
-
description: "A list of task names
|
438
|
+
description: "A list of task names and glob patterns to filter the project's tasks by. This option is used "\
|
406
439
|
"to limit the visibility of tasks for users of the project. For example, project authors "\
|
407
440
|
"might want to limit the visibility of tasks that are bundled with Bolt or plans that should "\
|
408
441
|
"only be run as part of a larger workflow. When this option is not configured, all tasks "\
|
@@ -413,7 +446,7 @@ module Bolt
|
|
413
446
|
type: String
|
414
447
|
},
|
415
448
|
_plugin: false,
|
416
|
-
_example: ["myproject", "myproject::foo", "myproject::bar"]
|
449
|
+
_example: ["myproject", "myproject::foo", "myproject::bar", "myproject::deploy_*"]
|
417
450
|
},
|
418
451
|
"trusted-external-command" => {
|
419
452
|
description: "The path to an executable on the Bolt controller that can produce external trusted facts. "\
|
@@ -480,6 +513,7 @@ module Bolt
|
|
480
513
|
|
481
514
|
# Options that are available in a bolt.yaml file
|
482
515
|
BOLT_OPTIONS = %w[
|
516
|
+
apply-settings
|
483
517
|
apply_settings
|
484
518
|
color
|
485
519
|
compile-concurrency
|
@@ -489,6 +523,7 @@ module Bolt
|
|
489
523
|
inventoryfile
|
490
524
|
log
|
491
525
|
modulepath
|
526
|
+
plugin-hooks
|
492
527
|
plugin_hooks
|
493
528
|
plugins
|
494
529
|
puppetdb
|
@@ -505,6 +540,7 @@ module Bolt
|
|
505
540
|
format
|
506
541
|
inventory-config
|
507
542
|
log
|
543
|
+
plugin-hooks
|
508
544
|
plugin_hooks
|
509
545
|
plugins
|
510
546
|
puppetdb
|
@@ -514,6 +550,7 @@ module Bolt
|
|
514
550
|
|
515
551
|
# Options that are available in a bolt-project.yaml file
|
516
552
|
BOLT_PROJECT_OPTIONS = %w[
|
553
|
+
apply-settings
|
517
554
|
apply_settings
|
518
555
|
color
|
519
556
|
compile-concurrency
|
@@ -526,6 +563,7 @@ module Bolt
|
|
526
563
|
modules
|
527
564
|
name
|
528
565
|
plans
|
566
|
+
plugin-hooks
|
529
567
|
plugin_hooks
|
530
568
|
plugins
|
531
569
|
puppetdb
|