bolt 2.37.0 → 2.44.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 +17 -17
- data/bolt-modules/boltlib/lib/puppet/functions/parallelize.rb +6 -8
- data/lib/bolt/analytics.rb +3 -2
- data/lib/bolt/applicator.rb +11 -1
- data/lib/bolt/bolt_option_parser.rb +20 -13
- data/lib/bolt/catalog.rb +10 -29
- data/lib/bolt/cli.rb +58 -40
- data/lib/bolt/config.rb +134 -119
- data/lib/bolt/config/options.rb +142 -77
- data/lib/bolt/config/transport/base.rb +2 -2
- data/lib/bolt/config/transport/local.rb +1 -0
- data/lib/bolt/config/transport/options.rb +18 -68
- data/lib/bolt/config/transport/orch.rb +1 -0
- data/lib/bolt/config/transport/ssh.rb +0 -5
- data/lib/bolt/executor.rb +15 -5
- data/lib/bolt/inventory.rb +26 -0
- data/lib/bolt/inventory/group.rb +35 -12
- data/lib/bolt/inventory/inventory.rb +1 -1
- data/lib/bolt/inventory/options.rb +130 -0
- data/lib/bolt/inventory/target.rb +10 -11
- data/lib/bolt/logger.rb +114 -10
- data/lib/bolt/module.rb +10 -2
- data/lib/bolt/module_installer.rb +25 -15
- data/lib/bolt/module_installer/resolver.rb +65 -12
- data/lib/bolt/module_installer/specs/forge_spec.rb +8 -2
- data/lib/bolt/module_installer/specs/git_spec.rb +17 -2
- data/lib/bolt/outputter.rb +19 -5
- data/lib/bolt/outputter/human.rb +24 -1
- data/lib/bolt/outputter/json.rb +1 -1
- data/lib/bolt/outputter/logger.rb +1 -1
- data/lib/bolt/outputter/rainbow.rb +12 -1
- data/lib/bolt/pal.rb +93 -14
- data/lib/bolt/pal/yaml_plan.rb +8 -2
- data/lib/bolt/pal/yaml_plan/evaluator.rb +2 -2
- data/lib/bolt/pal/yaml_plan/transpiler.rb +6 -1
- data/lib/bolt/plugin.rb +3 -3
- data/lib/bolt/plugin/cache.rb +8 -8
- data/lib/bolt/plugin/module.rb +1 -1
- data/lib/bolt/plugin/puppet_connect_data.rb +35 -0
- data/lib/bolt/plugin/puppetdb.rb +2 -2
- data/lib/bolt/project.rb +76 -50
- data/lib/bolt/project_manager.rb +2 -0
- data/lib/bolt/project_manager/config_migrator.rb +9 -1
- data/lib/bolt/project_manager/module_migrator.rb +2 -0
- data/lib/bolt/puppetdb/client.rb +8 -0
- data/lib/bolt/rerun.rb +1 -1
- data/lib/bolt/shell/bash.rb +1 -1
- data/lib/bolt/shell/bash/tmpdir.rb +4 -1
- data/lib/bolt/shell/powershell.rb +7 -5
- data/lib/bolt/target.rb +4 -0
- data/lib/bolt/task.rb +1 -1
- data/lib/bolt/transport/docker/connection.rb +2 -2
- data/lib/bolt/transport/local.rb +13 -0
- data/lib/bolt/transport/orch/connection.rb +1 -1
- data/lib/bolt/transport/ssh.rb +1 -2
- data/lib/bolt/transport/ssh/connection.rb +1 -1
- data/lib/bolt/validator.rb +227 -0
- data/lib/bolt/version.rb +1 -1
- data/lib/bolt_server/config.rb +1 -1
- data/lib/bolt_server/schemas/partials/task.json +1 -1
- data/lib/bolt_server/transport_app.rb +28 -27
- data/libexec/bolt_catalog +1 -1
- metadata +27 -11
- data/lib/bolt/config/validator.rb +0 -231
data/lib/bolt/config/options.rb
CHANGED
@@ -50,81 +50,40 @@ module Bolt
|
|
50
50
|
}
|
51
51
|
}.freeze
|
52
52
|
|
53
|
-
#
|
54
|
-
#
|
55
|
-
# option's definition. These options are used in multiple locations:
|
56
|
-
#
|
57
|
-
# - Automatic type validation when loading and setting configuration
|
58
|
-
# - Generating reference documentation for configuration files
|
59
|
-
# - Generating JSON schemas for configuration files
|
60
|
-
#
|
61
|
-
# Data includes keys defined by JSON Schema Draft 07 as well as some metadata used
|
62
|
-
# by Bolt to generate documentation. The following keys are used:
|
63
|
-
#
|
64
|
-
# :description String A detailed description of the option and what it does. This
|
65
|
-
# field is used in both documentation and the JSON schemas,
|
66
|
-
# and should provide as much detail as possible, including
|
67
|
-
# links to relevant documentation.
|
68
|
-
#
|
69
|
-
# :type Class The expected type of a value. These should be Ruby classes,
|
70
|
-
# as this field is used to perform automatic type validation.
|
71
|
-
# If an option can accept more than one type, this should be
|
72
|
-
# an array of types. Boolean values should set :type to
|
73
|
-
# [TrueClass, FalseClass], as Ruby does not have a single
|
74
|
-
# Boolean class.
|
75
|
-
#
|
76
|
-
# :items Hash A definition hash for items in an array. Similar to values
|
77
|
-
# for top-level options, items can have a :description, :type,
|
78
|
-
# or any other key in this list.
|
79
|
-
#
|
80
|
-
# :uniqueItems Boolean Whether or not an array should contain only unique items.
|
81
|
-
#
|
82
|
-
# :properties Hash A hash where keys are sub-options and values are definitions
|
83
|
-
# for the sub-option. Similar to values for top-level options,
|
84
|
-
# properties can have a :description, :type, or any other key
|
85
|
-
# in this list.
|
86
|
-
#
|
87
|
-
# :additionalProperties A variation of the :properties key, where the hash is a
|
88
|
-
# Hash definition for any properties not specified in :properties.
|
89
|
-
# This can be used to permit arbitrary sub-options, such as
|
90
|
-
# logs for the 'log' option.
|
91
|
-
#
|
92
|
-
# :required Array An array of properties that are required for options that
|
93
|
-
# accept Hash values.
|
94
|
-
#
|
95
|
-
# :minimum Integer The minimum integer value for an option.
|
96
|
-
#
|
97
|
-
# :enum Array An array of values that the option recognizes.
|
98
|
-
#
|
99
|
-
# :pattern String A JSON regex pattern that the option's vaue should match.
|
100
|
-
#
|
101
|
-
# :format String Requires that a string value matches a format defined by the
|
102
|
-
# JSON Schema draft.
|
103
|
-
#
|
104
|
-
# :_plugin Boolean Whether the option accepts a plugin reference. This is used
|
105
|
-
# when generating the JSON schemas to determine whether or not
|
106
|
-
# to include a reference to the _plugin definition. If :_plugin
|
107
|
-
# is set to true, the script that generates JSON schemas will
|
108
|
-
# automatically recurse through the :items and :properties keys
|
109
|
-
# and add plugin references if applicable.
|
110
|
-
#
|
111
|
-
# :_example Any An example value for the option. This is used to generate
|
112
|
-
# reference documentation for configuration files.
|
113
|
-
#
|
114
|
-
# :_default Any The documented default value for the option. This is only
|
115
|
-
# used to generate reference documentation for configuration
|
116
|
-
# files and is not used by Bolt to actually set default values.
|
53
|
+
# Definitions used to validate config options.
|
54
|
+
# https://github.com/puppetlabs/bolt/blob/main/schemas/README.md
|
117
55
|
OPTIONS = {
|
118
56
|
"apply_settings" => {
|
119
57
|
description: "A map of Puppet settings to use when applying Puppet code using the `apply` "\
|
120
58
|
"plan function or the `bolt apply` command.",
|
121
59
|
type: Hash,
|
122
60
|
properties: {
|
61
|
+
"evaltrace" => {
|
62
|
+
description: "Whether each resource should log when it is being evaluated.",
|
63
|
+
type: [TrueClass, FalseClass],
|
64
|
+
_example: true,
|
65
|
+
_default: false
|
66
|
+
},
|
67
|
+
"log_level" => {
|
68
|
+
description: "The log level for logs in apply reports from Puppet. These can be seen "\
|
69
|
+
"in ApplyResults.",
|
70
|
+
type: String,
|
71
|
+
enum: %w[debug info notice warning err alert emerg crit],
|
72
|
+
_example: "debug",
|
73
|
+
_default: "notice"
|
74
|
+
},
|
123
75
|
"show_diff" => {
|
124
76
|
description: "Whether to log and report a contextual diff.",
|
125
77
|
type: [TrueClass, FalseClass],
|
126
78
|
_example: true,
|
127
79
|
_default: false
|
80
|
+
},
|
81
|
+
"trace" => {
|
82
|
+
description: "Whether to print stack traces on some errors. Will print internal Ruby "\
|
83
|
+
"stack trace interleaved with Puppet function frames.",
|
84
|
+
type: [TrueClass, FalseClass],
|
85
|
+
_example: true,
|
86
|
+
_default: false
|
128
87
|
}
|
129
88
|
},
|
130
89
|
_plugin: false,
|
@@ -135,11 +94,33 @@ module Bolt
|
|
135
94
|
"plan function or the `bolt apply` command.",
|
136
95
|
type: Hash,
|
137
96
|
properties: {
|
97
|
+
"evaltrace" => {
|
98
|
+
description: "Whether each resource should log when it is being evaluated. This allows "\
|
99
|
+
"you to interactively see exactly what is being done.",
|
100
|
+
type: [TrueClass, FalseClass],
|
101
|
+
_example: true,
|
102
|
+
_default: false
|
103
|
+
},
|
104
|
+
"log_level" => {
|
105
|
+
description: "The log level for logs in apply reports from Puppet. These can be seen "\
|
106
|
+
"in ApplyResults.",
|
107
|
+
type: String,
|
108
|
+
enum: %w[debug info notice warning err alert emerg crit],
|
109
|
+
_example: "debug",
|
110
|
+
_default: "notice"
|
111
|
+
},
|
138
112
|
"show_diff" => {
|
139
113
|
description: "Whether to log and report a contextual diff.",
|
140
114
|
type: [TrueClass, FalseClass],
|
141
115
|
_example: true,
|
142
116
|
_default: false
|
117
|
+
},
|
118
|
+
"trace" => {
|
119
|
+
description: "Whether to print stack traces on some errors. Will print internal Ruby "\
|
120
|
+
"stack trace interleaved with Puppet function frames.",
|
121
|
+
type: [TrueClass, FalseClass],
|
122
|
+
_example: true,
|
123
|
+
_default: false
|
143
124
|
}
|
144
125
|
},
|
145
126
|
_plugin: false
|
@@ -167,6 +148,17 @@ module Bolt
|
|
167
148
|
_example: 50,
|
168
149
|
_default: "100 or 1/7 the ulimit, whichever is lower."
|
169
150
|
},
|
151
|
+
"disable-warnings" => {
|
152
|
+
description: "An array of IDs of warnings to suppress. Warnings with a matching ID will not be logged "\
|
153
|
+
"by Bolt. If you are upgrading Bolt to a new major version, you should re-enable all warnings "\
|
154
|
+
"until you have finished upgrading.",
|
155
|
+
type: Array,
|
156
|
+
items: {
|
157
|
+
type: String
|
158
|
+
},
|
159
|
+
_plugin: false,
|
160
|
+
_example: ["powershell_2"]
|
161
|
+
},
|
170
162
|
"format" => {
|
171
163
|
description: "The format to use when printing results.",
|
172
164
|
type: String,
|
@@ -272,6 +264,41 @@ module Bolt
|
|
272
264
|
_example: ["~/.puppetlabs/bolt/modules", "~/.puppetlabs/bolt/site-modules"],
|
273
265
|
_default: ["project/modules", "project/site-modules", "project/site"]
|
274
266
|
},
|
267
|
+
"module-install" => {
|
268
|
+
description: "Options that configure where Bolt downloads modules from. This option is only used when "\
|
269
|
+
"installing modules using the `bolt module add|install` commands and "\
|
270
|
+
"`Add|Install-BoltModule` cmdlets.",
|
271
|
+
type: Hash,
|
272
|
+
properties: {
|
273
|
+
"forge" => {
|
274
|
+
description: "A subsection that can have its own `proxy` setting to set an HTTP proxy for Forge "\
|
275
|
+
"operations only, and a `baseurl` setting to specify a different Forge host.",
|
276
|
+
type: Hash,
|
277
|
+
properties: {
|
278
|
+
"baseurl" => {
|
279
|
+
description: "The URL to the Forge host.",
|
280
|
+
type: String,
|
281
|
+
format: "uri",
|
282
|
+
_example: "https://forge.example.com"
|
283
|
+
},
|
284
|
+
"proxy" => {
|
285
|
+
description: "The HTTP proxy to use for Forge operations.",
|
286
|
+
type: String,
|
287
|
+
format: "uri",
|
288
|
+
_example: "https://my-forge-proxy.com:8080"
|
289
|
+
}
|
290
|
+
},
|
291
|
+
_example: { "baseurl" => "https://forge.example.com", "proxy" => "https://my-forge-proxy.com:8080" }
|
292
|
+
},
|
293
|
+
"proxy" => {
|
294
|
+
description: "The HTTP proxy to use for Git and Forge operations.",
|
295
|
+
type: String,
|
296
|
+
format: "uri",
|
297
|
+
_example: "https://my-proxy.com:8080"
|
298
|
+
}
|
299
|
+
},
|
300
|
+
_plugin: false
|
301
|
+
},
|
275
302
|
"modules" => {
|
276
303
|
description: "A list of module dependencies for the project. Each dependency is a map of data specifying "\
|
277
304
|
"the module to install. To install the project's module dependencies, run the `bolt module "\
|
@@ -287,6 +314,10 @@ module Bolt
|
|
287
314
|
description: "The name of the module.",
|
288
315
|
type: String
|
289
316
|
},
|
317
|
+
"resolve" => {
|
318
|
+
description: "Whether to resolve the module's dependencies when installing modules.",
|
319
|
+
type: [TrueClass, FalseClass]
|
320
|
+
},
|
290
321
|
"version_requirement" => {
|
291
322
|
description: "The version requirement for the module. Accepts a specific version (1.2.3), version "\
|
292
323
|
"shorthand (1.2.x), or a version range (>= 1.2.0).",
|
@@ -301,9 +332,17 @@ module Bolt
|
|
301
332
|
description: "The URL to the public git repository.",
|
302
333
|
type: String
|
303
334
|
},
|
335
|
+
"name" => {
|
336
|
+
description: "The name of the module. Required when `resolve` is `false`.",
|
337
|
+
type: String
|
338
|
+
},
|
304
339
|
"ref" => {
|
305
340
|
description: "The git reference to check out. Can be either a branch, tag, or commit SHA.",
|
306
341
|
type: String
|
342
|
+
},
|
343
|
+
"resolve" => {
|
344
|
+
description: "Whether to resolve the module's dependencies when installing modules.",
|
345
|
+
type: [TrueClass, FalseClass]
|
307
346
|
}
|
308
347
|
}
|
309
348
|
}
|
@@ -377,49 +416,57 @@ module Bolt
|
|
377
416
|
"cacert" => {
|
378
417
|
description: "The path to the ca certificate for PuppetDB.",
|
379
418
|
type: String,
|
380
|
-
_example: "/etc/puppetlabs/puppet/ssl/certs/ca.pem"
|
419
|
+
_example: "/etc/puppetlabs/puppet/ssl/certs/ca.pem",
|
420
|
+
_plugin: true
|
381
421
|
},
|
382
422
|
"cert" => {
|
383
423
|
description: "The path to the client certificate file to use for authentication.",
|
384
424
|
type: String,
|
385
|
-
_example: "/etc/puppetlabs/puppet/ssl/certs/my-host.example.com.pem"
|
425
|
+
_example: "/etc/puppetlabs/puppet/ssl/certs/my-host.example.com.pem",
|
426
|
+
_plugin: true
|
386
427
|
},
|
387
428
|
"connect_timeout" => {
|
388
429
|
description: "How long to wait in seconds when establishing connections with PuppetDB.",
|
389
430
|
type: Integer,
|
390
431
|
minimum: 1,
|
391
432
|
_default: 60,
|
392
|
-
_example: 120
|
433
|
+
_example: 120,
|
434
|
+
_plugin: true
|
393
435
|
},
|
394
436
|
"key" => {
|
395
437
|
description: "The private key for the certificate.",
|
396
438
|
type: String,
|
397
|
-
_example: "/etc/puppetlabs/puppet/ssl/private_keys/my-host.example.com.pem"
|
439
|
+
_example: "/etc/puppetlabs/puppet/ssl/private_keys/my-host.example.com.pem",
|
440
|
+
_plugin: true
|
398
441
|
},
|
399
442
|
"read_timeout" => {
|
400
443
|
description: "How long to wait in seconds for a response from PuppetDB.",
|
401
444
|
type: Integer,
|
402
445
|
minimum: 1,
|
403
446
|
_default: 60,
|
404
|
-
_example: 120
|
447
|
+
_example: 120,
|
448
|
+
_plugin: true
|
405
449
|
},
|
406
450
|
"server_urls" => {
|
407
451
|
description: "An array containing the PuppetDB host to connect to. Include the protocol `https` "\
|
408
452
|
"and the port, which is usually `8081`. For example, "\
|
409
453
|
"`https://my-puppetdb-server.com:8081`.",
|
410
454
|
type: Array,
|
411
|
-
_example: ["https://puppet.example.com:8081"]
|
455
|
+
_example: ["https://puppet.example.com:8081"],
|
456
|
+
_plugin: true
|
412
457
|
},
|
413
458
|
"token" => {
|
414
459
|
description: "The path to the PE RBAC Token.",
|
415
460
|
type: String,
|
416
|
-
_example: "~/.puppetlabs/token"
|
461
|
+
_example: "~/.puppetlabs/token",
|
462
|
+
_plugin: true
|
417
463
|
}
|
418
464
|
},
|
419
465
|
_plugin: true
|
420
466
|
},
|
421
467
|
"puppetfile" => {
|
422
|
-
description: "A map containing options for the `bolt puppetfile install` command
|
468
|
+
description: "A map containing options for the `bolt puppetfile install` command and "\
|
469
|
+
"`Install-BoltPuppetfile` cmdlet.",
|
423
470
|
type: Hash,
|
424
471
|
properties: {
|
425
472
|
"forge" => {
|
@@ -434,21 +481,23 @@ module Bolt
|
|
434
481
|
_example: "https://forge.example.com"
|
435
482
|
},
|
436
483
|
"proxy" => {
|
437
|
-
description: "The HTTP proxy to use for
|
484
|
+
description: "The HTTP proxy to use for Forge operations.",
|
438
485
|
type: String,
|
439
486
|
format: "uri",
|
440
|
-
_example: "https://
|
487
|
+
_example: "https://my-forge-proxy.com:8080"
|
441
488
|
}
|
442
489
|
},
|
443
|
-
_example: { "baseurl" => "https://forge.example.com", "proxy" => "https://
|
490
|
+
_example: { "baseurl" => "https://forge.example.com", "proxy" => "https://my-forge-proxy.com:8080" }
|
444
491
|
},
|
445
492
|
"proxy" => {
|
446
493
|
description: "The HTTP proxy to use for Git and Forge operations.",
|
447
494
|
type: String,
|
448
495
|
format: "uri",
|
449
|
-
_example: "https://
|
496
|
+
_example: "https://my-proxy.com:8080"
|
450
497
|
}
|
451
498
|
},
|
499
|
+
_deprecation: "This option will be removed in Bolt 3.0. Update your project to use the module "\
|
500
|
+
"management feature. For more information, see https://pup.pt/bolt-module-migrate.",
|
452
501
|
_plugin: false
|
453
502
|
},
|
454
503
|
"save-rerun" => {
|
@@ -460,6 +509,14 @@ module Bolt
|
|
460
509
|
_example: false,
|
461
510
|
_default: true
|
462
511
|
},
|
512
|
+
"spinner" => {
|
513
|
+
description: "Whether to print a spinner to the console for long-running Bolt operations.",
|
514
|
+
type: [TrueClass, FalseClass],
|
515
|
+
_plugin: false,
|
516
|
+
_example: false,
|
517
|
+
_default: true
|
518
|
+
},
|
519
|
+
|
463
520
|
"tasks" => {
|
464
521
|
description: "A list of task names and glob patterns to filter the project's tasks by. This option is used "\
|
465
522
|
"to limit the visibility of tasks for users of the project. For example, project authors "\
|
@@ -494,7 +551,7 @@ module Bolt
|
|
494
551
|
"specified in the URI.",
|
495
552
|
type: String,
|
496
553
|
enum: TRANSPORT_CONFIG.keys,
|
497
|
-
_plugin:
|
554
|
+
_plugin: true,
|
498
555
|
_example: "winrm",
|
499
556
|
_default: "ssh"
|
500
557
|
},
|
@@ -520,6 +577,7 @@ module Bolt
|
|
520
577
|
"remote" => {
|
521
578
|
description: "A map of configuration options for the remote transport.",
|
522
579
|
type: Hash,
|
580
|
+
additionalProperties: true,
|
523
581
|
_plugin: true,
|
524
582
|
_example: { "run-on" => "proxy_target" }
|
525
583
|
},
|
@@ -555,6 +613,7 @@ module Bolt
|
|
555
613
|
puppetdb
|
556
614
|
puppetfile
|
557
615
|
save-rerun
|
616
|
+
spinner
|
558
617
|
trusted-external-command
|
559
618
|
].freeze
|
560
619
|
|
@@ -563,9 +622,11 @@ module Bolt
|
|
563
622
|
color
|
564
623
|
compile-concurrency
|
565
624
|
concurrency
|
625
|
+
disable-warnings
|
566
626
|
format
|
567
627
|
inventory-config
|
568
628
|
log
|
629
|
+
module-install
|
569
630
|
plugin-cache
|
570
631
|
plugin-hooks
|
571
632
|
plugin_hooks
|
@@ -573,6 +634,7 @@ module Bolt
|
|
573
634
|
puppetdb
|
574
635
|
puppetfile
|
575
636
|
save-rerun
|
637
|
+
spinner
|
576
638
|
].freeze
|
577
639
|
|
578
640
|
# Options that are available in a bolt-project.yaml file
|
@@ -582,11 +644,13 @@ module Bolt
|
|
582
644
|
color
|
583
645
|
compile-concurrency
|
584
646
|
concurrency
|
647
|
+
disable-warnings
|
585
648
|
format
|
586
649
|
hiera-config
|
587
650
|
inventoryfile
|
588
651
|
log
|
589
652
|
modulepath
|
653
|
+
module-install
|
590
654
|
modules
|
591
655
|
name
|
592
656
|
plans
|
@@ -597,6 +661,7 @@ module Bolt
|
|
597
661
|
puppetdb
|
598
662
|
puppetfile
|
599
663
|
save-rerun
|
664
|
+
spinner
|
600
665
|
tasks
|
601
666
|
trusted-external-command
|
602
667
|
].freeze
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
require 'bolt/error'
|
4
4
|
require 'bolt/util'
|
5
|
-
require 'bolt/
|
5
|
+
require 'bolt/validator'
|
6
6
|
require 'bolt/config/transport/options'
|
7
7
|
|
8
8
|
module Bolt
|
@@ -125,7 +125,7 @@ module Bolt
|
|
125
125
|
|
126
126
|
# Validation defaults to just asserting the option types
|
127
127
|
private def validate
|
128
|
-
Bolt::
|
128
|
+
Bolt::Validator.new.validate(@config.compact, self.class.schema)
|
129
129
|
end
|
130
130
|
end
|
131
131
|
end
|
@@ -6,73 +6,8 @@ module Bolt
|
|
6
6
|
module Options
|
7
7
|
LOGIN_SHELLS = %w[sh bash zsh dash ksh powershell].freeze
|
8
8
|
|
9
|
-
#
|
10
|
-
#
|
11
|
-
# are the option's definition. These options are used in multiple locations:
|
12
|
-
#
|
13
|
-
# - Automatic type validation when loading and setting configuration
|
14
|
-
# - Generating reference documentation for configuration files
|
15
|
-
# - Generating JSON schemas for configuration files
|
16
|
-
#
|
17
|
-
# Data includes keys defined by JSON Schema Draft 07 as well as some metadata used
|
18
|
-
# by Bolt to generate documentation. The following keys are used:
|
19
|
-
#
|
20
|
-
# :description String A detailed description of the option and what it does. This
|
21
|
-
# field is used in both documentation and the JSON schemas,
|
22
|
-
# and should provide as much detail as possible, including
|
23
|
-
# links to relevant documentation.
|
24
|
-
#
|
25
|
-
# :type Class The expected type of a value. These should be Ruby classes,
|
26
|
-
# as this field is used to perform automatic type validation.
|
27
|
-
# If an option can accept more than one type, this should be
|
28
|
-
# an array of types. Boolean values should set :type to
|
29
|
-
# [TrueClass, FalseClass], as Ruby does not have a single
|
30
|
-
# Boolean class.
|
31
|
-
#
|
32
|
-
# :items Hash A definition hash for items in an array. Similar to values
|
33
|
-
# for top-level options, items can have a :description, :type,
|
34
|
-
# or any other key in this list.
|
35
|
-
#
|
36
|
-
# :uniqueItems Boolean Whether or not an array should contain only unique items.
|
37
|
-
#
|
38
|
-
# :properties Hash A hash where keys are sub-options and values are definitions
|
39
|
-
# for the sub-option. Similar to values for top-level options,
|
40
|
-
# properties can have a :description, :type, or any other key
|
41
|
-
# in this list.
|
42
|
-
#
|
43
|
-
# :additionalProperties A variation of the :properties key, where the hash is a
|
44
|
-
# Hash definition for any properties not specified in :properties.
|
45
|
-
# This can be used to permit arbitrary sub-options, such as
|
46
|
-
# logs for the 'log' option.
|
47
|
-
#
|
48
|
-
# :propertyNames Hash A hash that defines the properties that an option's property
|
49
|
-
# names must adhere to.
|
50
|
-
#
|
51
|
-
# :required Array An array of properties that are required for options that
|
52
|
-
# accept Hash values.
|
53
|
-
#
|
54
|
-
# :minimum Integer The minimum integer value for an option.
|
55
|
-
#
|
56
|
-
# :enum Array An array of values that the option recognizes.
|
57
|
-
#
|
58
|
-
# :pattern String A JSON regex pattern that the option's vaue should match.
|
59
|
-
#
|
60
|
-
# :format String Requires that a string value matches a format defined by the
|
61
|
-
# JSON Schema draft.
|
62
|
-
#
|
63
|
-
# :_plugin Boolean Whether the option accepts a plugin reference. This is used
|
64
|
-
# when generating the JSON schemas to determine whether or not
|
65
|
-
# to include a reference to the _plugin definition. If :_plugin
|
66
|
-
# is set to true, the script that generates JSON schemas will
|
67
|
-
# automatically recurse through the :items and :properties keys
|
68
|
-
# and add plugin references if applicable.
|
69
|
-
#
|
70
|
-
# :_example Any An example value for the option. This is used to generate
|
71
|
-
# reference documentation for configuration files.
|
72
|
-
#
|
73
|
-
# :_default Any The documented default value for the option. This is only
|
74
|
-
# used to generate reference documentation for configuration
|
75
|
-
# files and is not used by Bolt to actually set default values.
|
9
|
+
# Definitions used to validate config options.
|
10
|
+
# https://github.com/puppetlabs/bolt/blob/main/schemas/README.md
|
76
11
|
TRANSPORT_OPTIONS = {
|
77
12
|
"basic-auth-only" => {
|
78
13
|
type: [TrueClass, FalseClass],
|
@@ -81,6 +16,13 @@ module Bolt
|
|
81
16
|
_default: false,
|
82
17
|
_example: true
|
83
18
|
},
|
19
|
+
"bundled-ruby" => {
|
20
|
+
description: "Whether to use the Ruby bundled with Bolt packages for local targets.",
|
21
|
+
type: [TrueClass, FalseClass],
|
22
|
+
_plugin: false,
|
23
|
+
_example: true,
|
24
|
+
_default: false
|
25
|
+
},
|
84
26
|
"cacert" => {
|
85
27
|
type: String,
|
86
28
|
description: "The path to the CA certificate.",
|
@@ -201,7 +143,8 @@ module Bolt
|
|
201
143
|
"`task.py`) and the extension is case sensitive. When a target's name is `localhost`, "\
|
202
144
|
"Ruby tasks run with the Bolt Ruby interpreter by default.",
|
203
145
|
additionalProperties: {
|
204
|
-
type: String
|
146
|
+
type: String,
|
147
|
+
_plugin: false
|
205
148
|
},
|
206
149
|
propertyNames: {
|
207
150
|
pattern: "^.?[a-zA-Z0-9]+$"
|
@@ -310,6 +253,13 @@ module Bolt
|
|
310
253
|
_plugin: true,
|
311
254
|
_example: "jump.example.com"
|
312
255
|
},
|
256
|
+
"read-timeout" => {
|
257
|
+
type: Integer,
|
258
|
+
description: "How long to wait in seconds when making requests to the Orchestrator.",
|
259
|
+
minimum: 1,
|
260
|
+
_plugin: true,
|
261
|
+
_example: 15
|
262
|
+
},
|
313
263
|
"realm" => {
|
314
264
|
type: String,
|
315
265
|
description: "The Kerberos realm (Active Directory domain) to authenticate against.",
|