bolt 3.17.0 → 3.18.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of bolt might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/Puppetfile +6 -6
- data/bolt-modules/boltlib/lib/puppet/functions/run_script.rb +1 -4
- data/bolt-modules/boltlib/lib/puppet/functions/upload_file.rb +1 -4
- data/bolt-modules/file/lib/puppet/functions/file/exists.rb +1 -4
- data/bolt-modules/file/lib/puppet/functions/file/read.rb +1 -4
- data/bolt-modules/file/lib/puppet/functions/file/readable.rb +1 -4
- data/lib/bolt/analytics.rb +2 -2
- data/lib/bolt/application.rb +5 -12
- data/lib/bolt/applicator.rb +7 -6
- data/lib/bolt/apply_inventory.rb +3 -3
- data/lib/bolt/apply_result.rb +2 -2
- data/lib/bolt/catalog.rb +10 -11
- data/lib/bolt/cli.rb +18 -19
- data/lib/bolt/config/modulepath.rb +1 -1
- data/lib/bolt/config/options.rb +32 -13
- data/lib/bolt/config/transport/base.rb +4 -4
- data/lib/bolt/config/transport/docker.rb +2 -2
- data/lib/bolt/config/transport/local.rb +2 -2
- data/lib/bolt/config/transport/lxd.rb +2 -2
- data/lib/bolt/config/transport/orch.rb +2 -2
- data/lib/bolt/config/transport/podman.rb +2 -2
- data/lib/bolt/config/transport/remote.rb +2 -2
- data/lib/bolt/config/transport/ssh.rb +2 -2
- data/lib/bolt/config/transport/winrm.rb +2 -2
- data/lib/bolt/config.rb +5 -5
- data/lib/bolt/container_result.rb +2 -2
- data/lib/bolt/error.rb +1 -1
- data/lib/bolt/executor.rb +17 -14
- data/lib/bolt/fiber_executor.rb +2 -2
- data/lib/bolt/inventory/group.rb +4 -4
- data/lib/bolt/inventory/inventory.rb +2 -8
- data/lib/bolt/inventory/options.rb +1 -1
- data/lib/bolt/inventory/target.rb +1 -1
- data/lib/bolt/inventory.rb +8 -8
- data/lib/bolt/module_installer/installer.rb +2 -2
- data/lib/bolt/module_installer/puppetfile/forge_module.rb +1 -1
- data/lib/bolt/module_installer/puppetfile/git_module.rb +1 -1
- data/lib/bolt/module_installer/puppetfile/module.rb +1 -1
- data/lib/bolt/module_installer/puppetfile.rb +3 -3
- data/lib/bolt/module_installer/resolver.rb +3 -3
- data/lib/bolt/module_installer/specs/forge_spec.rb +1 -1
- data/lib/bolt/module_installer/specs/git_spec.rb +1 -1
- data/lib/bolt/module_installer/specs.rb +3 -3
- data/lib/bolt/module_installer.rb +6 -6
- data/lib/bolt/node/errors.rb +1 -1
- data/lib/bolt/node/output.rb +1 -1
- data/lib/bolt/outputter/human.rb +2 -2
- data/lib/bolt/outputter/logger.rb +1 -1
- data/lib/bolt/outputter/rainbow.rb +1 -1
- data/lib/bolt/outputter.rb +4 -4
- data/lib/bolt/pal/logging.rb +1 -1
- data/lib/bolt/pal/yaml_plan/evaluator.rb +1 -1
- data/lib/bolt/pal/yaml_plan/loader.rb +2 -2
- data/lib/bolt/pal/yaml_plan/step.rb +11 -11
- data/lib/bolt/pal/yaml_plan/transpiler.rb +3 -3
- data/lib/bolt/pal/yaml_plan.rb +2 -2
- data/lib/bolt/pal.rb +11 -11
- data/lib/bolt/plan_creator.rb +4 -4
- data/lib/bolt/plan_result.rb +2 -2
- data/lib/bolt/plugin/cache.rb +2 -2
- data/lib/bolt/plugin/module.rb +1 -1
- data/lib/bolt/plugin.rb +7 -7
- data/lib/bolt/project.rb +4 -4
- data/lib/bolt/project_manager/config_migrator.rb +1 -1
- data/lib/bolt/project_manager/inventory_migrator.rb +1 -1
- data/lib/bolt/project_manager/migrator.rb +1 -1
- data/lib/bolt/project_manager/module_migrator.rb +5 -5
- data/lib/bolt/project_manager.rb +23 -4
- data/lib/bolt/puppetdb/config.rb +1 -1
- data/lib/bolt/puppetdb.rb +3 -3
- data/lib/bolt/result.rb +1 -1
- data/lib/bolt/shell/bash.rb +12 -2
- data/lib/bolt/shell/powershell.rb +9 -2
- data/lib/bolt/shell.rb +2 -2
- data/lib/bolt/target.rb +2 -2
- data/lib/bolt/transport/base.rb +1 -1
- data/lib/bolt/transport/docker/connection.rb +1 -1
- data/lib/bolt/transport/docker.rb +2 -2
- data/lib/bolt/transport/local/connection.rb +2 -2
- data/lib/bolt/transport/local.rb +3 -3
- data/lib/bolt/transport/lxd/connection.rb +1 -1
- data/lib/bolt/transport/lxd.rb +4 -4
- data/lib/bolt/transport/orch.rb +2 -2
- data/lib/bolt/transport/podman/connection.rb +1 -1
- data/lib/bolt/transport/podman.rb +2 -2
- data/lib/bolt/transport/remote.rb +2 -2
- data/lib/bolt/transport/simple.rb +3 -3
- data/lib/bolt/transport/ssh/connection.rb +3 -3
- data/lib/bolt/transport/ssh.rb +5 -5
- data/lib/bolt/transport/winrm/connection.rb +2 -2
- data/lib/bolt/transport/winrm.rb +3 -3
- data/lib/bolt/util.rb +8 -31
- data/lib/bolt/validator.rb +1 -1
- data/lib/bolt/version.rb +1 -1
- data/lib/bolt.rb +1 -1
- data/lib/bolt_server/transport_app.rb +16 -2
- data/lib/bolt_spec/bolt_context.rb +6 -4
- data/lib/bolt_spec/plans/mock_executor.rb +3 -3
- data/libexec/bolt_catalog +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1da7c437e5ea72a7f457ee51a06dbe434c85099ac2313491fffc63caa19b5acb
|
4
|
+
data.tar.gz: 5c081782bc847bf233e21a40094ffb0878e3bf0bf2da9ffd4ab527f1239d587e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f1cf5097a426a55de0e69f62cb266b15a91521991ad777d8b21ce81653b828bc279d6111fc0d02fb2f289dc53170db0d13bc99580fcd73fab4ce67ac64751795
|
7
|
+
data.tar.gz: 0fef7a9159cc63e167a9014d25a4a1937194adcbcf35492f5286d1c0c88b9202436b1fe64ea92770895350c795900e3ed701a108bfb1814570386c6411079f00
|
data/Puppetfile
CHANGED
@@ -5,8 +5,8 @@ forge "http://forge.puppetlabs.com"
|
|
5
5
|
moduledir File.join(File.dirname(__FILE__), 'modules')
|
6
6
|
|
7
7
|
# Core modules used by 'apply'
|
8
|
-
mod 'puppetlabs-service', '2.
|
9
|
-
mod 'puppetlabs-puppet_agent', '4.
|
8
|
+
mod 'puppetlabs-service', '2.1.0'
|
9
|
+
mod 'puppetlabs-puppet_agent', '4.9.0'
|
10
10
|
mod 'puppetlabs-facts', '1.4.0'
|
11
11
|
|
12
12
|
# Core types and providers for Puppet 6
|
@@ -22,14 +22,14 @@ mod 'puppetlabs-yumrepo_core', '1.0.7'
|
|
22
22
|
mod 'puppetlabs-zone_core', '1.0.3'
|
23
23
|
|
24
24
|
# Useful additional modules
|
25
|
-
mod 'puppetlabs-package', '2.
|
25
|
+
mod 'puppetlabs-package', '2.1.0'
|
26
26
|
mod 'puppetlabs-powershell_task_helper', '0.1.0'
|
27
|
-
mod 'puppetlabs-puppet_conf', '1.
|
27
|
+
mod 'puppetlabs-puppet_conf', '1.2.0'
|
28
28
|
mod 'puppetlabs-python_task_helper', '0.5.0'
|
29
|
-
mod 'puppetlabs-reboot', '4.0
|
29
|
+
mod 'puppetlabs-reboot', '4.1.0'
|
30
30
|
mod 'puppetlabs-ruby_task_helper', '0.6.0'
|
31
31
|
mod 'puppetlabs-ruby_plugin_helper', '0.2.0'
|
32
|
-
mod 'puppetlabs-stdlib', '
|
32
|
+
mod 'puppetlabs-stdlib', '8.0.0'
|
33
33
|
|
34
34
|
# Plugin modules
|
35
35
|
mod 'puppetlabs-aws_inventory', '0.7.0'
|
@@ -108,11 +108,8 @@ Puppet::Functions.create_function(:run_script, Puppet::Functions::InternalFuncti
|
|
108
108
|
# Send Analytics Report
|
109
109
|
executor.report_function_call(self.class.name)
|
110
110
|
|
111
|
-
future = executor&.future || {}
|
112
|
-
fallback = future.fetch('file_paths', false)
|
113
|
-
|
114
111
|
# Find the file path if it exists, otherwise return nil
|
115
|
-
found = Bolt::Util.find_file_from_scope(script, scope
|
112
|
+
found = Bolt::Util.find_file_from_scope(script, scope)
|
116
113
|
unless found && Puppet::FileSystem.exist?(found)
|
117
114
|
raise Puppet::ParseErrorWithIssue.from_issue_and_stack(
|
118
115
|
Puppet::Pops::Issues::NO_SUCH_FILE_OR_DIRECTORY, file: script
|
@@ -70,11 +70,8 @@ Puppet::Functions.create_function(:upload_file, Puppet::Functions::InternalFunct
|
|
70
70
|
# Send Analytics Report
|
71
71
|
executor.report_function_call(self.class.name)
|
72
72
|
|
73
|
-
future = executor&.future || {}
|
74
|
-
fallback = future.fetch('file_paths', false)
|
75
|
-
|
76
73
|
# Find the file path if it exists, otherwise return nil
|
77
|
-
found = Bolt::Util.find_file_from_scope(source, scope
|
74
|
+
found = Bolt::Util.find_file_from_scope(source, scope)
|
78
75
|
unless found && Puppet::FileSystem.exist?(found)
|
79
76
|
raise Puppet::ParseErrorWithIssue.from_issue_and_stack(
|
80
77
|
Puppet::Pops::Issues::NO_SUCH_FILE_OR_DIRECTORY, file: source
|
@@ -21,11 +21,8 @@ Puppet::Functions.create_function(:'file::exists', Puppet::Functions::InternalFu
|
|
21
21
|
executor = Puppet.lookup(:bolt_executor) {}
|
22
22
|
executor&.report_function_call(self.class.name)
|
23
23
|
|
24
|
-
future = executor&.future || Puppet.lookup(:future) { {} }
|
25
|
-
fallback = future.fetch('file_paths', false)
|
26
|
-
|
27
24
|
# Find the file path if it exists, otherwise return nil
|
28
|
-
found = Bolt::Util.find_file_from_scope(filename, scope
|
25
|
+
found = Bolt::Util.find_file_from_scope(filename, scope)
|
29
26
|
found ? Puppet::FileSystem.exist?(found) : false
|
30
27
|
end
|
31
28
|
end
|
@@ -20,11 +20,8 @@ Puppet::Functions.create_function(:'file::read', Puppet::Functions::InternalFunc
|
|
20
20
|
executor = Puppet.lookup(:bolt_executor) {}
|
21
21
|
executor&.report_function_call(self.class.name)
|
22
22
|
|
23
|
-
future = executor&.future || Puppet.lookup(:future) { {} }
|
24
|
-
fallback = future.fetch('file_paths', false)
|
25
|
-
|
26
23
|
# Find the file path if it exists, otherwise return nil
|
27
|
-
found = Bolt::Util.find_file_from_scope(filename, scope
|
24
|
+
found = Bolt::Util.find_file_from_scope(filename, scope)
|
28
25
|
unless found && Puppet::FileSystem.exist?(found)
|
29
26
|
raise Puppet::ParseErrorWithIssue.from_issue_and_stack(
|
30
27
|
Puppet::Pops::Issues::NO_SUCH_FILE_OR_DIRECTORY, file: filename
|
@@ -21,11 +21,8 @@ Puppet::Functions.create_function(:'file::readable', Puppet::Functions::Internal
|
|
21
21
|
executor = Puppet.lookup(:bolt_executor) {}
|
22
22
|
executor&.report_function_call(self.class.name)
|
23
23
|
|
24
|
-
future = executor&.future || Puppet.lookup(:future) { {} }
|
25
|
-
fallback = future.fetch('file_paths', false)
|
26
|
-
|
27
24
|
# Find the file path if it exists, otherwise return nil
|
28
|
-
found = Bolt::Util.find_file_from_scope(filename, scope
|
25
|
+
found = Bolt::Util.find_file_from_scope(filename, scope)
|
29
26
|
found ? File.readable?(found) : false
|
30
27
|
end
|
31
28
|
end
|
data/lib/bolt/analytics.rb
CHANGED
data/lib/bolt/application.rb
CHANGED
@@ -2,8 +2,8 @@
|
|
2
2
|
|
3
3
|
require 'benchmark'
|
4
4
|
|
5
|
-
|
6
|
-
|
5
|
+
require_relative '../bolt/plan_creator'
|
6
|
+
require_relative '../bolt/util'
|
7
7
|
|
8
8
|
module Bolt
|
9
9
|
class Application
|
@@ -258,7 +258,7 @@ module Bolt
|
|
258
258
|
config.project.puppetfile,
|
259
259
|
config.project.managed_moduledir,
|
260
260
|
config.project.project_file,
|
261
|
-
config.module_install)
|
261
|
+
@plugins.resolve_references(config.module_install))
|
262
262
|
end
|
263
263
|
|
264
264
|
# Generate Puppet data types from project modules.
|
@@ -292,7 +292,7 @@ module Bolt
|
|
292
292
|
installer.install(config.project.modules,
|
293
293
|
config.project.puppetfile,
|
294
294
|
config.project.managed_moduledir,
|
295
|
-
config.module_install,
|
295
|
+
@plugins.resolve_references(config.module_install),
|
296
296
|
force: force,
|
297
297
|
resolve: resolve)
|
298
298
|
end
|
@@ -333,12 +333,6 @@ module Bolt
|
|
333
333
|
def new_plan(name, puppet: false, plan_script: nil)
|
334
334
|
Bolt::PlanCreator.validate_plan_name(config.project, name)
|
335
335
|
|
336
|
-
if plan_script && !config.future&.fetch('file_paths', false)
|
337
|
-
raise Bolt::CLIError,
|
338
|
-
"The --script flag can only be used if future.file_paths is " \
|
339
|
-
"configured in bolt-project.yaml."
|
340
|
-
end
|
341
|
-
|
342
336
|
if plan_script
|
343
337
|
Bolt::Util.validate_file('script', find_file(plan_script))
|
344
338
|
end
|
@@ -575,11 +569,10 @@ module Bolt
|
|
575
569
|
modulepath = Bolt::Config::Modulepath.new(config.modulepath)
|
576
570
|
modules = Bolt::Module.discover(modulepath.full_modulepath, config.project)
|
577
571
|
mod, file = path.split(File::SEPARATOR, 2)
|
578
|
-
future = executor.future&.fetch('file_paths', false)
|
579
572
|
|
580
573
|
if modules[mod]
|
581
574
|
logger.debug("Did not find file at #{File.expand_path(path)}, checking in module '#{mod}'")
|
582
|
-
found = Bolt::Util.find_file_in_module(modules[mod].path, file || ""
|
575
|
+
found = Bolt::Util.find_file_in_module(modules[mod].path, file || "")
|
583
576
|
path = found.nil? ? File.join(modules[mod].path, 'files', file) : found
|
584
577
|
end
|
585
578
|
|
data/lib/bolt/applicator.rb
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'base64'
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
4
|
+
require_relative '../bolt/apply_result'
|
5
|
+
require_relative '../bolt/apply_target'
|
6
|
+
require_relative '../bolt/config'
|
7
|
+
require_relative '../bolt/error'
|
8
|
+
require_relative '../bolt/task'
|
9
|
+
require_relative '../bolt/util/puppet_log_level'
|
10
10
|
require 'find'
|
11
11
|
require 'json'
|
12
12
|
require 'logging'
|
@@ -239,6 +239,7 @@ module Bolt
|
|
239
239
|
search_dirs << mod.plugins if mod.plugins?
|
240
240
|
search_dirs << mod.pluginfacts if mod.pluginfacts?
|
241
241
|
search_dirs << mod.files if mod.files?
|
242
|
+
search_dirs << mod.scripts if mod.scripts?
|
242
243
|
type_files = "#{mod.path}/types"
|
243
244
|
search_dirs << type_files if File.exist?(type_files)
|
244
245
|
search_dirs
|
data/lib/bolt/apply_inventory.rb
CHANGED
data/lib/bolt/apply_result.rb
CHANGED
data/lib/bolt/catalog.rb
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
3
|
+
require_relative '../bolt/apply_inventory'
|
4
|
+
require_relative '../bolt/apply_target'
|
5
|
+
require_relative '../bolt/config'
|
6
|
+
require_relative '../bolt/error'
|
7
|
+
require_relative '../bolt/inventory'
|
8
|
+
require_relative '../bolt/pal'
|
9
|
+
require_relative '../bolt/puppetdb'
|
10
|
+
require_relative '../bolt/util'
|
11
11
|
|
12
12
|
Bolt::PAL.load_puppet
|
13
13
|
|
14
|
-
|
14
|
+
require_relative 'catalog/logging'
|
15
15
|
|
16
16
|
module Bolt
|
17
17
|
class Catalog
|
@@ -65,8 +65,7 @@ module Bolt
|
|
65
65
|
puppet_overrides = {
|
66
66
|
bolt_pdb_client: pdb_client,
|
67
67
|
bolt_inventory: inv,
|
68
|
-
bolt_project: bolt_project
|
69
|
-
future: request['future']
|
68
|
+
bolt_project: bolt_project
|
70
69
|
}
|
71
70
|
|
72
71
|
# Facts will be set by the catalog compiler, so we need to ensure
|
data/lib/bolt/cli.rb
CHANGED
@@ -9,23 +9,23 @@ require 'json'
|
|
9
9
|
require 'io/console'
|
10
10
|
require 'logging'
|
11
11
|
require 'optparse'
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
12
|
+
require_relative '../bolt/analytics'
|
13
|
+
require_relative '../bolt/application'
|
14
|
+
require_relative '../bolt/bolt_option_parser'
|
15
|
+
require_relative '../bolt/config'
|
16
|
+
require_relative '../bolt/error'
|
17
|
+
require_relative '../bolt/executor'
|
18
|
+
require_relative '../bolt/inventory'
|
19
|
+
require_relative '../bolt/logger'
|
20
|
+
require_relative '../bolt/module_installer'
|
21
|
+
require_relative '../bolt/outputter'
|
22
|
+
require_relative '../bolt/pal'
|
23
|
+
require_relative '../bolt/plugin'
|
24
|
+
require_relative '../bolt/project_manager'
|
25
|
+
require_relative '../bolt/puppetdb'
|
26
|
+
require_relative '../bolt/rerun'
|
27
|
+
require_relative '../bolt/target'
|
28
|
+
require_relative '../bolt/version'
|
29
29
|
|
30
30
|
module Bolt
|
31
31
|
class CLIExit < StandardError; end
|
@@ -53,8 +53,7 @@ module Bolt
|
|
53
53
|
TARGETING_OPTIONS = %i[query rerun targets].freeze
|
54
54
|
|
55
55
|
SUCCESS = 0
|
56
|
-
|
57
|
-
FAILURE = 2
|
56
|
+
FAILURE = 1
|
58
57
|
|
59
58
|
def initialize(argv)
|
60
59
|
Bolt::Logger.initialize_logging
|
data/lib/bolt/config/options.rb
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
3
|
+
require_relative '../../bolt/config/transport/docker'
|
4
|
+
require_relative '../../bolt/config/transport/local'
|
5
|
+
require_relative '../../bolt/config/transport/lxd'
|
6
|
+
require_relative '../../bolt/config/transport/orch'
|
7
|
+
require_relative '../../bolt/config/transport/podman'
|
8
|
+
require_relative '../../bolt/config/transport/remote'
|
9
|
+
require_relative '../../bolt/config/transport/ssh'
|
10
|
+
require_relative '../../bolt/config/transport/winrm'
|
11
11
|
|
12
12
|
module Bolt
|
13
13
|
class Config
|
@@ -147,14 +147,23 @@ module Bolt
|
|
147
147
|
type: Hash,
|
148
148
|
properties: {
|
149
149
|
"file_paths" => {
|
150
|
-
description: "Load scripts from the `scripts/` directory of a module",
|
150
|
+
description: "Load scripts from the `scripts/` directory of a module.",
|
151
|
+
type: [TrueClass, FalseClass],
|
152
|
+
_example: true,
|
153
|
+
_default: false,
|
154
|
+
_deprecation: "Bolt no longer honors this option and enables loading scripts from the scripts "\
|
155
|
+
"directory by default."
|
156
|
+
},
|
157
|
+
"script_interpreter" => {
|
158
|
+
description: "Use a target's [`interpreters` configuration](bolt_transports_reference.md#interpreters) "\
|
159
|
+
"when running a script.",
|
151
160
|
type: [TrueClass, FalseClass],
|
152
161
|
_example: true,
|
153
162
|
_default: false
|
154
163
|
}
|
155
164
|
},
|
156
165
|
_plugin: false,
|
157
|
-
_example: { '
|
166
|
+
_example: { 'script_interpreter' => true }
|
158
167
|
},
|
159
168
|
"hiera-config" => {
|
160
169
|
description: "The path to the Hiera configuration file.",
|
@@ -248,10 +257,16 @@ module Bolt
|
|
248
257
|
type: Hash,
|
249
258
|
properties: {
|
250
259
|
"forge" => {
|
251
|
-
description: "A subsection
|
252
|
-
"operations only, and a `baseurl` setting to specify a different Forge host.",
|
260
|
+
description: "A subsection for configuring connections to a Forge host.",
|
253
261
|
type: Hash,
|
254
262
|
properties: {
|
263
|
+
"authorization_token" => {
|
264
|
+
description: "The token used to authorize requests to the Forge host. Must also specify "\
|
265
|
+
"`baseurl` when using this option.",
|
266
|
+
type: String,
|
267
|
+
_example: "Bearer eyJhbGciOiJIUzI1NiIsInR5c...",
|
268
|
+
_plugin: true
|
269
|
+
},
|
255
270
|
"baseurl" => {
|
256
271
|
description: "The URL to the Forge host.",
|
257
272
|
type: String,
|
@@ -265,7 +280,11 @@ module Bolt
|
|
265
280
|
_example: "https://my-forge-proxy.com:8080"
|
266
281
|
}
|
267
282
|
},
|
268
|
-
_example: {
|
283
|
+
_example: {
|
284
|
+
"authorization_token" => "Bearer eyJhbGciOiJIUzI1NiIsInR5c...",
|
285
|
+
"baseurl" => "https://forge.example.com",
|
286
|
+
"proxy" => "https://my-forge-proxy.com:8080"
|
287
|
+
}
|
269
288
|
},
|
270
289
|
"proxy" => {
|
271
290
|
description: "The HTTP proxy to use for Git and Forge operations.",
|
@@ -1,9 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
3
|
+
require_relative '../../../bolt/error'
|
4
|
+
require_relative '../../../bolt/util'
|
5
|
+
require_relative '../../../bolt/validator'
|
6
|
+
require_relative '../../../bolt/config/transport/options'
|
7
7
|
|
8
8
|
module Bolt
|
9
9
|
class Config
|
data/lib/bolt/config.rb
CHANGED
@@ -3,11 +3,11 @@
|
|
3
3
|
require 'etc'
|
4
4
|
require 'logging'
|
5
5
|
require 'pathname'
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
6
|
+
require_relative '../bolt/project'
|
7
|
+
require_relative '../bolt/logger'
|
8
|
+
require_relative '../bolt/util'
|
9
|
+
require_relative 'config/options'
|
10
|
+
require_relative '../bolt/validator'
|
11
11
|
|
12
12
|
module Bolt
|
13
13
|
class UnknownTransportError < Bolt::Error
|
data/lib/bolt/error.rb
CHANGED
data/lib/bolt/executor.rb
CHANGED
@@ -6,21 +6,21 @@ require 'json'
|
|
6
6
|
require 'logging'
|
7
7
|
require 'pathname'
|
8
8
|
require 'set'
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
9
|
+
require_relative '../bolt/analytics'
|
10
|
+
require_relative '../bolt/config'
|
11
|
+
require_relative '../bolt/fiber_executor'
|
12
|
+
require_relative '../bolt/puppetdb'
|
13
|
+
require_relative '../bolt/result'
|
14
|
+
require_relative '../bolt/result_set'
|
15
15
|
# Load transports
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
16
|
+
require_relative '../bolt/transport/docker'
|
17
|
+
require_relative '../bolt/transport/local'
|
18
|
+
require_relative '../bolt/transport/lxd'
|
19
|
+
require_relative '../bolt/transport/orch'
|
20
|
+
require_relative '../bolt/transport/podman'
|
21
|
+
require_relative '../bolt/transport/remote'
|
22
|
+
require_relative '../bolt/transport/ssh'
|
23
|
+
require_relative '../bolt/transport/winrm'
|
24
24
|
|
25
25
|
module Bolt
|
26
26
|
TRANSPORTS = {
|
@@ -300,6 +300,9 @@ module Bolt
|
|
300
300
|
description = options.fetch(:description, "script #{script}")
|
301
301
|
log_action(description, targets) do
|
302
302
|
options[:run_as] = run_as if run_as && !options.key?(:run_as)
|
303
|
+
options[:script_interpreter] = (future || {}).fetch('script_interpreter', false)
|
304
|
+
|
305
|
+
@analytics&.event('Future', 'script_interpreter', label: options[:script_interpreter].to_s)
|
303
306
|
|
304
307
|
batch_execute(targets) do |transport, batch|
|
305
308
|
with_node_logging("Running script #{script} with '#{arguments.to_json}'", batch) do
|
data/lib/bolt/fiber_executor.rb
CHANGED
data/lib/bolt/inventory/group.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
3
|
+
require_relative '../../bolt/config/options'
|
4
|
+
require_relative '../../bolt/inventory/group'
|
5
|
+
require_relative '../../bolt/inventory/inventory'
|
6
|
+
require_relative '../../bolt/inventory/target'
|
7
7
|
|
8
8
|
module Bolt
|
9
9
|
class Inventory
|