bolt 2.40.1 → 3.0.1

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 (65) hide show
  1. checksums.yaml +4 -4
  2. data/Puppetfile +17 -17
  3. data/bolt-modules/boltlib/lib/puppet/functions/apply_prep.rb +25 -0
  4. data/bolt-modules/boltlib/lib/puppet/functions/parallelize.rb +6 -8
  5. data/bolt-modules/boltlib/lib/puppet/functions/wait_until_available.rb +7 -3
  6. data/lib/bolt/analytics.rb +3 -2
  7. data/lib/bolt/applicator.rb +11 -1
  8. data/lib/bolt/bolt_option_parser.rb +3 -113
  9. data/lib/bolt/catalog.rb +10 -29
  10. data/lib/bolt/cli.rb +58 -157
  11. data/lib/bolt/config.rb +62 -239
  12. data/lib/bolt/config/options.rb +58 -97
  13. data/lib/bolt/config/transport/local.rb +1 -0
  14. data/lib/bolt/config/transport/options.rb +8 -1
  15. data/lib/bolt/config/transport/orch.rb +1 -0
  16. data/lib/bolt/executor.rb +15 -5
  17. data/lib/bolt/inventory.rb +3 -2
  18. data/lib/bolt/inventory/group.rb +35 -4
  19. data/lib/bolt/inventory/inventory.rb +1 -1
  20. data/lib/bolt/logger.rb +115 -11
  21. data/lib/bolt/module.rb +10 -2
  22. data/lib/bolt/module_installer.rb +4 -2
  23. data/lib/bolt/module_installer/resolver.rb +65 -12
  24. data/lib/bolt/module_installer/specs/forge_spec.rb +8 -2
  25. data/lib/bolt/module_installer/specs/git_spec.rb +17 -2
  26. data/lib/bolt/outputter/human.rb +9 -5
  27. data/lib/bolt/outputter/json.rb +16 -16
  28. data/lib/bolt/outputter/rainbow.rb +3 -3
  29. data/lib/bolt/pal.rb +93 -14
  30. data/lib/bolt/pal/yaml_plan.rb +8 -2
  31. data/lib/bolt/pal/yaml_plan/evaluator.rb +7 -19
  32. data/lib/bolt/pal/yaml_plan/step.rb +3 -24
  33. data/lib/bolt/pal/yaml_plan/step/upload.rb +2 -2
  34. data/lib/bolt/pal/yaml_plan/transpiler.rb +6 -1
  35. data/lib/bolt/plugin.rb +3 -3
  36. data/lib/bolt/plugin/cache.rb +7 -7
  37. data/lib/bolt/plugin/module.rb +0 -23
  38. data/lib/bolt/plugin/puppet_connect_data.rb +77 -0
  39. data/lib/bolt/plugin/puppetdb.rb +1 -1
  40. data/lib/bolt/project.rb +54 -81
  41. data/lib/bolt/project_manager.rb +4 -3
  42. data/lib/bolt/project_manager/module_migrator.rb +6 -5
  43. data/lib/bolt/rerun.rb +1 -1
  44. data/lib/bolt/shell/bash.rb +1 -1
  45. data/lib/bolt/shell/bash/tmpdir.rb +4 -1
  46. data/lib/bolt/shell/powershell.rb +3 -4
  47. data/lib/bolt/shell/powershell/snippets.rb +9 -149
  48. data/lib/bolt/task.rb +1 -1
  49. data/lib/bolt/transport/docker/connection.rb +2 -2
  50. data/lib/bolt/transport/local.rb +1 -9
  51. data/lib/bolt/transport/orch/connection.rb +1 -1
  52. data/lib/bolt/transport/ssh.rb +1 -2
  53. data/lib/bolt/transport/ssh/connection.rb +1 -1
  54. data/lib/bolt/validator.rb +2 -2
  55. data/lib/bolt/version.rb +1 -1
  56. data/lib/bolt_server/config.rb +1 -1
  57. data/lib/bolt_server/schemas/partials/task.json +1 -1
  58. data/lib/bolt_server/transport_app.rb +3 -2
  59. data/libexec/bolt_catalog +1 -1
  60. data/modules/aggregate/plans/count.pp +21 -0
  61. data/modules/aggregate/plans/targets.pp +21 -0
  62. data/modules/puppet_connect/plans/test_input_data.pp +31 -0
  63. data/modules/puppetdb_fact/plans/init.pp +10 -0
  64. metadata +27 -18
  65. data/modules/aggregate/plans/nodes.pp +0 -36
@@ -1,36 +0,0 @@
1
- plan aggregate::nodes(
2
- Optional[String[0]] $task = undef,
3
- Optional[String[0]] $command = undef,
4
- Optional[String[0]] $script = undef,
5
- TargetSpec $nodes,
6
- Hash[String, Data] $params = {}
7
- ) {
8
-
9
- # Validation
10
- $type_count = [$task, $command, $script].reduce(0) |$acc, $v| {
11
- if ($v) {
12
- $acc + 1
13
- } else {
14
- $acc
15
- }
16
- }
17
-
18
- if ($type_count == 0) {
19
- fail_plan("Must specify a command, script, or task to run", 'aggregate/invalid-params')
20
- }
21
-
22
- if ($type_count > 1) {
23
- fail_plan("Must specify only one command, script, or task to run", 'aggregate/invalid-params')
24
- }
25
-
26
- $res = if ($task) {
27
- run_task($task, $nodes, $params)
28
- } elsif ($command) {
29
- run_command($command, $nodes, $params)
30
- } elsif ($script) {
31
- run_script($script, $nodes, $params)
32
- }
33
-
34
- return aggregate::nodes($res)
35
- }
36
-