openbolt 5.0.0.rc1 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Puppetfile +18 -12
- data/bolt-modules/boltlib/lib/puppet/functions/apply_prep.rb +5 -3
- data/bolt-modules/boltlib/lib/puppet/functions/download_file.rb +1 -0
- data/bolt-modules/boltlib/lib/puppet/functions/get_resources.rb +2 -0
- data/bolt-modules/boltlib/lib/puppet/functions/puppetdb_command.rb +1 -1
- data/bolt-modules/boltlib/lib/puppet/functions/run_container.rb +2 -2
- data/bolt-modules/boltlib/lib/puppet/functions/run_script.rb +1 -0
- data/bolt-modules/boltlib/lib/puppet/functions/set_resources.rb +2 -2
- data/bolt-modules/boltlib/lib/puppet/functions/upload_file.rb +1 -0
- data/bolt-modules/boltlib/lib/puppet/functions/wait.rb +1 -1
- data/bolt-modules/boltlib/lib/puppet/functions/wait_until_available.rb +1 -0
- data/bolt-modules/ctrl/lib/puppet/functions/ctrl/do_until.rb +1 -0
- data/lib/bolt/analytics.rb +1 -1
- data/lib/bolt/application.rb +17 -22
- data/lib/bolt/applicator.rb +4 -0
- data/lib/bolt/bolt_option_parser.rb +10 -8
- data/lib/bolt/cli.rb +7 -6
- data/lib/bolt/config/options.rb +59 -67
- data/lib/bolt/config/transport/base.rb +1 -0
- data/lib/bolt/config/transport/options.rb +59 -59
- data/lib/bolt/config.rb +8 -6
- data/lib/bolt/executor.rb +9 -24
- data/lib/bolt/fiber_executor.rb +3 -1
- data/lib/bolt/inventory/group.rb +3 -0
- data/lib/bolt/inventory/inventory.rb +2 -0
- data/lib/bolt/inventory/options.rb +7 -7
- data/lib/bolt/inventory/target.rb +3 -2
- data/lib/bolt/inventory.rb +1 -0
- data/lib/bolt/logger.rb +2 -0
- data/lib/bolt/module.rb +1 -0
- data/lib/bolt/module_installer/puppetfile.rb +4 -4
- data/lib/bolt/module_installer/resolver.rb +2 -2
- data/lib/bolt/module_installer/specs/forge_spec.rb +4 -4
- data/lib/bolt/module_installer/specs/git_spec.rb +6 -6
- data/lib/bolt/module_installer/specs/id/gitclone.rb +1 -0
- data/lib/bolt/module_installer/specs/id/github.rb +2 -1
- data/lib/bolt/module_installer/specs/id/gitlab.rb +2 -1
- data/lib/bolt/module_installer.rb +3 -1
- data/lib/bolt/outputter/human.rb +9 -4
- data/lib/bolt/outputter/rainbow.rb +1 -0
- data/lib/bolt/pal/yaml_plan/parameter.rb +2 -2
- data/lib/bolt/pal/yaml_plan/step/resources.rb +1 -1
- data/lib/bolt/pal.rb +7 -4
- data/lib/bolt/plan_creator.rb +5 -4
- data/lib/bolt/plugin/cache.rb +2 -0
- data/lib/bolt/plugin/module.rb +7 -0
- data/lib/bolt/plugin/puppet_connect_data.rb +1 -0
- data/lib/bolt/plugin/task.rb +3 -0
- data/lib/bolt/plugin.rb +4 -0
- data/lib/bolt/project.rb +3 -3
- data/lib/bolt/project_manager/config_migrator.rb +3 -3
- data/lib/bolt/project_manager/inventory_migrator.rb +1 -1
- data/lib/bolt/project_manager/module_migrator.rb +7 -6
- data/lib/bolt/project_manager.rb +11 -11
- data/lib/bolt/puppetdb/config.rb +4 -0
- data/lib/bolt/puppetdb/instance.rb +1 -0
- data/lib/bolt/rerun.rb +1 -0
- data/lib/bolt/resource_instance.rb +1 -1
- data/lib/bolt/result.rb +2 -1
- data/lib/bolt/shell/bash.rb +2 -1
- data/lib/bolt/shell/powershell.rb +4 -3
- data/lib/bolt/shell.rb +1 -1
- data/lib/bolt/task/run.rb +1 -0
- data/lib/bolt/task.rb +3 -0
- data/lib/bolt/transport/docker/connection.rb +2 -0
- data/lib/bolt/transport/jail/connection.rb +2 -0
- data/lib/bolt/transport/lxd/connection.rb +2 -0
- data/lib/bolt/transport/lxd.rb +1 -1
- data/lib/bolt/transport/podman/connection.rb +2 -0
- data/lib/bolt/transport/remote.rb +1 -0
- data/lib/bolt/transport/ssh/connection.rb +1 -1
- data/lib/bolt/transport/winrm/connection.rb +4 -3
- data/lib/bolt/util/format.rb +1 -0
- data/lib/bolt/util.rb +7 -4
- data/lib/bolt/validator.rb +1 -1
- data/lib/bolt/version.rb +1 -1
- data/lib/bolt_spec/plans/action_stubs.rb +5 -0
- data/lib/bolt_spec/plans/mock_executor.rb +2 -4
- data/libexec/apply_catalog.rb +2 -1
- data/libexec/custom_facts.rb +1 -1
- data/libexec/query_resources.rb +1 -1
- metadata +63 -77
- data/lib/bolt/config/transport/orch.rb +0 -41
- data/lib/bolt/transport/orch/connection.rb +0 -111
- data/lib/bolt/transport/orch.rb +0 -271
- data/lib/bolt_server/acl.rb +0 -39
- data/lib/bolt_server/base_config.rb +0 -112
- data/lib/bolt_server/config.rb +0 -64
- data/lib/bolt_server/file_cache.rb +0 -200
- data/lib/bolt_server/request_error.rb +0 -11
- data/lib/bolt_server/schemas/action-check_node_connections.json +0 -14
- data/lib/bolt_server/schemas/action-run_command.json +0 -12
- data/lib/bolt_server/schemas/action-run_script.json +0 -47
- data/lib/bolt_server/schemas/action-run_task.json +0 -20
- data/lib/bolt_server/schemas/action-upload_file.json +0 -47
- data/lib/bolt_server/schemas/partials/target-any.json +0 -10
- data/lib/bolt_server/schemas/partials/target-ssh.json +0 -88
- data/lib/bolt_server/schemas/partials/target-winrm.json +0 -67
- data/lib/bolt_server/schemas/partials/task.json +0 -94
- data/lib/bolt_server/schemas/transport-ssh.json +0 -25
- data/lib/bolt_server/schemas/transport-winrm.json +0 -19
- data/lib/bolt_server/transport_app.rb +0 -554
data/lib/bolt/config/options.rb
CHANGED
|
@@ -4,7 +4,6 @@ require_relative '../../bolt/config/transport/docker'
|
|
|
4
4
|
require_relative '../../bolt/config/transport/jail'
|
|
5
5
|
require_relative '../../bolt/config/transport/local'
|
|
6
6
|
require_relative '../../bolt/config/transport/lxd'
|
|
7
|
-
require_relative '../../bolt/config/transport/orch'
|
|
8
7
|
require_relative '../../bolt/config/transport/podman'
|
|
9
8
|
require_relative '../../bolt/config/transport/remote'
|
|
10
9
|
require_relative '../../bolt/config/transport/ssh'
|
|
@@ -20,7 +19,6 @@ module Bolt
|
|
|
20
19
|
'jail' => Bolt::Config::Transport::Jail,
|
|
21
20
|
'local' => Bolt::Config::Transport::Local,
|
|
22
21
|
'lxd' => Bolt::Config::Transport::LXD,
|
|
23
|
-
'pcp' => Bolt::Config::Transport::Orch,
|
|
24
22
|
'podman' => Bolt::Config::Transport::Podman,
|
|
25
23
|
'remote' => Bolt::Config::Transport::Remote,
|
|
26
24
|
'ssh' => Bolt::Config::Transport::SSH,
|
|
@@ -93,8 +91,8 @@ module Bolt
|
|
|
93
91
|
_plugin: true
|
|
94
92
|
},
|
|
95
93
|
"server_urls" => {
|
|
96
|
-
description: "An array containing the PuppetDB host to connect to. Include the protocol `https` "\
|
|
97
|
-
"and the port, which is usually `8081`. For example, "\
|
|
94
|
+
description: "An array containing the PuppetDB host to connect to. Include the protocol `https` " \
|
|
95
|
+
"and the port, which is usually `8081`. For example, " \
|
|
98
96
|
"`https://my-puppetdb-server.com:8081`.",
|
|
99
97
|
type: Array,
|
|
100
98
|
_example: ["https://puppet.example.com:8081"],
|
|
@@ -112,26 +110,26 @@ module Bolt
|
|
|
112
110
|
# https://github.com/puppetlabs/bolt/blob/main/schemas/README.md
|
|
113
111
|
OPTIONS = {
|
|
114
112
|
"analytics" => {
|
|
115
|
-
description: "Whether to disable analytics. Setting this option to 'false' in the system-wide "\
|
|
116
|
-
"or user-level configuration will disable analytics for all projects, even if this "\
|
|
113
|
+
description: "Whether to disable analytics. Setting this option to 'false' in the system-wide " \
|
|
114
|
+
"or user-level configuration will disable analytics for all projects, even if this " \
|
|
117
115
|
"option is set to 'true' at the project level.",
|
|
118
116
|
type: [TrueClass, FalseClass],
|
|
119
117
|
_example: false
|
|
120
118
|
},
|
|
121
119
|
"apply-settings" => {
|
|
122
|
-
description: "A map of Puppet settings to use when applying Puppet code using the `apply` "\
|
|
120
|
+
description: "A map of Puppet settings to use when applying Puppet code using the `apply` " \
|
|
123
121
|
"plan function or the `bolt apply` command.",
|
|
124
122
|
type: Hash,
|
|
125
123
|
properties: {
|
|
126
124
|
"evaltrace" => {
|
|
127
|
-
description: "Whether each resource should log when it is being evaluated. This allows "\
|
|
125
|
+
description: "Whether each resource should log when it is being evaluated. This allows " \
|
|
128
126
|
"you to interactively see exactly what is being done.",
|
|
129
127
|
type: [TrueClass, FalseClass],
|
|
130
128
|
_example: true,
|
|
131
129
|
_default: false
|
|
132
130
|
},
|
|
133
131
|
"log_level" => {
|
|
134
|
-
description: "The log level for logs in apply reports from Puppet. These can be seen "\
|
|
132
|
+
description: "The log level for logs in apply reports from Puppet. These can be seen " \
|
|
135
133
|
"in ApplyResults.",
|
|
136
134
|
type: String,
|
|
137
135
|
enum: %w[debug info notice warning err alert emerg crit],
|
|
@@ -145,7 +143,7 @@ module Bolt
|
|
|
145
143
|
_default: false
|
|
146
144
|
},
|
|
147
145
|
"trace" => {
|
|
148
|
-
description: "Whether to print stack traces on some errors. Will print internal Ruby "\
|
|
146
|
+
description: "Whether to print stack traces on some errors. Will print internal Ruby " \
|
|
149
147
|
"stack trace interleaved with Puppet function frames.",
|
|
150
148
|
type: [TrueClass, FalseClass],
|
|
151
149
|
_example: true,
|
|
@@ -178,8 +176,8 @@ module Bolt
|
|
|
178
176
|
_default: "100 or 1/7 the ulimit, whichever is lower."
|
|
179
177
|
},
|
|
180
178
|
"disable-warnings" => {
|
|
181
|
-
description: "An array of IDs of warnings to suppress. Warnings with a matching ID will not be logged "\
|
|
182
|
-
"by Bolt. If you are upgrading Bolt to a new major version, you should re-enable all warnings "\
|
|
179
|
+
description: "An array of IDs of warnings to suppress. Warnings with a matching ID will not be logged " \
|
|
180
|
+
"by Bolt. If you are upgrading Bolt to a new major version, you should re-enable all warnings " \
|
|
183
181
|
"until you have finished upgrading.",
|
|
184
182
|
type: Array,
|
|
185
183
|
items: {
|
|
@@ -205,11 +203,11 @@ module Bolt
|
|
|
205
203
|
type: [TrueClass, FalseClass],
|
|
206
204
|
_example: true,
|
|
207
205
|
_default: false,
|
|
208
|
-
_deprecation: "Bolt no longer honors this option and enables loading scripts from the scripts "\
|
|
206
|
+
_deprecation: "Bolt no longer honors this option and enables loading scripts from the scripts " \
|
|
209
207
|
"directory by default."
|
|
210
208
|
},
|
|
211
209
|
"script_interpreter" => {
|
|
212
|
-
description: "Use a target's [`interpreters` configuration](bolt_transports_reference.md#interpreters) "\
|
|
210
|
+
description: "Use a target's [`interpreters` configuration](bolt_transports_reference.md#interpreters) " \
|
|
213
211
|
"when running a script.",
|
|
214
212
|
type: [TrueClass, FalseClass],
|
|
215
213
|
_example: true,
|
|
@@ -227,8 +225,8 @@ module Bolt
|
|
|
227
225
|
_default: "project/hiera.yaml"
|
|
228
226
|
},
|
|
229
227
|
"inventory-config" => {
|
|
230
|
-
description: "A map of default configuration options for the inventory. This includes options "\
|
|
231
|
-
"for setting the default transport to use when connecting to targets, as well as "\
|
|
228
|
+
description: "A map of default configuration options for the inventory. This includes options " \
|
|
229
|
+
"for setting the default transport to use when connecting to targets, as well as " \
|
|
232
230
|
"options for configuring the default behavior of each transport.",
|
|
233
231
|
type: Hash,
|
|
234
232
|
_plugin: false,
|
|
@@ -249,11 +247,11 @@ module Bolt
|
|
|
249
247
|
_example: { "ttl" => 3600 }
|
|
250
248
|
},
|
|
251
249
|
"log" => {
|
|
252
|
-
description: "A map of configuration for the logfile output. Under `log`, you can configure log options "\
|
|
253
|
-
"for `console` and add configuration for individual log files, such as "\
|
|
254
|
-
"`~/.puppetlabs/bolt/debug.log`. Individual log files must be valid filepaths. If the log "\
|
|
255
|
-
"file does not exist, then Bolt will create it before logging information. Set the value to "\
|
|
256
|
-
"`disable` to remove a log file defined at an earlier level of the config hierarchy. By "\
|
|
250
|
+
description: "A map of configuration for the logfile output. Under `log`, you can configure log options " \
|
|
251
|
+
"for `console` and add configuration for individual log files, such as " \
|
|
252
|
+
"`~/.puppetlabs/bolt/debug.log`. Individual log files must be valid filepaths. If the log " \
|
|
253
|
+
"file does not exist, then Bolt will create it before logging information. Set the value to " \
|
|
254
|
+
"`disable` to remove a log file defined at an earlier level of the config hierarchy. By " \
|
|
257
255
|
"default, Bolt logs to a bolt-debug.log file in the Bolt project directory.",
|
|
258
256
|
type: Hash,
|
|
259
257
|
properties: {
|
|
@@ -294,7 +292,7 @@ module Bolt
|
|
|
294
292
|
"~/logs/debug.log" => { "append" => false, "level" => "debug" } }
|
|
295
293
|
},
|
|
296
294
|
"modulepath" => {
|
|
297
|
-
description: "An array of directories that Bolt loads content such as plans and tasks from. Read more "\
|
|
295
|
+
description: "An array of directories that Bolt loads content such as plans and tasks from. Read more " \
|
|
298
296
|
"about modules in [Module structure](module_structure.md).",
|
|
299
297
|
type: [Array, String],
|
|
300
298
|
items: {
|
|
@@ -305,8 +303,8 @@ module Bolt
|
|
|
305
303
|
_default: ["project/modules"]
|
|
306
304
|
},
|
|
307
305
|
"module-install" => {
|
|
308
|
-
description: "Options that configure where Bolt downloads modules from. This option is only used when "\
|
|
309
|
-
"installing modules using the `bolt module add|install` commands and "\
|
|
306
|
+
description: "Options that configure where Bolt downloads modules from. This option is only used when " \
|
|
307
|
+
"installing modules using the `bolt module add|install` commands and " \
|
|
310
308
|
"`Add|Install-BoltModule` cmdlets.",
|
|
311
309
|
type: Hash,
|
|
312
310
|
properties: {
|
|
@@ -315,7 +313,7 @@ module Bolt
|
|
|
315
313
|
type: Hash,
|
|
316
314
|
properties: {
|
|
317
315
|
"authorization_token" => {
|
|
318
|
-
description: "The token used to authorize requests to the Forge host. Must also specify "\
|
|
316
|
+
description: "The token used to authorize requests to the Forge host. Must also specify " \
|
|
319
317
|
"`baseurl` when using this option.",
|
|
320
318
|
type: String,
|
|
321
319
|
_example: "Bearer eyJhbGciOiJIUzI1NiIsInR5c...",
|
|
@@ -350,9 +348,9 @@ module Bolt
|
|
|
350
348
|
_plugin: false
|
|
351
349
|
},
|
|
352
350
|
"modules" => {
|
|
353
|
-
description: "A list of module dependencies for the project. Each dependency is a map of data specifying "\
|
|
354
|
-
"the module to install. To install the project's module dependencies, run the `bolt module "\
|
|
355
|
-
"install` command. For more information about specifying modules, see [the "\
|
|
351
|
+
description: "A list of module dependencies for the project. Each dependency is a map of data specifying " \
|
|
352
|
+
"the module to install. To install the project's module dependencies, run the `bolt module " \
|
|
353
|
+
"install` command. For more information about specifying modules, see [the " \
|
|
356
354
|
"documentation](https://pup.pt/bolt-module-specs).",
|
|
357
355
|
type: Array,
|
|
358
356
|
items: {
|
|
@@ -370,7 +368,7 @@ module Bolt
|
|
|
370
368
|
type: [TrueClass, FalseClass]
|
|
371
369
|
},
|
|
372
370
|
"version_requirement" => {
|
|
373
|
-
description: "The version requirement for the module. Accepts a specific version (1.2.3), version "\
|
|
371
|
+
description: "The version requirement for the module. Accepts a specific version (1.2.3), version " \
|
|
374
372
|
"shorthand (1.2.x), or a version range (>= 1.2.0).",
|
|
375
373
|
type: String
|
|
376
374
|
}
|
|
@@ -411,36 +409,36 @@ module Bolt
|
|
|
411
409
|
]
|
|
412
410
|
},
|
|
413
411
|
"name" => {
|
|
414
|
-
description: "The name of the Bolt project. When this option is configured, the project is considered a "\
|
|
415
|
-
"[Bolt project](projects.md), allowing Bolt to load content from the project directory "\
|
|
412
|
+
description: "The name of the Bolt project. When this option is configured, the project is considered a " \
|
|
413
|
+
"[Bolt project](projects.md), allowing Bolt to load content from the project directory " \
|
|
416
414
|
"as though it were a module.",
|
|
417
415
|
type: String,
|
|
418
416
|
_plugin: false,
|
|
419
417
|
_example: "myproject"
|
|
420
418
|
},
|
|
421
419
|
"plans" => {
|
|
422
|
-
description: "A list of plan names and glob patterns to filter the project's plans by. This option is used "\
|
|
423
|
-
"to limit the visibility of plans for users of the project. For example, project authors "\
|
|
424
|
-
"might want to limit the visibility of plans that are bundled with Bolt or plans that should "\
|
|
425
|
-
"only be run as part of another plan. When this option is not configured, all plans are "\
|
|
426
|
-
"visible. This option does not prevent users from running plans that are not part of this "\
|
|
420
|
+
description: "A list of plan names and glob patterns to filter the project's plans by. This option is used " \
|
|
421
|
+
"to limit the visibility of plans for users of the project. For example, project authors " \
|
|
422
|
+
"might want to limit the visibility of plans that are bundled with Bolt or plans that should " \
|
|
423
|
+
"only be run as part of another plan. When this option is not configured, all plans are " \
|
|
424
|
+
"visible. This option does not prevent users from running plans that are not part of this " \
|
|
427
425
|
"list.",
|
|
428
426
|
type: Array,
|
|
429
427
|
_plugin: false,
|
|
430
428
|
_example: ["myproject", "myproject::foo", "myproject::bar", "myproject::deploy::*"]
|
|
431
429
|
},
|
|
432
430
|
"plugin-hooks" => {
|
|
433
|
-
description: "A map of [plugin hooks](writing_plugins.md#hooks) and which plugins a hook should use. "\
|
|
434
|
-
"The only configurable plugin hook is `puppet_library`, which can use two possible plugins: "\
|
|
435
|
-
"[`puppet_agent`](https://github.com/puppetlabs/puppetlabs-puppet_agent#puppet_agentinstall) "\
|
|
431
|
+
description: "A map of [plugin hooks](writing_plugins.md#hooks) and which plugins a hook should use. " \
|
|
432
|
+
"The only configurable plugin hook is `puppet_library`, which can use two possible plugins: " \
|
|
433
|
+
"[`puppet_agent`](https://github.com/puppetlabs/puppetlabs-puppet_agent#puppet_agentinstall) " \
|
|
436
434
|
"and [`task`](using_plugins.md#task).",
|
|
437
435
|
type: Hash,
|
|
438
436
|
_plugin: true,
|
|
439
437
|
_example: { "puppet_library" => { "plugin" => "puppet_agent", "version" => "6.15.0", "_run_as" => "root" } }
|
|
440
438
|
},
|
|
441
439
|
"plugins" => {
|
|
442
|
-
description: "A map of plugins and their configuration data, where each key is the name of a plugin and "\
|
|
443
|
-
"its value is a map of configuration data. Configurable options are specified by the plugin. "\
|
|
440
|
+
description: "A map of plugins and their configuration data, where each key is the name of a plugin and " \
|
|
441
|
+
"its value is a map of configuration data. Configurable options are specified by the plugin. " \
|
|
444
442
|
"Read more about configuring plugins in [Using plugins](using_plugins.md#configuring-plugins).",
|
|
445
443
|
type: Hash,
|
|
446
444
|
additionalProperties: {
|
|
@@ -451,24 +449,24 @@ module Bolt
|
|
|
451
449
|
_example: { "pkcs7" => { "keysize" => 1024 } }
|
|
452
450
|
},
|
|
453
451
|
"policies" => {
|
|
454
|
-
description: "A list of policy names and glob patterns to filter the project's policies by. This option "\
|
|
455
|
-
"is used to specify which policies are available to a project and can be applied to targets. "\
|
|
456
|
-
"When this option is not configured, policies are not available to the project and cannot "\
|
|
452
|
+
description: "A list of policy names and glob patterns to filter the project's policies by. This option " \
|
|
453
|
+
"is used to specify which policies are available to a project and can be applied to targets. " \
|
|
454
|
+
"When this option is not configured, policies are not available to the project and cannot " \
|
|
457
455
|
"be applied to targets.",
|
|
458
456
|
type: Array,
|
|
459
457
|
_plugin: false,
|
|
460
458
|
_example: ["myproject::apache", "myproject::postgres"]
|
|
461
459
|
},
|
|
462
460
|
"puppetdb" => {
|
|
463
|
-
description: "A map containing options for [configuring the Bolt PuppetDB "\
|
|
461
|
+
description: "A map containing options for [configuring the Bolt PuppetDB " \
|
|
464
462
|
"client](bolt_connect_puppetdb.md).",
|
|
465
463
|
type: Hash,
|
|
466
464
|
properties: PUPPETDB_OPTIONS,
|
|
467
465
|
_plugin: true
|
|
468
466
|
},
|
|
469
467
|
"puppetdb-instances" => {
|
|
470
|
-
description: "A map of named PuppetDB instances and their configuration, where keys are the name "\
|
|
471
|
-
"of a PuppetDB instance and values are maps of configuration options. For more "\
|
|
468
|
+
description: "A map of named PuppetDB instances and their configuration, where keys are the name " \
|
|
469
|
+
"of a PuppetDB instance and values are maps of configuration options. For more " \
|
|
472
470
|
"information, see [Connecting Bolt to PuppetDB](bolt_connect_puppetdb.md).",
|
|
473
471
|
type: Hash,
|
|
474
472
|
additionalProperties: {
|
|
@@ -478,15 +476,15 @@ module Bolt
|
|
|
478
476
|
_plugin: true
|
|
479
477
|
},
|
|
480
478
|
"rerunfile" => {
|
|
481
|
-
description: "The path to the project's rerun file. The rerun file is used to store information "\
|
|
479
|
+
description: "The path to the project's rerun file. The rerun file is used to store information " \
|
|
482
480
|
"about targets from the most recent run. Expands relative to the project directory.",
|
|
483
481
|
type: String,
|
|
484
482
|
_example: "/Users/bolt/project/rerun.json",
|
|
485
483
|
_plugin: true
|
|
486
484
|
},
|
|
487
485
|
"save-rerun" => {
|
|
488
|
-
description: "Whether to update `.rerun.json` in the Bolt project directory. If "\
|
|
489
|
-
"your target names include passwords, set this value to `false` to avoid "\
|
|
486
|
+
description: "Whether to update `.rerun.json` in the Bolt project directory. If " \
|
|
487
|
+
"your target names include passwords, set this value to `false` to avoid " \
|
|
490
488
|
"writing passwords to disk.",
|
|
491
489
|
type: [TrueClass, FalseClass],
|
|
492
490
|
_plugin: false,
|
|
@@ -501,7 +499,7 @@ module Bolt
|
|
|
501
499
|
_default: true
|
|
502
500
|
},
|
|
503
501
|
"stream" => {
|
|
504
|
-
description: "Whether to stream output from scripts and commands to the console. "\
|
|
502
|
+
description: "Whether to stream output from scripts and commands to the console. " \
|
|
505
503
|
"**This option is experimental**.",
|
|
506
504
|
type: [TrueClass, FalseClass],
|
|
507
505
|
_plugin: false,
|
|
@@ -509,11 +507,11 @@ module Bolt
|
|
|
509
507
|
_example: true
|
|
510
508
|
},
|
|
511
509
|
"tasks" => {
|
|
512
|
-
description: "A list of task names and glob patterns to filter the project's tasks by. This option is used "\
|
|
513
|
-
"to limit the visibility of tasks for users of the project. For example, project authors "\
|
|
514
|
-
"might want to limit the visibility of tasks that are bundled with Bolt or plans that should "\
|
|
515
|
-
"only be run as part of a larger workflow. When this option is not configured, all tasks "\
|
|
516
|
-
"are visible. This option does not prevent users from running tasks that are not part of "\
|
|
510
|
+
description: "A list of task names and glob patterns to filter the project's tasks by. This option is used " \
|
|
511
|
+
"to limit the visibility of tasks for users of the project. For example, project authors " \
|
|
512
|
+
"might want to limit the visibility of tasks that are bundled with Bolt or plans that should " \
|
|
513
|
+
"only be run as part of a larger workflow. When this option is not configured, all tasks " \
|
|
514
|
+
"are visible. This option does not prevent users from running tasks that are not part of " \
|
|
517
515
|
"this list.",
|
|
518
516
|
type: Array,
|
|
519
517
|
items: {
|
|
@@ -523,8 +521,8 @@ module Bolt
|
|
|
523
521
|
_example: ["myproject", "myproject::foo", "myproject::bar", "myproject::deploy_*"]
|
|
524
522
|
},
|
|
525
523
|
"trusted-external-command" => {
|
|
526
|
-
description: "The path to an executable on the Bolt controller that can produce external trusted facts. "\
|
|
527
|
-
"**External trusted facts are experimental in both Puppet and Bolt and this API might "\
|
|
524
|
+
description: "The path to an executable on the Bolt controller that can produce external trusted facts. " \
|
|
525
|
+
"**External trusted facts are experimental in both Puppet and Bolt and this API might " \
|
|
528
526
|
"change or be removed.**",
|
|
529
527
|
type: String,
|
|
530
528
|
_plugin: false,
|
|
@@ -538,7 +536,7 @@ module Bolt
|
|
|
538
536
|
# 'config'.
|
|
539
537
|
INVENTORY_OPTIONS = {
|
|
540
538
|
"transport" => {
|
|
541
|
-
description: "The default transport to use when the transport for a target is not "\
|
|
539
|
+
description: "The default transport to use when the transport for a target is not " \
|
|
542
540
|
"specified in the URI.",
|
|
543
541
|
type: String,
|
|
544
542
|
enum: TRANSPORT_CONFIG.keys,
|
|
@@ -559,25 +557,19 @@ module Bolt
|
|
|
559
557
|
_example: { cleanup: false }
|
|
560
558
|
},
|
|
561
559
|
"local" => {
|
|
562
|
-
description: "A map of configuration options for the local transport. The set of available options is "\
|
|
560
|
+
description: "A map of configuration options for the local transport. The set of available options is " \
|
|
563
561
|
"platform dependent.",
|
|
564
562
|
type: Hash,
|
|
565
563
|
_plugin: true,
|
|
566
564
|
_example: { "cleanup" => false, "tmpdir" => "/tmp/bolt" }
|
|
567
565
|
},
|
|
568
566
|
"lxd" => {
|
|
569
|
-
description: "A map of configuration options for the LXD transport. The LXD transport is "\
|
|
567
|
+
description: "A map of configuration options for the LXD transport. The LXD transport is " \
|
|
570
568
|
"experimental and might include breaking changes between minor versions.",
|
|
571
569
|
type: Hash,
|
|
572
570
|
_plugin: true,
|
|
573
571
|
_example: { cleanup: false }
|
|
574
572
|
},
|
|
575
|
-
"pcp" => {
|
|
576
|
-
description: "A map of configuration options for the pcp transport.",
|
|
577
|
-
type: Hash,
|
|
578
|
-
_plugin: true,
|
|
579
|
-
_example: { "job-poll-interval" => 15, "job-poll-timeout" => 30 }
|
|
580
|
-
},
|
|
581
573
|
"podman" => {
|
|
582
574
|
description: "A map of configuration options for the podman transport.",
|
|
583
575
|
type: Hash,
|
|
@@ -113,6 +113,7 @@ module Bolt
|
|
|
113
113
|
|
|
114
114
|
private def assert_hash_or_config(data)
|
|
115
115
|
return if data.is_a?(Hash) || data.is_a?(self.class)
|
|
116
|
+
|
|
116
117
|
raise Bolt::ValidationError,
|
|
117
118
|
"Transport config must be a Hash or #{self.class}, received #{data.class} #{data.inspect}"
|
|
118
119
|
end
|
|
@@ -18,11 +18,11 @@ module Bolt
|
|
|
18
18
|
},
|
|
19
19
|
"batch-mode" => {
|
|
20
20
|
type: [TrueClass, FalseClass],
|
|
21
|
-
description: "Whether to disable password querying. When set to `false`, SSH will fall back to "\
|
|
22
|
-
"prompting for a password if key authentication fails. This might cause Bolt to hang. "\
|
|
23
|
-
"To prevent Bolt from hanging, you can configure `ssh-command` to use an SSH utility "\
|
|
24
|
-
"such as sshpass that supports providing a password non-interactively. For more "\
|
|
25
|
-
"information, see [Providing a password non-interactively using "\
|
|
21
|
+
description: "Whether to disable password querying. When set to `false`, SSH will fall back to " \
|
|
22
|
+
"prompting for a password if key authentication fails. This might cause Bolt to hang. " \
|
|
23
|
+
"To prevent Bolt from hanging, you can configure `ssh-command` to use an SSH utility " \
|
|
24
|
+
"such as sshpass that supports providing a password non-interactively. For more " \
|
|
25
|
+
"information, see [Providing a password non-interactively using " \
|
|
26
26
|
"`native-ssh`](troubleshooting.md#providing-a-password-non-interactively-using-native-ssh).",
|
|
27
27
|
_plugin: true,
|
|
28
28
|
_default: true,
|
|
@@ -43,9 +43,9 @@ module Bolt
|
|
|
43
43
|
},
|
|
44
44
|
"cleanup" => {
|
|
45
45
|
type: [TrueClass, FalseClass],
|
|
46
|
-
description: "Whether to clean up temporary files created on targets. When running commands on a target, "\
|
|
47
|
-
"Bolt might create temporary files. After completing the command, these files are "\
|
|
48
|
-
"automatically deleted. This value can be set to 'false' if you wish to leave these "\
|
|
46
|
+
description: "Whether to clean up temporary files created on targets. When running commands on a target, " \
|
|
47
|
+
"Bolt might create temporary files. After completing the command, these files are " \
|
|
48
|
+
"automatically deleted. This value can be set to 'false' if you wish to leave these " \
|
|
49
49
|
"temporary files on the target.",
|
|
50
50
|
_plugin: true,
|
|
51
51
|
_default: true,
|
|
@@ -53,7 +53,7 @@ module Bolt
|
|
|
53
53
|
},
|
|
54
54
|
"connect-timeout" => {
|
|
55
55
|
type: Integer,
|
|
56
|
-
description: "How long to wait in seconds when establishing connections. Set this value higher if you "\
|
|
56
|
+
description: "How long to wait in seconds when establishing connections. Set this value higher if you " \
|
|
57
57
|
"frequently encounter connection timeout errors when running Bolt.",
|
|
58
58
|
minimum: 1,
|
|
59
59
|
_plugin: true,
|
|
@@ -62,9 +62,9 @@ module Bolt
|
|
|
62
62
|
},
|
|
63
63
|
"copy-command" => {
|
|
64
64
|
type: [Array, String],
|
|
65
|
-
description: "The command to use when copying files using native SSH. Bolt runs `<copy-command> <src> "\
|
|
66
|
-
"<dest>`. This option is used when you need support for features or algorithms that are not "\
|
|
67
|
-
"supported by the net-ssh Ruby library. **This option is experimental.** You can read more "\
|
|
65
|
+
description: "The command to use when copying files using native SSH. Bolt runs `<copy-command> <src> " \
|
|
66
|
+
"<dest>`. This option is used when you need support for features or algorithms that are not " \
|
|
67
|
+
"supported by the net-ssh Ruby library. **This option is experimental.** You can read more " \
|
|
68
68
|
"about this option in [Native SSH transport](experimental_features.md#native-ssh-transport).",
|
|
69
69
|
items: {
|
|
70
70
|
type: String
|
|
@@ -83,11 +83,11 @@ module Bolt
|
|
|
83
83
|
},
|
|
84
84
|
"encryption-algorithms" => {
|
|
85
85
|
type: Array,
|
|
86
|
-
description: "A list of encryption algorithms to use when establishing a connection "\
|
|
87
|
-
"to a target. Supported algorithms are defined by the Ruby net-ssh library and can be "\
|
|
88
|
-
"viewed [here](https://github.com/net-ssh/net-ssh#supported-algorithms). All supported, "\
|
|
89
|
-
"non-deprecated algorithms are available by default when this option is not used. To "\
|
|
90
|
-
"reference all default algorithms using this option, add 'defaults' to the list of "\
|
|
86
|
+
description: "A list of encryption algorithms to use when establishing a connection " \
|
|
87
|
+
"to a target. Supported algorithms are defined by the Ruby net-ssh library and can be " \
|
|
88
|
+
"viewed [here](https://github.com/net-ssh/net-ssh#supported-algorithms). All supported, " \
|
|
89
|
+
"non-deprecated algorithms are available by default when this option is not used. To " \
|
|
90
|
+
"reference all default algorithms using this option, add 'defaults' to the list of " \
|
|
91
91
|
"supported algorithms.",
|
|
92
92
|
uniqueItems: true,
|
|
93
93
|
items: {
|
|
@@ -98,11 +98,11 @@ module Bolt
|
|
|
98
98
|
},
|
|
99
99
|
"extensions" => {
|
|
100
100
|
type: Array,
|
|
101
|
-
description: "A list of file extensions that are accepted for scripts or tasks on "\
|
|
102
|
-
"Windows. Scripts with these file extensions rely on the target's file "\
|
|
103
|
-
"type association to run. For example, if Python is installed on the "\
|
|
104
|
-
"system, a `.py` script runs with `python.exe`. The extensions `.ps1`, "\
|
|
105
|
-
"`.rb`, and `.pp` are always allowed and run via hard-coded "\
|
|
101
|
+
description: "A list of file extensions that are accepted for scripts or tasks on " \
|
|
102
|
+
"Windows. Scripts with these file extensions rely on the target's file " \
|
|
103
|
+
"type association to run. For example, if Python is installed on the " \
|
|
104
|
+
"system, a `.py` script runs with `python.exe`. The extensions `.ps1`, " \
|
|
105
|
+
"`.rb`, and `.pp` are always allowed and run via hard-coded " \
|
|
106
106
|
"executables.",
|
|
107
107
|
uniqueItems: true,
|
|
108
108
|
items: {
|
|
@@ -113,7 +113,7 @@ module Bolt
|
|
|
113
113
|
},
|
|
114
114
|
"file-protocol" => {
|
|
115
115
|
type: String,
|
|
116
|
-
description: "Which file transfer protocol to use. Either `winrm` or `smb`. Using `smb` is "\
|
|
116
|
+
description: "Which file transfer protocol to use. Either `winrm` or `smb`. Using `smb` is " \
|
|
117
117
|
"recommended for large file transfers.",
|
|
118
118
|
enum: %w[smb winrm],
|
|
119
119
|
_plugin: true,
|
|
@@ -128,11 +128,11 @@ module Bolt
|
|
|
128
128
|
},
|
|
129
129
|
"host-key-algorithms" => {
|
|
130
130
|
type: Array,
|
|
131
|
-
description: "A list of host key algorithms to use when establishing a connection "\
|
|
132
|
-
"to a target. Supported algorithms are defined by the Ruby net-ssh library and can be "\
|
|
133
|
-
"viewed [here](https://github.com/net-ssh/net-ssh#supported-algorithms). All supported, "\
|
|
134
|
-
"non-deprecated algorithms are available by default when this option is not used. To "\
|
|
135
|
-
"reference all default algorithms using this option, add 'defaults' to the list of "\
|
|
131
|
+
description: "A list of host key algorithms to use when establishing a connection " \
|
|
132
|
+
"to a target. Supported algorithms are defined by the Ruby net-ssh library and can be " \
|
|
133
|
+
"viewed [here](https://github.com/net-ssh/net-ssh#supported-algorithms). All supported, " \
|
|
134
|
+
"non-deprecated algorithms are available by default when this option is not used. To " \
|
|
135
|
+
"reference all default algorithms using this option, add 'defaults' to the list of " \
|
|
136
136
|
"supported algorithms.",
|
|
137
137
|
uniqueItems: true,
|
|
138
138
|
items: {
|
|
@@ -149,10 +149,10 @@ module Bolt
|
|
|
149
149
|
},
|
|
150
150
|
"interpreters" => {
|
|
151
151
|
type: Hash,
|
|
152
|
-
description: "A map of an extension name to the absolute path of an executable, enabling you to "\
|
|
153
|
-
"override the shebang defined in a task executable. The extension can optionally be "\
|
|
154
|
-
"specified with the `.` character (`.py` and `py` both map to a task executable "\
|
|
155
|
-
"`task.py`) and the extension is case sensitive. When a target's name is `localhost`, "\
|
|
152
|
+
description: "A map of an extension name to the absolute path of an executable, enabling you to " \
|
|
153
|
+
"override the shebang defined in a task executable. The extension can optionally be " \
|
|
154
|
+
"specified with the `.` character (`.py` and `py` both map to a task executable " \
|
|
155
|
+
"`task.py`) and the extension is case sensitive. When a target's name is `localhost`, " \
|
|
156
156
|
"Ruby tasks run with the Bolt Ruby interpreter by default.",
|
|
157
157
|
additionalProperties: {
|
|
158
158
|
type: [String, Array],
|
|
@@ -181,11 +181,11 @@ module Bolt
|
|
|
181
181
|
},
|
|
182
182
|
"kex-algorithms" => {
|
|
183
183
|
type: Array,
|
|
184
|
-
description: "A list of key exchange algorithms to use when establishing a connection "\
|
|
185
|
-
"to a target. Supported algorithms are defined by the Ruby net-ssh library and can be "\
|
|
186
|
-
"viewed [here](https://github.com/net-ssh/net-ssh#supported-algorithms). All supported, "\
|
|
187
|
-
"non-deprecated algorithms are available by default when this option is not used. To "\
|
|
188
|
-
"reference all default algorithms using this option, add 'defaults' to the list of "\
|
|
184
|
+
description: "A list of key exchange algorithms to use when establishing a connection " \
|
|
185
|
+
"to a target. Supported algorithms are defined by the Ruby net-ssh library and can be " \
|
|
186
|
+
"viewed [here](https://github.com/net-ssh/net-ssh#supported-algorithms). All supported, " \
|
|
187
|
+
"non-deprecated algorithms are available by default when this option is not used. To " \
|
|
188
|
+
"reference all default algorithms using this option, add 'defaults' to the list of " \
|
|
189
189
|
"supported algorithms.",
|
|
190
190
|
uniqueItems: true,
|
|
191
191
|
items: {
|
|
@@ -212,11 +212,11 @@ module Bolt
|
|
|
212
212
|
},
|
|
213
213
|
"mac-algorithms" => {
|
|
214
214
|
type: Array,
|
|
215
|
-
description: "List of message authentication code algorithms to use when establishing a connection "\
|
|
216
|
-
"to a target. Supported algorithms are defined by the Ruby net-ssh library and can be "\
|
|
217
|
-
"viewed [here](https://github.com/net-ssh/net-ssh#supported-algorithms). All supported, "\
|
|
218
|
-
"non-deprecated algorithms are available by default when this option is not used. To "\
|
|
219
|
-
"reference all default algorithms using this option, add 'defaults' to the list of "\
|
|
215
|
+
description: "List of message authentication code algorithms to use when establishing a connection " \
|
|
216
|
+
"to a target. Supported algorithms are defined by the Ruby net-ssh library and can be " \
|
|
217
|
+
"viewed [here](https://github.com/net-ssh/net-ssh#supported-algorithms). All supported, " \
|
|
218
|
+
"non-deprecated algorithms are available by default when this option is not used. To " \
|
|
219
|
+
"reference all default algorithms using this option, add 'defaults' to the list of " \
|
|
220
220
|
"supported algorithms.",
|
|
221
221
|
uniqueItems: true,
|
|
222
222
|
items: {
|
|
@@ -227,7 +227,7 @@ module Bolt
|
|
|
227
227
|
},
|
|
228
228
|
"native-ssh" => {
|
|
229
229
|
type: [TrueClass, FalseClass],
|
|
230
|
-
description: "This enables the native SSH transport, which shells out to SSH instead of using the "\
|
|
230
|
+
description: "This enables the native SSH transport, which shells out to SSH instead of using the " \
|
|
231
231
|
"net-ssh Ruby library",
|
|
232
232
|
_default: false,
|
|
233
233
|
_example: true
|
|
@@ -247,8 +247,8 @@ module Bolt
|
|
|
247
247
|
},
|
|
248
248
|
"private-key" => {
|
|
249
249
|
type: [Hash, String],
|
|
250
|
-
description: "Either the path to the private key file to use for authentication, or "\
|
|
251
|
-
"a hash with the key `key-data` and the contents of the private key. Note that "\
|
|
250
|
+
description: "Either the path to the private key file to use for authentication, or " \
|
|
251
|
+
"a hash with the key `key-data` and the contents of the private key. Note that " \
|
|
252
252
|
"the key cannot be encrypted if using the `key-data` hash.",
|
|
253
253
|
required: ["key-data"],
|
|
254
254
|
properties: {
|
|
@@ -289,16 +289,16 @@ module Bolt
|
|
|
289
289
|
},
|
|
290
290
|
"run-as" => {
|
|
291
291
|
type: String,
|
|
292
|
-
description: "The user to run commands as after login. The run-as user must be different than the "\
|
|
292
|
+
description: "The user to run commands as after login. The run-as user must be different than the " \
|
|
293
293
|
"login user.",
|
|
294
294
|
_plugin: true,
|
|
295
295
|
_example: "root"
|
|
296
296
|
},
|
|
297
297
|
"run-as-command" => {
|
|
298
298
|
type: Array,
|
|
299
|
-
description: "The command to elevate permissions. Bolt appends the user and command strings to the "\
|
|
300
|
-
"configured `run-as-command` before running it on the target. This command must not require
|
|
301
|
-
"
|
|
299
|
+
description: "The command to elevate permissions. Bolt appends the user and command strings to the " \
|
|
300
|
+
"configured `run-as-command` before running it on the target. This command must not require " \
|
|
301
|
+
"aninteractive password prompt, and the `sudo-password` option is ignored when " \
|
|
302
302
|
"`run-as-command` is specified. The `run-as-command` must be specified as an array.",
|
|
303
303
|
items: {
|
|
304
304
|
type: String
|
|
@@ -316,9 +316,9 @@ module Bolt
|
|
|
316
316
|
},
|
|
317
317
|
"script-dir" => {
|
|
318
318
|
type: String,
|
|
319
|
-
description: "The subdirectory of the tmpdir to use in place of a randomized "\
|
|
320
|
-
"subdirectory for uploading and executing temporary files on the "\
|
|
321
|
-
"target. It's expected that this directory already exists as a subdir "\
|
|
319
|
+
description: "The subdirectory of the tmpdir to use in place of a randomized " \
|
|
320
|
+
"subdirectory for uploading and executing temporary files on the " \
|
|
321
|
+
"target. It's expected that this directory already exists as a subdir " \
|
|
322
322
|
"of tmpdir, which is either configured or defaults to `/tmp`.",
|
|
323
323
|
_plugin: true,
|
|
324
324
|
_example: "bolt_scripts"
|
|
@@ -345,9 +345,9 @@ module Bolt
|
|
|
345
345
|
},
|
|
346
346
|
"ssh-command" => {
|
|
347
347
|
type: [Array, String],
|
|
348
|
-
description: "The command and options to use when SSHing. This option is used when you need support for "\
|
|
349
|
-
"features or algorithms that are not supported by the net-ssh Ruby library. **This option "\
|
|
350
|
-
"is experimental.** You can read more about this option in [Native SSH "\
|
|
348
|
+
description: "The command and options to use when SSHing. This option is used when you need support for " \
|
|
349
|
+
"features or algorithms that are not supported by the net-ssh Ruby library. **This option " \
|
|
350
|
+
"is experimental.** You can read more about this option in [Native SSH " \
|
|
351
351
|
"transport](experimental_features.md#native-ssh-transport).",
|
|
352
352
|
items: {
|
|
353
353
|
type: String
|
|
@@ -372,10 +372,10 @@ module Bolt
|
|
|
372
372
|
},
|
|
373
373
|
"sudo-executable" => {
|
|
374
374
|
type: String,
|
|
375
|
-
description: "The executable to use when escalating to the configured `run-as` user. This is useful "\
|
|
376
|
-
"when you want to escalate using the configured `sudo-password`, since `run-as-command` "\
|
|
377
|
-
"does not use `sudo-password` or support prompting. The command executed on the target "\
|
|
378
|
-
"is `<sudo-executable> -S -u <user> -p custom_bolt_prompt <command>`. **This option is "\
|
|
375
|
+
description: "The executable to use when escalating to the configured `run-as` user. This is useful " \
|
|
376
|
+
"when you want to escalate using the configured `sudo-password`, since `run-as-command` " \
|
|
377
|
+
"does not use `sudo-password` or support prompting. The command executed on the target " \
|
|
378
|
+
"is `<sudo-executable> -S -u <user> -p custom_bolt_prompt <command>`. **This option is " \
|
|
379
379
|
"experimental.**",
|
|
380
380
|
_plugin: true,
|
|
381
381
|
_example: "dzdo"
|