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.

Files changed (101) hide show
  1. checksums.yaml +4 -4
  2. data/Puppetfile +6 -6
  3. data/bolt-modules/boltlib/lib/puppet/functions/run_script.rb +1 -4
  4. data/bolt-modules/boltlib/lib/puppet/functions/upload_file.rb +1 -4
  5. data/bolt-modules/file/lib/puppet/functions/file/exists.rb +1 -4
  6. data/bolt-modules/file/lib/puppet/functions/file/read.rb +1 -4
  7. data/bolt-modules/file/lib/puppet/functions/file/readable.rb +1 -4
  8. data/lib/bolt/analytics.rb +2 -2
  9. data/lib/bolt/application.rb +5 -12
  10. data/lib/bolt/applicator.rb +7 -6
  11. data/lib/bolt/apply_inventory.rb +3 -3
  12. data/lib/bolt/apply_result.rb +2 -2
  13. data/lib/bolt/catalog.rb +10 -11
  14. data/lib/bolt/cli.rb +18 -19
  15. data/lib/bolt/config/modulepath.rb +1 -1
  16. data/lib/bolt/config/options.rb +32 -13
  17. data/lib/bolt/config/transport/base.rb +4 -4
  18. data/lib/bolt/config/transport/docker.rb +2 -2
  19. data/lib/bolt/config/transport/local.rb +2 -2
  20. data/lib/bolt/config/transport/lxd.rb +2 -2
  21. data/lib/bolt/config/transport/orch.rb +2 -2
  22. data/lib/bolt/config/transport/podman.rb +2 -2
  23. data/lib/bolt/config/transport/remote.rb +2 -2
  24. data/lib/bolt/config/transport/ssh.rb +2 -2
  25. data/lib/bolt/config/transport/winrm.rb +2 -2
  26. data/lib/bolt/config.rb +5 -5
  27. data/lib/bolt/container_result.rb +2 -2
  28. data/lib/bolt/error.rb +1 -1
  29. data/lib/bolt/executor.rb +17 -14
  30. data/lib/bolt/fiber_executor.rb +2 -2
  31. data/lib/bolt/inventory/group.rb +4 -4
  32. data/lib/bolt/inventory/inventory.rb +2 -8
  33. data/lib/bolt/inventory/options.rb +1 -1
  34. data/lib/bolt/inventory/target.rb +1 -1
  35. data/lib/bolt/inventory.rb +8 -8
  36. data/lib/bolt/module_installer/installer.rb +2 -2
  37. data/lib/bolt/module_installer/puppetfile/forge_module.rb +1 -1
  38. data/lib/bolt/module_installer/puppetfile/git_module.rb +1 -1
  39. data/lib/bolt/module_installer/puppetfile/module.rb +1 -1
  40. data/lib/bolt/module_installer/puppetfile.rb +3 -3
  41. data/lib/bolt/module_installer/resolver.rb +3 -3
  42. data/lib/bolt/module_installer/specs/forge_spec.rb +1 -1
  43. data/lib/bolt/module_installer/specs/git_spec.rb +1 -1
  44. data/lib/bolt/module_installer/specs.rb +3 -3
  45. data/lib/bolt/module_installer.rb +6 -6
  46. data/lib/bolt/node/errors.rb +1 -1
  47. data/lib/bolt/node/output.rb +1 -1
  48. data/lib/bolt/outputter/human.rb +2 -2
  49. data/lib/bolt/outputter/logger.rb +1 -1
  50. data/lib/bolt/outputter/rainbow.rb +1 -1
  51. data/lib/bolt/outputter.rb +4 -4
  52. data/lib/bolt/pal/logging.rb +1 -1
  53. data/lib/bolt/pal/yaml_plan/evaluator.rb +1 -1
  54. data/lib/bolt/pal/yaml_plan/loader.rb +2 -2
  55. data/lib/bolt/pal/yaml_plan/step.rb +11 -11
  56. data/lib/bolt/pal/yaml_plan/transpiler.rb +3 -3
  57. data/lib/bolt/pal/yaml_plan.rb +2 -2
  58. data/lib/bolt/pal.rb +11 -11
  59. data/lib/bolt/plan_creator.rb +4 -4
  60. data/lib/bolt/plan_result.rb +2 -2
  61. data/lib/bolt/plugin/cache.rb +2 -2
  62. data/lib/bolt/plugin/module.rb +1 -1
  63. data/lib/bolt/plugin.rb +7 -7
  64. data/lib/bolt/project.rb +4 -4
  65. data/lib/bolt/project_manager/config_migrator.rb +1 -1
  66. data/lib/bolt/project_manager/inventory_migrator.rb +1 -1
  67. data/lib/bolt/project_manager/migrator.rb +1 -1
  68. data/lib/bolt/project_manager/module_migrator.rb +5 -5
  69. data/lib/bolt/project_manager.rb +23 -4
  70. data/lib/bolt/puppetdb/config.rb +1 -1
  71. data/lib/bolt/puppetdb.rb +3 -3
  72. data/lib/bolt/result.rb +1 -1
  73. data/lib/bolt/shell/bash.rb +12 -2
  74. data/lib/bolt/shell/powershell.rb +9 -2
  75. data/lib/bolt/shell.rb +2 -2
  76. data/lib/bolt/target.rb +2 -2
  77. data/lib/bolt/transport/base.rb +1 -1
  78. data/lib/bolt/transport/docker/connection.rb +1 -1
  79. data/lib/bolt/transport/docker.rb +2 -2
  80. data/lib/bolt/transport/local/connection.rb +2 -2
  81. data/lib/bolt/transport/local.rb +3 -3
  82. data/lib/bolt/transport/lxd/connection.rb +1 -1
  83. data/lib/bolt/transport/lxd.rb +4 -4
  84. data/lib/bolt/transport/orch.rb +2 -2
  85. data/lib/bolt/transport/podman/connection.rb +1 -1
  86. data/lib/bolt/transport/podman.rb +2 -2
  87. data/lib/bolt/transport/remote.rb +2 -2
  88. data/lib/bolt/transport/simple.rb +3 -3
  89. data/lib/bolt/transport/ssh/connection.rb +3 -3
  90. data/lib/bolt/transport/ssh.rb +5 -5
  91. data/lib/bolt/transport/winrm/connection.rb +2 -2
  92. data/lib/bolt/transport/winrm.rb +3 -3
  93. data/lib/bolt/util.rb +8 -31
  94. data/lib/bolt/validator.rb +1 -1
  95. data/lib/bolt/version.rb +1 -1
  96. data/lib/bolt.rb +1 -1
  97. data/lib/bolt_server/transport_app.rb +16 -2
  98. data/lib/bolt_spec/bolt_context.rb +6 -4
  99. data/lib/bolt_spec/plans/mock_executor.rb +3 -3
  100. data/libexec/bolt_catalog +1 -1
  101. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '05192d9aa9b3da414b55a21bd75fe10238e8044eb49f75f92be7fac1d0576866'
4
- data.tar.gz: 49302c6d080fda48080d5281c9480ce35a734caefa5be9f6f141aaea51f99b70
3
+ metadata.gz: 1da7c437e5ea72a7f457ee51a06dbe434c85099ac2313491fffc63caa19b5acb
4
+ data.tar.gz: 5c081782bc847bf233e21a40094ffb0878e3bf0bf2da9ffd4ab527f1239d587e
5
5
  SHA512:
6
- metadata.gz: bd0966b7be3a7bba5a1bb0f040a2e8bd8c22708fa1a79492f04b8448037105ac66e12af74969787d3ab4efa69bfcd393c51168154c548d7d35f6f36fc6648c0c
7
- data.tar.gz: e7f2741c6e7a2416ebbc61f7f008e1a550bde1897e906e53a8df0dc837cd4fcb0718c783f301cdbde1703ed95a65530cbad9e727ae5978a6c414988bc0206e23
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.0.0'
9
- mod 'puppetlabs-puppet_agent', '4.8.0'
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.0.0'
25
+ mod 'puppetlabs-package', '2.1.0'
26
26
  mod 'puppetlabs-powershell_task_helper', '0.1.0'
27
- mod 'puppetlabs-puppet_conf', '1.1.0'
27
+ mod 'puppetlabs-puppet_conf', '1.2.0'
28
28
  mod 'puppetlabs-python_task_helper', '0.5.0'
29
- mod 'puppetlabs-reboot', '4.0.2'
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', '7.1.0'
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, fallback)
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, fallback)
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, fallback)
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, fallback)
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, fallback)
25
+ found = Bolt::Util.find_file_from_scope(filename, scope)
29
26
  found ? File.readable?(found) : false
30
27
  end
31
28
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'bolt/util'
4
- require 'bolt/version'
3
+ require_relative '../bolt/util'
4
+ require_relative '../bolt/version'
5
5
  require 'find'
6
6
  require 'json'
7
7
  require 'logging'
@@ -2,8 +2,8 @@
2
2
 
3
3
  require 'benchmark'
4
4
 
5
- require 'bolt/plan_creator'
6
- require 'bolt/util'
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 || "", future)
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
 
@@ -1,12 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'base64'
4
- require 'bolt/apply_result'
5
- require 'bolt/apply_target'
6
- require 'bolt/config'
7
- require 'bolt/error'
8
- require 'bolt/task'
9
- require 'bolt/util/puppet_log_level'
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
@@ -1,8 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'bolt/project'
4
- require 'bolt/config'
5
- require 'bolt/error'
3
+ require_relative '../bolt/project'
4
+ require_relative '../bolt/config'
5
+ require_relative '../bolt/error'
6
6
 
7
7
  module Bolt
8
8
  class ApplyInventory
@@ -1,8 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'json'
4
- require 'bolt/error'
5
- require 'bolt/result'
4
+ require_relative '../bolt/error'
5
+ require_relative '../bolt/result'
6
6
 
7
7
  module Bolt
8
8
  class ApplyResult < Result
data/lib/bolt/catalog.rb CHANGED
@@ -1,17 +1,17 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'bolt/apply_inventory'
4
- require 'bolt/apply_target'
5
- require 'bolt/config'
6
- require 'bolt/error'
7
- require 'bolt/inventory'
8
- require 'bolt/pal'
9
- require 'bolt/puppetdb'
10
- require 'bolt/util'
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
- require 'bolt/catalog/logging'
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
- require 'bolt/analytics'
13
- require 'bolt/application'
14
- require 'bolt/bolt_option_parser'
15
- require 'bolt/config'
16
- require 'bolt/error'
17
- require 'bolt/executor'
18
- require 'bolt/inventory'
19
- require 'bolt/logger'
20
- require 'bolt/module_installer'
21
- require 'bolt/outputter'
22
- require 'bolt/pal'
23
- require 'bolt/plugin'
24
- require 'bolt/project_manager'
25
- require 'bolt/puppetdb'
26
- require 'bolt/rerun'
27
- require 'bolt/target'
28
- require 'bolt/version'
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
- ERROR = 1
57
- FAILURE = 2
56
+ FAILURE = 1
58
57
 
59
58
  def initialize(argv)
60
59
  Bolt::Logger.initialize_logging
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'bolt/config'
3
+ require_relative '../../bolt/config'
4
4
 
5
5
  module Bolt
6
6
  class Config
@@ -1,13 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'bolt/config/transport/docker'
4
- require 'bolt/config/transport/local'
5
- require 'bolt/config/transport/lxd'
6
- require 'bolt/config/transport/orch'
7
- require 'bolt/config/transport/podman'
8
- require 'bolt/config/transport/remote'
9
- require 'bolt/config/transport/ssh'
10
- require 'bolt/config/transport/winrm'
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: { 'file_paths' => true }
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 that can have its own `proxy` setting to set an HTTP proxy for Forge "\
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: { "baseurl" => "https://forge.example.com", "proxy" => "https://my-forge-proxy.com:8080" }
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
- require 'bolt/error'
4
- require 'bolt/util'
5
- require 'bolt/validator'
6
- require 'bolt/config/transport/options'
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
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'bolt/error'
4
- require 'bolt/config/transport/base'
3
+ require_relative '../../../bolt/error'
4
+ require_relative '../../../bolt/config/transport/base'
5
5
 
6
6
  module Bolt
7
7
  class Config
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'bolt/error'
4
- require 'bolt/config/transport/base'
3
+ require_relative '../../../bolt/error'
4
+ require_relative '../../../bolt/config/transport/base'
5
5
 
6
6
  module Bolt
7
7
  class Config
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'bolt/error'
4
- require 'bolt/config/transport/base'
3
+ require_relative '../../../bolt/error'
4
+ require_relative '../../../bolt/config/transport/base'
5
5
 
6
6
  module Bolt
7
7
  class Config
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'bolt/error'
4
- require 'bolt/config/transport/base'
3
+ require_relative '../../../bolt/error'
4
+ require_relative '../../../bolt/config/transport/base'
5
5
 
6
6
  module Bolt
7
7
  class Config
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'bolt/error'
4
- require 'bolt/config/transport/base'
3
+ require_relative '../../../bolt/error'
4
+ require_relative '../../../bolt/config/transport/base'
5
5
 
6
6
  module Bolt
7
7
  class Config
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'bolt/error'
4
- require 'bolt/config/transport/base'
3
+ require_relative '../../../bolt/error'
4
+ require_relative '../../../bolt/config/transport/base'
5
5
 
6
6
  module Bolt
7
7
  class Config
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'bolt/error'
4
- require 'bolt/config/transport/base'
3
+ require_relative '../../../bolt/error'
4
+ require_relative '../../../bolt/config/transport/base'
5
5
 
6
6
  module Bolt
7
7
  class Config
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'bolt/error'
4
- require 'bolt/config/transport/base'
3
+ require_relative '../../../bolt/error'
4
+ require_relative '../../../bolt/config/transport/base'
5
5
 
6
6
  module Bolt
7
7
  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
- require 'bolt/project'
7
- require 'bolt/logger'
8
- require 'bolt/util'
9
- require 'bolt/config/options'
10
- require 'bolt/validator'
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
@@ -1,8 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'json'
4
- require 'bolt/error'
5
- require 'bolt/result'
4
+ require_relative '../bolt/error'
5
+ require_relative '../bolt/result'
6
6
 
7
7
  module Bolt
8
8
  class ContainerResult
data/lib/bolt/error.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'bolt/util'
3
+ require_relative '../bolt/util'
4
4
 
5
5
  module Bolt
6
6
  class Error < RuntimeError
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
- require 'bolt/analytics'
10
- require 'bolt/config'
11
- require 'bolt/fiber_executor'
12
- require 'bolt/puppetdb'
13
- require 'bolt/result'
14
- require 'bolt/result_set'
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
- require 'bolt/transport/docker'
17
- require 'bolt/transport/local'
18
- require 'bolt/transport/lxd'
19
- require 'bolt/transport/orch'
20
- require 'bolt/transport/podman'
21
- require 'bolt/transport/remote'
22
- require 'bolt/transport/ssh'
23
- require 'bolt/transport/winrm'
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
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'bolt/logger'
4
- require 'bolt/plan_future'
3
+ require_relative '../bolt/logger'
4
+ require_relative '../bolt/plan_future'
5
5
 
6
6
  module Bolt
7
7
  class FiberExecutor
@@ -1,9 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'bolt/config/options'
4
- require 'bolt/inventory/group'
5
- require 'bolt/inventory/inventory'
6
- require 'bolt/inventory/target'
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