bolt 2.37.0 → 2.38.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 +1 -1
- data/lib/bolt/cli.rb +60 -23
- data/lib/bolt/config.rb +60 -18
- data/lib/bolt/config/options.rb +71 -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 +9 -67
- data/lib/bolt/inventory.rb +25 -0
- data/lib/bolt/inventory/options.rb +130 -0
- data/lib/bolt/inventory/target.rb +10 -11
- data/lib/bolt/module_installer.rb +21 -13
- data/lib/bolt/module_installer/resolver.rb +1 -1
- data/lib/bolt/outputter.rb +19 -5
- data/lib/bolt/outputter/human.rb +20 -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/plugin/puppetdb.rb +1 -1
- data/lib/bolt/project.rb +20 -7
- 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/shell/powershell.rb +5 -3
- data/lib/bolt/target.rb +4 -0
- data/lib/bolt/transport/local.rb +13 -0
- data/lib/bolt/validator.rb +226 -0
- data/lib/bolt/version.rb +1 -1
- data/lib/bolt_server/transport_app.rb +26 -26
- metadata +10 -3
- data/lib/bolt/config/validator.rb +0 -231
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 33e89c3fc601a61c1da47fe1f0c7773d54643738e959c297f34e5fe4096ef2b5
|
4
|
+
data.tar.gz: 0edc4e35b500bb08315ef5d6064563d7dad0cbaecd88d3aac03dc4cf43572b33
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2d3a5675a1560203dc0236cdd7b5a9367728b6b1decdfc85a99136488ab2ed1a10bc492996b2aa5b2681fdba8f2029f9e092a3011d8be4d5bfb2395358ffb6a
|
7
|
+
data.tar.gz: 79b4418d6628573320b1db7740d8196ddb73f55d93f299a68a3c5f436c5986fc9382e48bd5d2e14903d18e3bf648b47493041a9ad0196983e1fb7a06ff9cf4bd
|
data/Puppetfile
CHANGED
@@ -34,7 +34,7 @@ mod 'puppetlabs-stdlib', '6.5.0'
|
|
34
34
|
mod 'puppetlabs-aws_inventory', '0.5.2'
|
35
35
|
mod 'puppetlabs-azure_inventory', '0.4.1'
|
36
36
|
mod 'puppetlabs-gcloud_inventory', '0.1.3'
|
37
|
-
mod 'puppetlabs-http_request', '0.2.
|
37
|
+
mod 'puppetlabs-http_request', '0.2.1'
|
38
38
|
mod 'puppetlabs-pkcs7', '0.1.1'
|
39
39
|
mod 'puppetlabs-secure_env_vars', '0.1.0'
|
40
40
|
mod 'puppetlabs-terraform', '0.5.0'
|
data/lib/bolt/cli.rb
CHANGED
@@ -491,9 +491,9 @@ module Bolt
|
|
491
491
|
when 'module'
|
492
492
|
case options[:action]
|
493
493
|
when 'add'
|
494
|
-
code = add_project_module(options[:object], config.project)
|
494
|
+
code = add_project_module(options[:object], config.project, config.module_install)
|
495
495
|
when 'install'
|
496
|
-
code = install_project_modules(config.project, options[:force], options[:resolve])
|
496
|
+
code = install_project_modules(config.project, config.module_install, options[:force], options[:resolve])
|
497
497
|
when 'generate-types'
|
498
498
|
code = generate_types
|
499
499
|
end
|
@@ -538,12 +538,15 @@ module Bolt
|
|
538
538
|
validate_file('script', script)
|
539
539
|
executor.run_script(targets, script, options[:leftovers], executor_opts)
|
540
540
|
when 'task'
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
541
|
+
r = outputter.spin do
|
542
|
+
pal.run_task(options[:object],
|
543
|
+
targets,
|
544
|
+
options[:task_options],
|
545
|
+
executor,
|
546
|
+
inventory,
|
547
|
+
options[:description])
|
548
|
+
end
|
549
|
+
r
|
547
550
|
when 'file'
|
548
551
|
src = options[:object]
|
549
552
|
dest = options[:leftovers].first
|
@@ -678,7 +681,9 @@ module Bolt
|
|
678
681
|
|
679
682
|
executor.subscribe(log_outputter)
|
680
683
|
executor.start_plan(plan_context)
|
681
|
-
result =
|
684
|
+
result = outputter.spin do
|
685
|
+
pal.run_plan(plan_name, plan_arguments, executor, inventory, puppetdb_client)
|
686
|
+
end
|
682
687
|
|
683
688
|
# If a non-bolt exception bubbles up the plan won't get finished
|
684
689
|
executor.finish_plan(result)
|
@@ -743,7 +748,7 @@ module Bolt
|
|
743
748
|
|
744
749
|
# Installs modules declared in the project configuration file.
|
745
750
|
#
|
746
|
-
def install_project_modules(project, force, resolve)
|
751
|
+
def install_project_modules(project, config, force, resolve)
|
747
752
|
assert_project_file(project)
|
748
753
|
assert_puppetfile_or_module_command(project.modules)
|
749
754
|
|
@@ -753,30 +758,55 @@ module Bolt
|
|
753
758
|
return 0
|
754
759
|
end
|
755
760
|
|
761
|
+
if resolve != false && config.any?
|
762
|
+
@logger.warn(
|
763
|
+
"Detected configuration for 'module-install'. This configuration is currently "\
|
764
|
+
"only supported when installing modules, not when resolving module dependencies. "\
|
765
|
+
"For more information, see https://pup.pt/bolt-module-install"
|
766
|
+
)
|
767
|
+
end
|
768
|
+
|
769
|
+
modules = project.modules || []
|
756
770
|
installer = Bolt::ModuleInstaller.new(outputter, pal)
|
757
771
|
|
758
|
-
ok =
|
759
|
-
|
760
|
-
|
761
|
-
|
762
|
-
|
772
|
+
ok = outputter.spin do
|
773
|
+
installer.install(modules,
|
774
|
+
project.puppetfile,
|
775
|
+
project.managed_moduledir,
|
776
|
+
config,
|
777
|
+
force: force,
|
778
|
+
resolve: resolve)
|
779
|
+
end
|
780
|
+
|
763
781
|
ok ? 0 : 1
|
764
782
|
end
|
765
783
|
|
766
784
|
# Adds a single module to the project.
|
767
785
|
#
|
768
|
-
def add_project_module(name, project)
|
786
|
+
def add_project_module(name, project, config)
|
769
787
|
assert_project_file(project)
|
770
788
|
assert_puppetfile_or_module_command(project.modules)
|
771
789
|
|
790
|
+
if config.any?
|
791
|
+
@logger.warn(
|
792
|
+
"Detected configuration for 'module-install'. This configuration is currently "\
|
793
|
+
"only supported when installing modules, not when resolving module dependencies. "\
|
794
|
+
"For more information, see https://pup.pt/bolt-module-install"
|
795
|
+
)
|
796
|
+
end
|
797
|
+
|
772
798
|
modules = project.modules || []
|
773
799
|
installer = Bolt::ModuleInstaller.new(outputter, pal)
|
774
800
|
|
775
|
-
ok =
|
776
|
-
|
777
|
-
|
778
|
-
|
779
|
-
|
801
|
+
ok = outputter.spin do
|
802
|
+
installer.add(name,
|
803
|
+
modules,
|
804
|
+
project.puppetfile,
|
805
|
+
project.managed_moduledir,
|
806
|
+
project.project_file,
|
807
|
+
config)
|
808
|
+
end
|
809
|
+
|
780
810
|
ok ? 0 : 1
|
781
811
|
end
|
782
812
|
|
@@ -805,7 +835,10 @@ module Bolt
|
|
805
835
|
|
806
836
|
outputter.print_message("Installing modules from Puppetfile")
|
807
837
|
installer = Bolt::ModuleInstaller.new(outputter, pal)
|
808
|
-
ok =
|
838
|
+
ok = outputter.spin do
|
839
|
+
installer.install_puppetfile(puppetfile, moduledir, puppetfile_config)
|
840
|
+
end
|
841
|
+
|
809
842
|
ok ? 0 : 1
|
810
843
|
end
|
811
844
|
|
@@ -911,7 +944,11 @@ module Bolt
|
|
911
944
|
end
|
912
945
|
|
913
946
|
def outputter
|
914
|
-
@outputter ||= Bolt::Outputter.for_format(config.format,
|
947
|
+
@outputter ||= Bolt::Outputter.for_format(config.format,
|
948
|
+
config.color,
|
949
|
+
options[:verbose],
|
950
|
+
config.trace,
|
951
|
+
config.spinner)
|
915
952
|
end
|
916
953
|
|
917
954
|
def log_outputter
|
data/lib/bolt/config.rb
CHANGED
@@ -7,7 +7,7 @@ require 'bolt/project'
|
|
7
7
|
require 'bolt/logger'
|
8
8
|
require 'bolt/util'
|
9
9
|
require 'bolt/config/options'
|
10
|
-
require 'bolt/
|
10
|
+
require 'bolt/validator'
|
11
11
|
|
12
12
|
module Bolt
|
13
13
|
class UnknownTransportError < Bolt::Error
|
@@ -43,7 +43,7 @@ module Bolt
|
|
43
43
|
|
44
44
|
# Validate the config against the schema. This will raise a single error
|
45
45
|
# with all validation errors.
|
46
|
-
Validator.new.tap do |validator|
|
46
|
+
Bolt::Validator.new.tap do |validator|
|
47
47
|
validator.validate(c, bolt_schema, project.config_file.to_s)
|
48
48
|
|
49
49
|
validator.warnings.each { |warning| logs << { warn: warning } }
|
@@ -56,7 +56,6 @@ module Bolt
|
|
56
56
|
logs << { debug: "Loaded configuration from #{project.config_file}" } if File.exist?(project.config_file)
|
57
57
|
c
|
58
58
|
end
|
59
|
-
|
60
59
|
data = load_defaults(project).push(
|
61
60
|
filepath: project.config_file,
|
62
61
|
data: conf,
|
@@ -79,7 +78,7 @@ module Bolt
|
|
79
78
|
|
80
79
|
# Validate the config against the schema. This will raise a single error
|
81
80
|
# with all validation errors.
|
82
|
-
Validator.new.tap do |validator|
|
81
|
+
Bolt::Validator.new.tap do |validator|
|
83
82
|
validator.validate(c, bolt_schema, project.config_file.to_s)
|
84
83
|
|
85
84
|
validator.warnings.each { |warning| logs << { warn: warning } }
|
@@ -103,22 +102,36 @@ module Bolt
|
|
103
102
|
new(project, data, overrides)
|
104
103
|
end
|
105
104
|
|
106
|
-
|
107
|
-
|
108
|
-
|
105
|
+
# Builds a hash of definitions for transport configuration.
|
106
|
+
#
|
107
|
+
def self.transport_definitions
|
108
|
+
INVENTORY_OPTIONS.each_with_object({}) do |(option, definition), acc|
|
109
109
|
acc[option] = TRANSPORT_CONFIG.key?(option) ? definition.merge(TRANSPORT_CONFIG[option].schema) : definition
|
110
110
|
end
|
111
|
+
end
|
111
112
|
|
112
|
-
|
113
|
-
|
113
|
+
# Builds the schema for bolt-defaults.yaml used by the validator.
|
114
|
+
#
|
115
|
+
def self.defaults_schema
|
116
|
+
schema = {
|
117
|
+
type: Hash,
|
118
|
+
properties: BOLT_DEFAULTS_OPTIONS.map { |opt| [opt, _ref: opt] }.to_h,
|
119
|
+
definitions: OPTIONS.merge(transport_definitions)
|
120
|
+
}
|
121
|
+
|
122
|
+
schema[:definitions]['inventory-config'][:properties] = transport_definitions
|
123
|
+
|
124
|
+
schema
|
114
125
|
end
|
115
126
|
|
127
|
+
# Builds the schema for bolt.yaml used by the validator.
|
128
|
+
#
|
116
129
|
def self.bolt_schema
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
130
|
+
{
|
131
|
+
type: Hash,
|
132
|
+
properties: (BOLT_OPTIONS + INVENTORY_OPTIONS.keys).map { |opt| [opt, _ref: opt] }.to_h,
|
133
|
+
definitions: OPTIONS.merge(transport_definitions)
|
134
|
+
}
|
122
135
|
end
|
123
136
|
|
124
137
|
def self.system_path
|
@@ -154,7 +167,7 @@ module Bolt
|
|
154
167
|
|
155
168
|
# Validate the config against the schema. This will raise a single error
|
156
169
|
# with all validation errors.
|
157
|
-
Validator.new.tap do |validator|
|
170
|
+
Bolt::Validator.new.tap do |validator|
|
158
171
|
validator.validate(data, defaults_schema, filepath)
|
159
172
|
|
160
173
|
validator.warnings.each { |warning| logs << { warn: warning } }
|
@@ -221,7 +234,7 @@ module Bolt
|
|
221
234
|
|
222
235
|
# Validate the config against the schema. This will raise a single error
|
223
236
|
# with all validation errors.
|
224
|
-
Validator.new.tap do |validator|
|
237
|
+
Bolt::Validator.new.tap do |validator|
|
225
238
|
validator.validate(data, bolt_schema, filepath)
|
226
239
|
|
227
240
|
validator.warnings.each { |warning| logs << { warn: warning } }
|
@@ -283,12 +296,14 @@ module Bolt
|
|
283
296
|
'concurrency' => default_concurrency,
|
284
297
|
'format' => 'human',
|
285
298
|
'log' => { 'console' => {} },
|
299
|
+
'module-install' => {},
|
286
300
|
'plugin-hooks' => {},
|
287
301
|
'plugin_hooks' => {},
|
288
302
|
'plugins' => {},
|
289
303
|
'puppetdb' => {},
|
290
304
|
'puppetfile' => {},
|
291
305
|
'save-rerun' => true,
|
306
|
+
'spinner' => true,
|
292
307
|
'transport' => 'ssh'
|
293
308
|
}
|
294
309
|
|
@@ -353,7 +368,7 @@ module Bolt
|
|
353
368
|
overrides['trace'] = opts['trace'] if opts.key?('trace')
|
354
369
|
|
355
370
|
# Validate the overrides
|
356
|
-
Validator.new.validate(overrides,
|
371
|
+
Bolt::Validator.new.validate(overrides, self.class.bolt_schema, 'command line')
|
357
372
|
|
358
373
|
overrides
|
359
374
|
end
|
@@ -408,7 +423,7 @@ module Bolt
|
|
408
423
|
end
|
409
424
|
|
410
425
|
# Filter hashes to only include valid options
|
411
|
-
%w[apply-settings apply_settings puppetfile].each do |opt|
|
426
|
+
%w[apply-settings apply_settings module-install puppetfile].each do |opt|
|
412
427
|
@data[opt] = @data[opt].slice(*OPTIONS.dig(opt, :properties).keys)
|
413
428
|
end
|
414
429
|
end
|
@@ -497,6 +512,25 @@ module Bolt
|
|
497
512
|
unless TRANSPORT_CONFIG.include?(transport)
|
498
513
|
raise UnknownTransportError, transport
|
499
514
|
end
|
515
|
+
|
516
|
+
# Warn the user how they should be using the 'puppetfile' or
|
517
|
+
# 'module-install' config options. We don't error here since these
|
518
|
+
# settings can be set at the user or system level.
|
519
|
+
if @project.modules && puppetfile_config.any? && module_install.empty?
|
520
|
+
command = Bolt::Util.powershell? ? 'Update-BoltProject' : 'bolt project migrate'
|
521
|
+
@logs << { warn: "Detected configuration for 'puppetfile'. This setting is not "\
|
522
|
+
"used when 'modules' is configured. Use 'module-install' instead. "\
|
523
|
+
"To automatically update your project configuration, run '#{command}'." }
|
524
|
+
elsif @project.modules.nil? && puppetfile_config.empty? && module_install.any?
|
525
|
+
@logs << { warn: "Detected configuration for 'module-install'. This setting is not "\
|
526
|
+
"used when 'modules' is not configured. Use 'puppetfile' instead." }
|
527
|
+
elsif @project.modules && puppetfile_config.any? && module_install.any?
|
528
|
+
@logs << { warn: "Detected configuration for 'puppetfile' and 'module-install'. Using "\
|
529
|
+
"configuration for 'module-install' because 'modules' is also configured." }
|
530
|
+
elsif @project.modules.nil? && puppetfile_config.any? && module_install.any?
|
531
|
+
@logs << { warn: "Detected configuration for 'puppetfile' and 'module-install'. Using "\
|
532
|
+
"configuration for 'puppetfile' because 'modules' is not configured." }
|
533
|
+
end
|
500
534
|
end
|
501
535
|
|
502
536
|
def default_inventoryfile
|
@@ -565,6 +599,10 @@ module Bolt
|
|
565
599
|
@data['save-rerun']
|
566
600
|
end
|
567
601
|
|
602
|
+
def spinner
|
603
|
+
@data['spinner']
|
604
|
+
end
|
605
|
+
|
568
606
|
def inventoryfile
|
569
607
|
@data['inventoryfile']
|
570
608
|
end
|
@@ -619,6 +657,10 @@ module Bolt
|
|
619
657
|
@data['transport']
|
620
658
|
end
|
621
659
|
|
660
|
+
def module_install
|
661
|
+
@project.module_install || @data['module-install']
|
662
|
+
end
|
663
|
+
|
622
664
|
# Check if there is a case-insensitive match to the path
|
623
665
|
def check_path_case(type, paths)
|
624
666
|
return if paths.nil?
|
data/lib/bolt/config/options.rb
CHANGED
@@ -50,70 +50,8 @@ 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` "\
|
@@ -272,6 +210,41 @@ module Bolt
|
|
272
210
|
_example: ["~/.puppetlabs/bolt/modules", "~/.puppetlabs/bolt/site-modules"],
|
273
211
|
_default: ["project/modules", "project/site-modules", "project/site"]
|
274
212
|
},
|
213
|
+
"module-install" => {
|
214
|
+
description: "Options that configure where Bolt downloads modules from. This option is only used when "\
|
215
|
+
"installing modules using the `bolt module add|install` commands and "\
|
216
|
+
"`Add|Install-BoltModule` cmdlets.",
|
217
|
+
type: Hash,
|
218
|
+
properties: {
|
219
|
+
"forge" => {
|
220
|
+
description: "A subsection that can have its own `proxy` setting to set an HTTP proxy for Forge "\
|
221
|
+
"operations only, and a `baseurl` setting to specify a different Forge host.",
|
222
|
+
type: Hash,
|
223
|
+
properties: {
|
224
|
+
"baseurl" => {
|
225
|
+
description: "The URL to the Forge host.",
|
226
|
+
type: String,
|
227
|
+
format: "uri",
|
228
|
+
_example: "https://forge.example.com"
|
229
|
+
},
|
230
|
+
"proxy" => {
|
231
|
+
description: "The HTTP proxy to use for Forge operations.",
|
232
|
+
type: String,
|
233
|
+
format: "uri",
|
234
|
+
_example: "https://my-forge-proxy.com:8080"
|
235
|
+
}
|
236
|
+
},
|
237
|
+
_example: { "baseurl" => "https://forge.example.com", "proxy" => "https://my-forge-proxy.com:8080" }
|
238
|
+
},
|
239
|
+
"proxy" => {
|
240
|
+
description: "The HTTP proxy to use for Git and Forge operations.",
|
241
|
+
type: String,
|
242
|
+
format: "uri",
|
243
|
+
_example: "https://my-proxy.com:8080"
|
244
|
+
}
|
245
|
+
},
|
246
|
+
_plugin: false
|
247
|
+
},
|
275
248
|
"modules" => {
|
276
249
|
description: "A list of module dependencies for the project. Each dependency is a map of data specifying "\
|
277
250
|
"the module to install. To install the project's module dependencies, run the `bolt module "\
|
@@ -377,49 +350,57 @@ module Bolt
|
|
377
350
|
"cacert" => {
|
378
351
|
description: "The path to the ca certificate for PuppetDB.",
|
379
352
|
type: String,
|
380
|
-
_example: "/etc/puppetlabs/puppet/ssl/certs/ca.pem"
|
353
|
+
_example: "/etc/puppetlabs/puppet/ssl/certs/ca.pem",
|
354
|
+
_plugin: true
|
381
355
|
},
|
382
356
|
"cert" => {
|
383
357
|
description: "The path to the client certificate file to use for authentication.",
|
384
358
|
type: String,
|
385
|
-
_example: "/etc/puppetlabs/puppet/ssl/certs/my-host.example.com.pem"
|
359
|
+
_example: "/etc/puppetlabs/puppet/ssl/certs/my-host.example.com.pem",
|
360
|
+
_plugin: true
|
386
361
|
},
|
387
362
|
"connect_timeout" => {
|
388
363
|
description: "How long to wait in seconds when establishing connections with PuppetDB.",
|
389
364
|
type: Integer,
|
390
365
|
minimum: 1,
|
391
366
|
_default: 60,
|
392
|
-
_example: 120
|
367
|
+
_example: 120,
|
368
|
+
_plugin: true
|
393
369
|
},
|
394
370
|
"key" => {
|
395
371
|
description: "The private key for the certificate.",
|
396
372
|
type: String,
|
397
|
-
_example: "/etc/puppetlabs/puppet/ssl/private_keys/my-host.example.com.pem"
|
373
|
+
_example: "/etc/puppetlabs/puppet/ssl/private_keys/my-host.example.com.pem",
|
374
|
+
_plugin: true
|
398
375
|
},
|
399
376
|
"read_timeout" => {
|
400
377
|
description: "How long to wait in seconds for a response from PuppetDB.",
|
401
378
|
type: Integer,
|
402
379
|
minimum: 1,
|
403
380
|
_default: 60,
|
404
|
-
_example: 120
|
381
|
+
_example: 120,
|
382
|
+
_plugin: true
|
405
383
|
},
|
406
384
|
"server_urls" => {
|
407
385
|
description: "An array containing the PuppetDB host to connect to. Include the protocol `https` "\
|
408
386
|
"and the port, which is usually `8081`. For example, "\
|
409
387
|
"`https://my-puppetdb-server.com:8081`.",
|
410
388
|
type: Array,
|
411
|
-
_example: ["https://puppet.example.com:8081"]
|
389
|
+
_example: ["https://puppet.example.com:8081"],
|
390
|
+
_plugin: true
|
412
391
|
},
|
413
392
|
"token" => {
|
414
393
|
description: "The path to the PE RBAC Token.",
|
415
394
|
type: String,
|
416
|
-
_example: "~/.puppetlabs/token"
|
395
|
+
_example: "~/.puppetlabs/token",
|
396
|
+
_plugin: true
|
417
397
|
}
|
418
398
|
},
|
419
399
|
_plugin: true
|
420
400
|
},
|
421
401
|
"puppetfile" => {
|
422
|
-
description: "A map containing options for the `bolt puppetfile install` command
|
402
|
+
description: "A map containing options for the `bolt puppetfile install` command and "\
|
403
|
+
"`Install-BoltPuppetfile` cmdlet.",
|
423
404
|
type: Hash,
|
424
405
|
properties: {
|
425
406
|
"forge" => {
|
@@ -434,19 +415,19 @@ module Bolt
|
|
434
415
|
_example: "https://forge.example.com"
|
435
416
|
},
|
436
417
|
"proxy" => {
|
437
|
-
description: "The HTTP proxy to use for
|
418
|
+
description: "The HTTP proxy to use for Forge operations.",
|
438
419
|
type: String,
|
439
420
|
format: "uri",
|
440
|
-
_example: "https://
|
421
|
+
_example: "https://my-forge-proxy.com:8080"
|
441
422
|
}
|
442
423
|
},
|
443
|
-
_example: { "baseurl" => "https://forge.example.com", "proxy" => "https://
|
424
|
+
_example: { "baseurl" => "https://forge.example.com", "proxy" => "https://my-forge-proxy.com:8080" }
|
444
425
|
},
|
445
426
|
"proxy" => {
|
446
427
|
description: "The HTTP proxy to use for Git and Forge operations.",
|
447
428
|
type: String,
|
448
429
|
format: "uri",
|
449
|
-
_example: "https://
|
430
|
+
_example: "https://my-proxy.com:8080"
|
450
431
|
}
|
451
432
|
},
|
452
433
|
_plugin: false
|
@@ -460,6 +441,14 @@ module Bolt
|
|
460
441
|
_example: false,
|
461
442
|
_default: true
|
462
443
|
},
|
444
|
+
"spinner" => {
|
445
|
+
description: "Whether to print a spinner to the console for long-running Bolt operations.",
|
446
|
+
type: [TrueClass, FalseClass],
|
447
|
+
_plugin: false,
|
448
|
+
_example: false,
|
449
|
+
_default: true
|
450
|
+
},
|
451
|
+
|
463
452
|
"tasks" => {
|
464
453
|
description: "A list of task names and glob patterns to filter the project's tasks by. This option is used "\
|
465
454
|
"to limit the visibility of tasks for users of the project. For example, project authors "\
|
@@ -494,7 +483,7 @@ module Bolt
|
|
494
483
|
"specified in the URI.",
|
495
484
|
type: String,
|
496
485
|
enum: TRANSPORT_CONFIG.keys,
|
497
|
-
_plugin:
|
486
|
+
_plugin: true,
|
498
487
|
_example: "winrm",
|
499
488
|
_default: "ssh"
|
500
489
|
},
|
@@ -555,6 +544,7 @@ module Bolt
|
|
555
544
|
puppetdb
|
556
545
|
puppetfile
|
557
546
|
save-rerun
|
547
|
+
spinner
|
558
548
|
trusted-external-command
|
559
549
|
].freeze
|
560
550
|
|
@@ -566,6 +556,7 @@ module Bolt
|
|
566
556
|
format
|
567
557
|
inventory-config
|
568
558
|
log
|
559
|
+
module-install
|
569
560
|
plugin-cache
|
570
561
|
plugin-hooks
|
571
562
|
plugin_hooks
|
@@ -573,6 +564,7 @@ module Bolt
|
|
573
564
|
puppetdb
|
574
565
|
puppetfile
|
575
566
|
save-rerun
|
567
|
+
spinner
|
576
568
|
].freeze
|
577
569
|
|
578
570
|
# Options that are available in a bolt-project.yaml file
|
@@ -587,6 +579,7 @@ module Bolt
|
|
587
579
|
inventoryfile
|
588
580
|
log
|
589
581
|
modulepath
|
582
|
+
module-install
|
590
583
|
modules
|
591
584
|
name
|
592
585
|
plans
|
@@ -597,6 +590,7 @@ module Bolt
|
|
597
590
|
puppetdb
|
598
591
|
puppetfile
|
599
592
|
save-rerun
|
593
|
+
spinner
|
600
594
|
tasks
|
601
595
|
trusted-external-command
|
602
596
|
].freeze
|