openbolt 5.0.0.rc1 → 5.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. checksums.yaml +4 -4
  2. data/Puppetfile +18 -12
  3. data/bolt-modules/boltlib/lib/puppet/functions/apply_prep.rb +5 -3
  4. data/bolt-modules/boltlib/lib/puppet/functions/download_file.rb +1 -0
  5. data/bolt-modules/boltlib/lib/puppet/functions/get_resources.rb +2 -0
  6. data/bolt-modules/boltlib/lib/puppet/functions/puppetdb_command.rb +1 -1
  7. data/bolt-modules/boltlib/lib/puppet/functions/run_container.rb +2 -2
  8. data/bolt-modules/boltlib/lib/puppet/functions/run_script.rb +1 -0
  9. data/bolt-modules/boltlib/lib/puppet/functions/set_resources.rb +2 -2
  10. data/bolt-modules/boltlib/lib/puppet/functions/upload_file.rb +1 -0
  11. data/bolt-modules/boltlib/lib/puppet/functions/wait.rb +1 -1
  12. data/bolt-modules/boltlib/lib/puppet/functions/wait_until_available.rb +1 -0
  13. data/bolt-modules/ctrl/lib/puppet/functions/ctrl/do_until.rb +1 -0
  14. data/lib/bolt/analytics.rb +1 -1
  15. data/lib/bolt/application.rb +17 -22
  16. data/lib/bolt/applicator.rb +4 -0
  17. data/lib/bolt/bolt_option_parser.rb +10 -8
  18. data/lib/bolt/cli.rb +7 -6
  19. data/lib/bolt/config/options.rb +59 -67
  20. data/lib/bolt/config/transport/base.rb +1 -0
  21. data/lib/bolt/config/transport/options.rb +59 -59
  22. data/lib/bolt/config.rb +8 -6
  23. data/lib/bolt/executor.rb +9 -24
  24. data/lib/bolt/fiber_executor.rb +3 -1
  25. data/lib/bolt/inventory/group.rb +3 -0
  26. data/lib/bolt/inventory/inventory.rb +2 -0
  27. data/lib/bolt/inventory/options.rb +7 -7
  28. data/lib/bolt/inventory/target.rb +3 -2
  29. data/lib/bolt/inventory.rb +1 -0
  30. data/lib/bolt/logger.rb +2 -0
  31. data/lib/bolt/module.rb +1 -0
  32. data/lib/bolt/module_installer/puppetfile.rb +4 -4
  33. data/lib/bolt/module_installer/resolver.rb +2 -2
  34. data/lib/bolt/module_installer/specs/forge_spec.rb +4 -4
  35. data/lib/bolt/module_installer/specs/git_spec.rb +6 -6
  36. data/lib/bolt/module_installer/specs/id/gitclone.rb +1 -0
  37. data/lib/bolt/module_installer/specs/id/github.rb +2 -1
  38. data/lib/bolt/module_installer/specs/id/gitlab.rb +2 -1
  39. data/lib/bolt/module_installer.rb +3 -1
  40. data/lib/bolt/outputter/human.rb +9 -4
  41. data/lib/bolt/outputter/rainbow.rb +1 -0
  42. data/lib/bolt/pal/yaml_plan/parameter.rb +2 -2
  43. data/lib/bolt/pal/yaml_plan/step/resources.rb +1 -1
  44. data/lib/bolt/pal.rb +7 -4
  45. data/lib/bolt/plan_creator.rb +5 -4
  46. data/lib/bolt/plugin/cache.rb +2 -0
  47. data/lib/bolt/plugin/module.rb +7 -0
  48. data/lib/bolt/plugin/puppet_connect_data.rb +1 -0
  49. data/lib/bolt/plugin/task.rb +3 -0
  50. data/lib/bolt/plugin.rb +4 -0
  51. data/lib/bolt/project.rb +3 -3
  52. data/lib/bolt/project_manager/config_migrator.rb +3 -3
  53. data/lib/bolt/project_manager/inventory_migrator.rb +1 -1
  54. data/lib/bolt/project_manager/module_migrator.rb +7 -6
  55. data/lib/bolt/project_manager.rb +11 -11
  56. data/lib/bolt/puppetdb/config.rb +4 -0
  57. data/lib/bolt/puppetdb/instance.rb +1 -0
  58. data/lib/bolt/rerun.rb +1 -0
  59. data/lib/bolt/resource_instance.rb +1 -1
  60. data/lib/bolt/result.rb +2 -1
  61. data/lib/bolt/shell/bash.rb +2 -1
  62. data/lib/bolt/shell/powershell.rb +4 -3
  63. data/lib/bolt/shell.rb +1 -1
  64. data/lib/bolt/task/run.rb +1 -0
  65. data/lib/bolt/task.rb +3 -0
  66. data/lib/bolt/transport/docker/connection.rb +2 -0
  67. data/lib/bolt/transport/jail/connection.rb +2 -0
  68. data/lib/bolt/transport/lxd/connection.rb +2 -0
  69. data/lib/bolt/transport/lxd.rb +1 -1
  70. data/lib/bolt/transport/podman/connection.rb +2 -0
  71. data/lib/bolt/transport/remote.rb +1 -0
  72. data/lib/bolt/transport/ssh/connection.rb +1 -1
  73. data/lib/bolt/transport/winrm/connection.rb +4 -3
  74. data/lib/bolt/util/format.rb +1 -0
  75. data/lib/bolt/util.rb +7 -4
  76. data/lib/bolt/validator.rb +1 -1
  77. data/lib/bolt/version.rb +1 -1
  78. data/lib/bolt_spec/plans/action_stubs.rb +5 -0
  79. data/lib/bolt_spec/plans/mock_executor.rb +2 -4
  80. data/libexec/apply_catalog.rb +2 -1
  81. data/libexec/custom_facts.rb +1 -1
  82. data/libexec/query_resources.rb +1 -1
  83. metadata +63 -77
  84. data/lib/bolt/config/transport/orch.rb +0 -41
  85. data/lib/bolt/transport/orch/connection.rb +0 -111
  86. data/lib/bolt/transport/orch.rb +0 -271
  87. data/lib/bolt_server/acl.rb +0 -39
  88. data/lib/bolt_server/base_config.rb +0 -112
  89. data/lib/bolt_server/config.rb +0 -64
  90. data/lib/bolt_server/file_cache.rb +0 -200
  91. data/lib/bolt_server/request_error.rb +0 -11
  92. data/lib/bolt_server/schemas/action-check_node_connections.json +0 -14
  93. data/lib/bolt_server/schemas/action-run_command.json +0 -12
  94. data/lib/bolt_server/schemas/action-run_script.json +0 -47
  95. data/lib/bolt_server/schemas/action-run_task.json +0 -20
  96. data/lib/bolt_server/schemas/action-upload_file.json +0 -47
  97. data/lib/bolt_server/schemas/partials/target-any.json +0 -10
  98. data/lib/bolt_server/schemas/partials/target-ssh.json +0 -88
  99. data/lib/bolt_server/schemas/partials/target-winrm.json +0 -67
  100. data/lib/bolt_server/schemas/partials/task.json +0 -94
  101. data/lib/bolt_server/schemas/transport-ssh.json +0 -25
  102. data/lib/bolt_server/schemas/transport-winrm.json +0 -19
  103. data/lib/bolt_server/transport_app.rb +0 -554
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4b185096a836ebb48610140607f7cf3d9271f5ac4b849be866ba860bfb9bf39c
4
- data.tar.gz: 7012bd8a0ef497bb28941fe60ce248a02ea0d6b521f72610258193ec352be3eb
3
+ metadata.gz: 16adee6f2ee63ca8307251e4c21172c2b5757abb858fde6b785a4ad95ae682dd
4
+ data.tar.gz: 1d27c4966b88c572fa32e7ad576e575c2f8df15c42fb154740d001648b8d33c9
5
5
  SHA512:
6
- metadata.gz: 4ca129817353a9743ce4c2fe6252c155a7180f76f7a8520b3ff4262a5b3888598f7c2c1bc2f56825d22ead5329d6461b5e41004569335f55c7363f9b1e5e2f5a
7
- data.tar.gz: 81ed93b16ff9acf1edb58604222d21e8ff37922d324df8083e89cf81201bf6782cbd3b62431cb85c8ecf924f26fb9a9cca89b21b2b8402c8a16fd5cc94644a8a
6
+ metadata.gz: 51f3c418134ed410ae9b853ca94dda21101e0f1e53466f6b3152ee39cbc0d743250eab910e5791ebc0014a53b18a84bfa48e8606d5755fc606b103735cd43609
7
+ data.tar.gz: 5e4bf2586950d1268c7c69ca4d14b0be64b12c2db6f5279622773f185c6fb8674d02a24486c1ea1148e2bbce32655c3de318e19cf011c179fbbae31259a8964a
data/Puppetfile CHANGED
@@ -5,15 +5,22 @@ forge 'https://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', '3.0.0'
9
- mod 'puppetlabs-puppet_agent', '4.21.0'
10
- mod 'puppetlabs-facts', '1.6.0'
8
+ mod 'puppetlabs-service', '3.1.0'
9
+ mod 'puppetlabs-puppet_agent', '4.25.0'
10
+ mod 'puppetlabs-facts', '1.7.0'
11
+
12
+ # puppetlabs-puppet_agent deps
13
+ mod 'puppetlabs-inifile', '6.2.0'
14
+ mod 'puppetlabs-apt', '10.0.1'
15
+ mod 'puppetlabs-stdlib', '9.7.0'
16
+ mod 'puppetlabs-powershell', '6.0.2'
17
+ mod 'puppetlabs-pwshlib', '1.2.3'
11
18
 
12
19
  # Core types and providers for Puppet 6
13
20
  mod 'puppetlabs-augeas_core', '1.5.0'
14
21
  mod 'puppetlabs-host_core', '1.3.0'
15
- mod 'puppetlabs-scheduled_task', '4.0.0'
16
- mod 'puppetlabs-sshkeys_core', '2.5.0'
22
+ mod 'puppetlabs-scheduled_task', '4.0.3'
23
+ mod 'puppetlabs-sshkeys_core', '2.5.1'
17
24
  mod 'puppetlabs-zfs_core', '1.6.1'
18
25
  mod 'puppetlabs-cron_core', '1.3.0'
19
26
  mod 'puppetlabs-mount_core', '1.3.0'
@@ -22,17 +29,16 @@ mod 'puppetlabs-yumrepo_core', '2.1.0'
22
29
  mod 'puppetlabs-zone_core', '1.2.0'
23
30
 
24
31
  # Useful additional modules
25
- mod 'puppetlabs-package', '3.0.1'
26
- mod 'puppetlabs-puppet_conf', '2.0.0'
27
- mod 'puppetlabs-reboot', '5.0.0'
28
- mod 'puppetlabs-stdlib', '9.6.0'
32
+ mod 'puppetlabs-package', '3.1.0'
33
+ mod 'puppetlabs-puppet_conf', '2.1.0'
34
+ mod 'puppetlabs-reboot', '5.1.0'
29
35
 
30
36
  # Task helpers
31
37
  mod 'puppetlabs-powershell_task_helper', '0.1.0'
32
38
  mod 'puppetlabs-ruby_task_helper', '0.6.1'
33
- mod 'puppetlabs-ruby_plugin_helper', '0.2.0'
34
- mod 'puppetlabs-python_task_helper', '0.5.0'
35
- mod 'puppetlabs-bash_task_helper', '2.1.1'
39
+ mod 'puppetlabs-ruby_plugin_helper', '0.3.0'
40
+ mod 'puppetlabs-python_task_helper', '0.6.0'
41
+ mod 'puppetlabs-bash_task_helper', '2.2.0'
36
42
 
37
43
  # Plugin modules
38
44
  mod 'puppetlabs-aws_inventory', '0.7.0'
@@ -71,8 +71,8 @@ Puppet::Functions.create_function(:apply_prep) do
71
71
  #
72
72
  private def agent?(target)
73
73
  inventory.features(target).include?('puppet-agent') ||
74
- executor.transport(target.transport).provided_features.include?('puppet-agent') ||
75
- target.remote?
74
+ executor.transport(target.transport).provided_features.include?('puppet-agent') ||
75
+ target.remote?
76
76
  end
77
77
 
78
78
  # Generate the plugin tarball.
@@ -84,6 +84,7 @@ Puppet::Functions.create_function(:apply_prep) do
84
84
 
85
85
  tarball = applicator.build_plugin_tarball do |mod|
86
86
  next unless required_modules.empty? || required_modules.include?(mod.name)
87
+
87
88
  search_dirs = []
88
89
  search_dirs << mod.plugins if mod.plugins?
89
90
  search_dirs << mod.pluginfacts if mod.pluginfacts?
@@ -111,6 +112,7 @@ Puppet::Functions.create_function(:apply_prep) do
111
112
 
112
113
  hook_results.each do |result|
113
114
  next unless result.ok?
115
+
114
116
  inventory.set_feature(result.target, 'puppet-agent')
115
117
  end
116
118
 
@@ -143,7 +145,7 @@ Puppet::Functions.create_function(:apply_prep) do
143
145
  if unsupported_puppet?(result['clientversion'])
144
146
  Bolt::Logger.deprecate(
145
147
  "unsupported_puppet",
146
- "Detected unsupported Puppet agent version #{result['clientversion']} on target "\
148
+ "Detected unsupported Puppet agent version #{result['clientversion']} on target " \
147
149
  "#{result.target}. Bolt supports Puppet agent 6.0.0 and higher."
148
150
  )
149
151
  end
@@ -124,6 +124,7 @@ Puppet::Functions.create_function(:download_file, Puppet::Functions::InternalFun
124
124
  if !r.ok && !options[:catch_errors]
125
125
  raise Bolt::RunFailure.new(r, 'download_file', source)
126
126
  end
127
+
127
128
  r
128
129
  end
129
130
  end
@@ -34,6 +34,7 @@ Puppet::Functions.create_function(:get_resources) do
34
34
  task = Bolt::Task.from_task_signature(tasksig)
35
35
  results = executor.run_task(targets, task, args)
36
36
  raise Bolt::RunFailure.new(results, 'run_task', task.name) unless results.ok?
37
+
37
38
  results
38
39
  end
39
40
 
@@ -80,6 +81,7 @@ Puppet::Functions.create_function(:get_resources) do
80
81
  }
81
82
  results = executor.run_task(targets, task, arguments)
82
83
  raise Bolt::RunFailure.new(results, 'run_task', task.name) unless results.ok?
84
+
83
85
  results
84
86
  end
85
87
  end
@@ -86,7 +86,7 @@ Puppet::Functions.create_function(:puppetdb_command) do
86
86
  # Error if the PDB client does not implement :send_command
87
87
  unless puppetdb_client.respond_to?(:send_command)
88
88
  raise Bolt::Error.new(
89
- "PuppetDB client #{puppetdb_client.class} does not implement :send_command, "\
89
+ "PuppetDB client #{puppetdb_client.class} does not implement :send_command, " \
90
90
  "unable to invoke command.",
91
91
  'bolt/pdb-command'
92
92
  )
@@ -127,7 +127,7 @@ Puppet::Functions.create_function(:run_container) do
127
127
  end
128
128
 
129
129
  if (bad_vs = volumes.reject { |k, v| k.is_a?(String) && v.is_a?(String) }).any?
130
- msg = "Option 'volumes' only accepts strings for keys and values. "\
130
+ msg = "Option 'volumes' only accepts strings for keys and values. " \
131
131
  "Received: #{bad_vs.map(&:inspect).join(', ')}"
132
132
  raise Bolt::ValidationError, msg
133
133
  end
@@ -153,7 +153,7 @@ Puppet::Functions.create_function(:run_container) do
153
153
  end
154
154
 
155
155
  if (bad_ps = ports.reject { |k, v| k.is_a?(Integer) && v.is_a?(Integer) }).any?
156
- msg = "Option 'ports' only accepts integers for keys and values. "\
156
+ msg = "Option 'ports' only accepts integers for keys and values. " \
157
157
  "Received: #{bad_ps.map(&:inspect).join(', ')}"
158
158
  raise Bolt::ValidationError, msg
159
159
  end
@@ -139,6 +139,7 @@ Puppet::Functions.create_function(:run_script, Puppet::Functions::InternalFuncti
139
139
  if !r.ok && !options[:catch_errors]
140
140
  raise Bolt::RunFailure.new(r, 'run_script', script)
141
141
  end
142
+
142
143
  r
143
144
  end
144
145
  end
@@ -134,8 +134,8 @@ Puppet::Functions.create_function(:set_resources) do
134
134
 
135
135
  unless resource.target == target
136
136
  file, line = Puppet::Pops::PuppetStack.top_of_stack
137
- raise Bolt::ValidationError, "Cannot set resource #{resource.reference} for target "\
138
- "#{resource.target} on target #{target}. "\
137
+ raise Bolt::ValidationError, "Cannot set resource #{resource.reference} for target " \
138
+ "#{resource.target} on target #{target}. " \
139
139
  "#{Puppet::Util::Errors.error_location(file, line)}"
140
140
  end
141
141
 
@@ -95,6 +95,7 @@ Puppet::Functions.create_function(:upload_file, Puppet::Functions::InternalFunct
95
95
  if !r.ok && !options[:catch_errors]
96
96
  raise Bolt::RunFailure.new(r, 'upload_file', source)
97
97
  end
98
+
98
99
  r
99
100
  end
100
101
  end
@@ -111,7 +111,7 @@ Puppet::Functions.create_function(:wait, Puppet::Functions::InternalFunction) do
111
111
  valid, unknown = options.partition { |k, _v| %w[_catch_errors].include?(k) }.map(&:to_h)
112
112
  if unknown.any?
113
113
  file, line = Puppet::Pops::PuppetStack.top_of_stack
114
- msg = "The wait() function call in #{file}#L#{line} received unknown options "\
114
+ msg = "The wait() function call in #{file}#L#{line} received unknown options " \
115
115
  "#{unknown.keys}. Removing unknown options and continuing..."
116
116
  Bolt::Logger.warn("plan_function_options", msg)
117
117
  end
@@ -54,6 +54,7 @@ Puppet::Functions.create_function(:wait_until_available) do
54
54
  if !r.ok && !options['_catch_errors']
55
55
  raise Bolt::RunFailure.new(r, 'wait_until_available')
56
56
  end
57
+
57
58
  r
58
59
  end
59
60
  end
@@ -35,6 +35,7 @@ Puppet::Functions.create_function(:'ctrl::do_until') do
35
35
  until (x = yield)
36
36
  i += 1
37
37
  break if limit != 0 && i >= limit
38
+
38
39
  Kernel.sleep(interval) if interval
39
40
  end
40
41
  x
@@ -59,7 +59,7 @@ module Bolt
59
59
 
60
60
  if File.exist?(path)
61
61
  if File.exist?(old_path)
62
- message = "Detected analytics configuration files at '#{old_path}' and '#{path}'. Loading "\
62
+ message = "Detected analytics configuration files at '#{old_path}' and '#{path}'. Loading " \
63
63
  "analytics configuration from '#{path}'."
64
64
  Bolt::Logger.warn_once('duplicate_analytics', message)
65
65
  end
@@ -57,10 +57,10 @@ module Bolt
57
57
  if defined?(ast.body) &&
58
58
  (ast.body.is_a?(Puppet::Pops::Model::HostClassDefinition) ||
59
59
  ast.body.is_a?(Puppet::Pops::Model::ResourceTypeDefinition))
60
- message = "Manifest only contains definitions and will result in no changes on the targets. "\
61
- "Definitions must be declared for their resources to be applied. You can read more "\
62
- "about defining and declaring classes and types in the Puppet documentation at "\
63
- "https://puppet.com/docs/puppet/latest/lang_classes.html and "\
60
+ message = "Manifest only contains definitions and will result in no changes on the targets. " \
61
+ "Definitions must be declared for their resources to be applied. You can read more " \
62
+ "about defining and declaring classes and types in the Puppet documentation at " \
63
+ "https://puppet.com/docs/puppet/latest/lang_classes.html and " \
64
64
  "https://puppet.com/docs/puppet/latest/lang_defined_types.html"
65
65
  Bolt::Logger.warn("empty_manifest", message)
66
66
  end
@@ -281,7 +281,7 @@ module Bolt
281
281
 
282
282
  if config.project.modules.empty? && resolve
283
283
  outputter.print_message(
284
- "Project configuration file #{config.project.project_file} does not "\
284
+ "Project configuration file #{config.project.project_file} does not " \
285
285
  "specify any module dependencies. Nothing to do."
286
286
  )
287
287
  return true
@@ -375,15 +375,7 @@ module Bolt
375
375
  end
376
376
  end
377
377
 
378
- sensitive_params = params.keys.select { |param| plan_params.dig(param, 'sensitive') }
379
-
380
- plan_context = { plan_name: plan, params: params, sensitive: sensitive_params }
381
-
382
- executor.start_plan(plan_context)
383
- result = pal.run_plan(plan, params, executor, inventory, plugins.puppetdb_client)
384
- executor.finish_plan(result)
385
-
386
- result
378
+ pal.run_plan(plan, params, executor, inventory, plugins.puppetdb_client)
387
379
  rescue Bolt::Error => e
388
380
  Bolt::PlanResult.new(e, 'failure')
389
381
  end
@@ -439,8 +431,8 @@ module Bolt
439
431
 
440
432
  # CODEREVIEW: Phrasing
441
433
  raise Bolt::Error.new(
442
- "The following policies are not available to the project: '#{unavailable_policies.join("', '")}'. "\
443
- "You must list policies in a project's 'policies' setting before Bolt can apply them to targets. "\
434
+ "The following policies are not available to the project: '#{unavailable_policies.join("', '")}'. " \
435
+ "You must list policies in a project's 'policies' setting before Bolt can apply them to targets. " \
444
436
  "For a list of policies available to the project, run '#{command}'.",
445
437
  'bolt/unavailable-policy-error'
446
438
  )
@@ -460,7 +452,7 @@ module Bolt
460
452
  # CODEREVIEW: Phrasing
461
453
  if unloadable_policies.any?
462
454
  raise Bolt::Error.new(
463
- "The following policies cannot be loaded: '#{unloadable_policies.join("', '")}'. "\
455
+ "The following policies cannot be loaded: '#{unloadable_policies.join("', '")}'. " \
464
456
  "Policies must be a Puppet class saved to a project's or module's manifests directory.",
465
457
  'bolt/unloadable-policy-error'
466
458
  )
@@ -509,7 +501,7 @@ module Bolt
509
501
  # Error if name is not namespaced to project
510
502
  unless prefix == @config.project.name
511
503
  raise Bolt::ValidationError,
512
- "Policy name '#{name}' must begin with project name '#{@config.project.name}'. Did "\
504
+ "Policy name '#{name}' must begin with project name '#{@config.project.name}'. Did " \
513
505
  "you mean '#{@config.project.name}::#{name}'?"
514
506
  end
515
507
 
@@ -578,9 +570,9 @@ module Bolt
578
570
  command = Bolt::Util.powershell? ? 'New-BoltPolicy -Name <NAME>' : 'bolt policy new <NAME>'
579
571
 
580
572
  raise Bolt::Error.new(
581
- "Project configuration file #{@config.project.project_file} does not "\
582
- "specify any policies. You can add policies to the project by including "\
583
- "a 'policies' key or creating a new policy using the '#{command}' "\
573
+ "Project configuration file #{@config.project.project_file} does not " \
574
+ "specify any policies. You can add policies to the project by including " \
575
+ "a 'policies' key or creating a new policy using the '#{command}' " \
584
576
  "command.",
585
577
  'bolt/no-policies-error'
586
578
  )
@@ -719,7 +711,7 @@ module Bolt
719
711
  unless project.project_file?
720
712
  command = Bolt::Util.powershell? ? 'New-BoltProject' : 'bolt project init'
721
713
 
722
- msg = "Could not find project configuration file #{project.project_file}, unable "\
714
+ msg = "Could not find project configuration file #{project.project_file}, unable " \
723
715
  "to install modules. To create a Bolt project, run '#{command}'."
724
716
 
725
717
  raise Bolt::Error.new(msg, 'bolt/missing-project-config-error')
@@ -733,6 +725,7 @@ module Bolt
733
725
  #
734
726
  private def filter_content(content, filter)
735
727
  return content unless content && filter
728
+
736
729
  content.select { |name,| name.include?(filter) }
737
730
  end
738
731
 
@@ -745,6 +738,7 @@ module Bolt
745
738
  #
746
739
  private def find_file(path)
747
740
  return path if File.exist?(path) || Pathname.new(path).absolute?
741
+
748
742
  modulepath = Bolt::Config::Modulepath.new(config.modulepath)
749
743
  modules = Bolt::Module.discover(modulepath.full_modulepath, config.project)
750
744
  mod, file = path.split(File::SEPARATOR, 2)
@@ -766,6 +760,7 @@ module Bolt
766
760
 
767
761
  files.each_with_object({}) do |file, guides|
768
762
  next if file !~ /\.(yaml|yml)\z/
763
+
769
764
  topic = File.basename(file, ".*")
770
765
  guides[topic] = File.join(root_path, file)
771
766
  end
@@ -174,6 +174,7 @@ module Bolt
174
174
  elsif data['version'] != 5
175
175
  raise Bolt::ParseError, "Hiera v5 is required, found v#{data['version'] || 3} in #{hiera_config}"
176
176
  end
177
+
177
178
  hiera_config
178
179
  end
179
180
  end
@@ -181,6 +182,7 @@ module Bolt
181
182
  def apply(args, apply_body, scope)
182
183
  raise(ArgumentError, 'apply requires a TargetSpec') if args.empty?
183
184
  raise(ArgumentError, 'apply requires at least one statement in the apply block') if apply_body.nil?
185
+
184
186
  type0 = Puppet.lookup(:pal_script_compiler).type('TargetSpec')
185
187
  Puppet::Pal.assert_type(type0, args[0], 'apply targets')
186
188
 
@@ -241,6 +243,7 @@ module Bolt
241
243
  @plugin_tarball = Concurrent::Delay.new do
242
244
  build_plugin_tarball do |mod|
243
245
  next unless required_modules.nil? || required_modules.include?(mod.name)
246
+
244
247
  search_dirs = []
245
248
  search_dirs << mod.plugins if mod.plugins?
246
249
  search_dirs << mod.pluginfacts if mod.pluginfacts?
@@ -317,6 +320,7 @@ module Bolt
317
320
  if !r.ok && !options[:catch_errors]
318
321
  raise Bolt::ApplyFailure, r
319
322
  end
323
+
320
324
  r
321
325
  end
322
326
 
@@ -197,13 +197,13 @@ module Bolt
197
197
 
198
198
  BANNER = <<~HELP
199
199
  #{colorize(:cyan, 'Name')}
200
- bolt
200
+ OpenBolt
201
201
 
202
202
  #{colorize(:cyan, 'Usage')}
203
203
  bolt <subcommand> [action] [options]
204
204
 
205
205
  #{colorize(:cyan, 'Description')}
206
- Bolt is an orchestration tool that automates the manual work it takes to
206
+ OpenBolt is an orchestration tool that automates the manual work it takes to
207
207
  maintain your infrastructure.
208
208
 
209
209
  #{colorize(:cyan, 'Subcommands')}
@@ -450,7 +450,7 @@ module Bolt
450
450
  MODULE_HELP = <<~HELP
451
451
  #{colorize(:cyan, 'Name')}
452
452
  module
453
-
453
+
454
454
  #{colorize(:cyan, 'Usage')}
455
455
  bolt module <action> [options]
456
456
 
@@ -470,7 +470,7 @@ module Bolt
470
470
  MODULE_ADD_HELP = <<~HELP
471
471
  #{colorize(:cyan, 'Name')}
472
472
  module add
473
-
473
+
474
474
  #{colorize(:cyan, 'Usage')}
475
475
  bolt module add <module> [options]
476
476
 
@@ -503,7 +503,7 @@ module Bolt
503
503
  MODULE_INSTALL_HELP = <<~HELP
504
504
  #{colorize(:cyan, 'Name')}
505
505
  module install
506
-
506
+
507
507
  #{colorize(:cyan, 'Usage')}
508
508
  bolt module install [options]
509
509
 
@@ -581,10 +581,10 @@ module Bolt
581
581
  PLAN_NEW_HELP = <<~HELP
582
582
  #{colorize(:cyan, 'Name')}
583
583
  plan new
584
-
584
+
585
585
  #{colorize(:cyan, 'Usage')}
586
586
  bolt plan new <plan name> [options]
587
-
587
+
588
588
  #{colorize(:cyan, 'Description')}
589
589
  Create a new plan in the current project.
590
590
 
@@ -1049,6 +1049,7 @@ module Bolt
1049
1049
  if ENV.include?(Bolt::Inventory::ENVIRONMENT_VAR)
1050
1050
  raise Bolt::CLIError, "Cannot pass inventory file when #{Bolt::Inventory::ENVIRONMENT_VAR} is set"
1051
1051
  end
1052
+
1052
1053
  @options[:inventoryfile] = File.expand_path(path)
1053
1054
  end
1054
1055
  define('--[no-]save-rerun', 'Whether to update the rerun file after this command.') do |save|
@@ -1063,6 +1064,7 @@ module Bolt
1063
1064
  unless envvar.include?('=')
1064
1065
  raise Bolt::CLIError, "Environment variables must be specified using 'myenvvar=key' format"
1065
1066
  end
1067
+
1066
1068
  @options[:env_vars] ||= {}
1067
1069
  @options[:env_vars].store(*envvar.split('=', 2))
1068
1070
  end
@@ -1129,7 +1131,7 @@ module Bolt
1129
1131
  separator "\n#{self.class.colorize(:cyan, 'Display options')}"
1130
1132
  define('--filter FILTER', 'Filter tasks and plans by a matching substring.') do |filter|
1131
1133
  unless /^[a-z0-9_:]+$/.match(filter)
1132
- msg = "Illegal characters in filter string '#{filter}'. Filters can "\
1134
+ msg = "Illegal characters in filter string '#{filter}'. Filters can " \
1133
1135
  "only include lowercase letters, numbers, underscores, and colons."
1134
1136
  raise Bolt::CLIError, msg
1135
1137
  end
data/lib/bolt/cli.rb CHANGED
@@ -197,7 +197,7 @@ module Bolt
197
197
  prev_cmd << " #{@argv[0]}" unless @argv.empty?
198
198
 
199
199
  message = <<~MSG
200
- 🎉 Welcome to Bolt #{VERSION}
200
+ 🎉 Welcome to OpenBolt #{VERSION}
201
201
  😌 We're here to help bring order to the chaos
202
202
  📖 Find our documentation at https://bolt.guide
203
203
  🙋 Ask a question in #bolt on https://slack.puppet.com/
@@ -294,8 +294,8 @@ module Bolt
294
294
  end
295
295
 
296
296
  if options[:action] == 'apply' && options[:leftovers].any?
297
- raise Bolt::CLIError, "Unknown argument(s) #{options[:leftovers].join(', ')}. "\
298
- "To apply multiple policies, provide a comma-separated list of "\
297
+ raise Bolt::CLIError, "Unknown argument(s) #{options[:leftovers].join(', ')}. " \
298
+ "To apply multiple policies, provide a comma-separated list of " \
299
299
  "policy names."
300
300
  end
301
301
 
@@ -310,7 +310,7 @@ module Bolt
310
310
 
311
311
  if options[:subcommand] == 'module' && options[:action] == 'install' && options[:object]
312
312
  command = Bolt::Util.powershell? ? 'Add-BoltModule -Module' : 'bolt module add'
313
- raise Bolt::CLIError, "Invalid argument '#{options[:object]}'. To add a new module to "\
313
+ raise Bolt::CLIError, "Invalid argument '#{options[:object]}'. To add a new module to " \
314
314
  "the project, run '#{command} #{options[:object]}'."
315
315
  end
316
316
 
@@ -827,6 +827,7 @@ module Bolt
827
827
  #
828
828
  private def parse_vars(vars)
829
829
  return unless vars
830
+
830
831
  Hash[vars.map { |a| a.split('=', 2) }]
831
832
  end
832
833
 
@@ -880,7 +881,7 @@ module Bolt
880
881
  #
881
882
  private def validate_ps_version
882
883
  if Bolt::Util.powershell?
883
- command = "powershell.exe -NoProfile -NonInteractive -NoLogo -ExecutionPolicy "\
884
+ command = "powershell.exe -NoProfile -NonInteractive -NoLogo -ExecutionPolicy " \
884
885
  "Bypass -Command $PSVersionTable.PSVersion.Major"
885
886
  stdout, _stderr, _status = Open3.capture3(command)
886
887
 
@@ -935,7 +936,7 @@ module Bolt
935
936
  private def with_signal_handling
936
937
  handler = Signal.trap :INT do |signo|
937
938
  Bolt::Logger.logger(self).info(
938
- "Exiting after receiving SIG#{Signal.signame(signo)} signal. "\
939
+ "Exiting after receiving SIG#{Signal.signame(signo)} signal. " \
939
940
  "There might be processes left executing on some targets."
940
941
  )
941
942
  exit!