openbolt 9.0.0.pre.rc1 → 9.0.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 (51) hide show
  1. checksums.yaml +4 -4
  2. data/Puppetfile +5 -5
  3. data/bolt-modules/boltlib/lib/puppet/datatypes/result.rb +1 -1
  4. data/bolt-modules/boltlib/lib/puppet/datatypes/resultset.rb +2 -2
  5. data/bolt-modules/boltlib/lib/puppet/datatypes/target.rb +2 -2
  6. data/bolt-modules/boltlib/lib/puppet/functions/apply_prep.rb +2 -2
  7. data/bolt-modules/boltlib/lib/puppet/functions/background.rb +1 -1
  8. data/bolt-modules/boltlib/lib/puppet/functions/fail_plan.rb +1 -1
  9. data/bolt-modules/boltlib/lib/puppet/functions/get_resources.rb +1 -1
  10. data/bolt-modules/boltlib/lib/puppet/functions/puppetdb_command.rb +1 -1
  11. data/bolt-modules/boltlib/lib/puppet/functions/puppetdb_query.rb +1 -1
  12. data/bolt-modules/boltlib/lib/puppet/functions/run_plan.rb +27 -4
  13. data/bolt-modules/boltlib/lib/puppet/functions/wait.rb +2 -2
  14. data/bolt-modules/file/lib/puppet/functions/file/delete.rb +1 -1
  15. data/bolt-modules/file/lib/puppet/functions/file/exists.rb +1 -1
  16. data/bolt-modules/file/lib/puppet/functions/file/read.rb +1 -1
  17. data/bolt-modules/file/lib/puppet/functions/file/readable.rb +1 -1
  18. data/bolt-modules/file/lib/puppet/functions/file/write.rb +1 -1
  19. data/bolt-modules/log/lib/puppet/functions/log/debug.rb +1 -1
  20. data/bolt-modules/log/lib/puppet/functions/log/error.rb +1 -1
  21. data/bolt-modules/log/lib/puppet/functions/log/fatal.rb +1 -1
  22. data/bolt-modules/log/lib/puppet/functions/log/info.rb +1 -1
  23. data/bolt-modules/log/lib/puppet/functions/log/trace.rb +1 -1
  24. data/bolt-modules/log/lib/puppet/functions/log/warn.rb +1 -1
  25. data/guides/targets.yaml +2 -0
  26. data/lib/bolt/bolt_option_parser.rb +53 -53
  27. data/lib/bolt/cli.rb +21 -2
  28. data/lib/bolt/config/options.rb +18 -18
  29. data/lib/bolt/config/transport/choria.rb +3 -0
  30. data/lib/bolt/config/transport/options.rb +34 -11
  31. data/lib/bolt/executor.rb +4 -0
  32. data/lib/bolt/fiber_executor.rb +46 -2
  33. data/lib/bolt/inventory/options.rb +1 -1
  34. data/lib/bolt/plan_future.rb +5 -1
  35. data/lib/bolt/shell/bash.rb +5 -3
  36. data/lib/bolt/shell/powershell/snippets.rb +20 -1
  37. data/lib/bolt/shell/powershell.rb +2 -2
  38. data/lib/bolt/transport/base.rb +9 -4
  39. data/lib/bolt/transport/choria/agent_discovery.rb +32 -14
  40. data/lib/bolt/transport/choria/bolt_tasks.rb +64 -40
  41. data/lib/bolt/transport/choria/client.rb +66 -49
  42. data/lib/bolt/transport/choria/command_builders.rb +144 -24
  43. data/lib/bolt/transport/choria/file_transfer.rb +134 -0
  44. data/lib/bolt/transport/choria/helpers.rb +25 -20
  45. data/lib/bolt/transport/choria/shell.rb +255 -148
  46. data/lib/bolt/transport/choria.rb +96 -27
  47. data/lib/bolt/util.rb +13 -0
  48. data/lib/bolt/version.rb +1 -1
  49. data/lib/bolt_spec/plans/mock_executor.rb +4 -0
  50. data/libexec/apply_catalog.rb +3 -0
  51. metadata +5 -4
@@ -216,21 +216,21 @@ module Bolt
216
216
  command Run a command remotely
217
217
  file Copy files between the controller and targets
218
218
  group Show the list of groups in the inventory
219
- guide View guides for Bolt concepts and features
219
+ guide View guides for OpenBolt concepts and features
220
220
  inventory Show the list of targets an action would run on
221
- module Manage Bolt project modules
221
+ module Manage OpenBolt project modules
222
222
  lookup Look up a value with Hiera
223
- plan Convert, create, show, and run Bolt plans
223
+ plan Convert, create, show, and run plans
224
224
  plugin Show available plugins
225
225
  policy Apply, create, and show policies
226
- project Create and migrate Bolt projects
226
+ project Create and migrate OpenBolt projects
227
227
  script Upload a local script and run it remotely
228
228
  secret Create encryption keys and encrypt and decrypt values
229
- task Show and run Bolt tasks
229
+ task Show and run tasks
230
230
 
231
231
  #{colorize(:cyan, 'Guides')}
232
- For a list of guides on Bolt's concepts and features, run 'bolt guide'.
233
- Find Bolt's documentation at https://bolt.guide.
232
+ For a list of guides on OpenBolt's concepts and features, run 'bolt guide'.
233
+ Find OpenBolt's documentation at https://docs.openvoxproject.org/openbolt/latest/.
234
234
  HELP
235
235
 
236
236
  APPLY_HELP = <<~HELP
@@ -385,7 +385,7 @@ module Bolt
385
385
  bolt guide [topic] [options]
386
386
 
387
387
  #{colorize(:cyan, 'Description')}
388
- View guides for Bolt's concepts and features.
388
+ View guides for OpenBolt's concepts and features.
389
389
 
390
390
  Omitting a topic will display a list of available guides,
391
391
  while providing a topic will display the relevant guide.
@@ -445,7 +445,7 @@ module Bolt
445
445
  Look up a value with Hiera.
446
446
 
447
447
  #{colorize(:cyan, 'Documentation')}
448
- Learn more about using Hiera with Bolt at https://docs.openvoxproject.org/openbolt/latest/hiera.html.
448
+ Learn more about using Hiera with OpenBolt at https://docs.openvoxproject.org/openbolt/latest/hiera.html.
449
449
 
450
450
  #{colorize(:cyan, 'Examples')}
451
451
  bolt lookup password --targets servers
@@ -460,16 +460,16 @@ module Bolt
460
460
  bolt module <action> [options]
461
461
 
462
462
  #{colorize(:cyan, 'Description')}
463
- Manage Bolt project modules.
463
+ Manage OpenBolt project modules.
464
464
 
465
465
  #{colorize(:cyan, 'Documentation')}
466
- To learn more about Bolt modules run 'bolt guide module'.
466
+ To learn more about modules, run 'bolt guide module'.
467
467
 
468
468
  #{colorize(:cyan, 'Actions')}
469
469
  add Add a module to the project
470
470
  generate-types Generate type references to register in plans
471
471
  install Install the project's modules
472
- show List modules available to the Bolt project
472
+ show List modules available to the OpenBolt project
473
473
  HELP
474
474
 
475
475
  MODULE_ADD_HELP = <<~HELP
@@ -483,11 +483,11 @@ module Bolt
483
483
  Add a module to the project.
484
484
 
485
485
  Module declarations are loaded from the project's configuration
486
- file. Bolt will automatically resolve all module dependencies,
486
+ file. OpenBolt will automatically resolve all module dependencies,
487
487
  generate a Puppetfile, and install the modules.
488
488
 
489
489
  #{colorize(:cyan, 'Documentation')}
490
- To learn more about Bolt modules, run 'bolt guide module'.
490
+ To learn more about modules, run 'bolt guide module'.
491
491
  HELP
492
492
 
493
493
  MODULE_GENERATETYPES_HELP = <<~HELP
@@ -499,10 +499,10 @@ module Bolt
499
499
 
500
500
  #{colorize(:cyan, 'Description')}
501
501
  Generate type references to register in plans. To learn more about
502
- Bolt modules, run 'bolt guide module'.
502
+ modules, run 'bolt guide module'.
503
503
 
504
504
  #{colorize(:cyan, 'Documentation')}
505
- To learn more about Bolt modules, run 'bolt guide module'.
505
+ To learn more about modules, run 'bolt guide module'.
506
506
  HELP
507
507
 
508
508
  MODULE_INSTALL_HELP = <<~HELP
@@ -516,11 +516,11 @@ module Bolt
516
516
  Install the project's modules.
517
517
 
518
518
  Module declarations are loaded from the project's configuration
519
- file. Bolt will automatically resolve all module dependencies,
519
+ file. OpenBolt will automatically resolve all module dependencies,
520
520
  generate a Puppetfile, and install the modules.
521
521
 
522
522
  #{colorize(:cyan, 'Documentation')}
523
- To learn more about Bolt modules, run 'bolt guide module'.
523
+ To learn more about modules, run 'bolt guide module'.
524
524
  HELP
525
525
 
526
526
  MODULE_SHOW_HELP = <<~HELP
@@ -531,13 +531,13 @@ module Bolt
531
531
  bolt module show [module name] [options]
532
532
 
533
533
  #{colorize(:cyan, 'Description')}
534
- List modules available to the Bolt project.
534
+ List modules available to the OpenBolt project.
535
535
 
536
536
  Providing the name of a module will display detailed documentation for
537
537
  the module.
538
538
 
539
539
  #{colorize(:cyan, 'Documentation')}
540
- To learn more about Bolt modules, run 'bolt guide module'.
540
+ To learn more about modules, run 'bolt guide module'.
541
541
  HELP
542
542
 
543
543
  PLAN_HELP = <<~HELP
@@ -548,13 +548,13 @@ module Bolt
548
548
  bolt plan <action> [options]
549
549
 
550
550
  #{colorize(:cyan, 'Description')}
551
- Convert, create, show, and run Bolt plans.
551
+ Convert, create, show, and run plans.
552
552
 
553
553
  #{colorize(:cyan, 'Documentation')}
554
- Learn more about Bolt plans at https://docs.openvoxproject.org/openbolt/latest/plans.html.
554
+ Learn more about plans at https://docs.openvoxproject.org/openbolt/latest/plans.html.
555
555
 
556
556
  #{colorize(:cyan, 'Actions')}
557
- convert Convert a YAML plan to a Bolt plan
557
+ convert Convert a YAML plan to a Puppet language plan
558
558
  new Create a new plan in the current project
559
559
  run Run a plan on the specified targets
560
560
  show Show available plans and plan documentation
@@ -576,7 +576,7 @@ module Bolt
576
576
  functionality. Note that the converted plan is not written to a file.
577
577
 
578
578
  #{colorize(:cyan, 'Documentation')}
579
- Learn more about Bolt plans at https://docs.openvoxproject.org/openbolt/latest/plans.html.
579
+ Learn more about plans at https://docs.openvoxproject.org/openbolt/latest/plans.html.
580
580
 
581
581
  #{colorize(:cyan, 'Examples')}
582
582
  bolt plan convert myproject::myplan
@@ -594,7 +594,7 @@ module Bolt
594
594
  Create a new plan in the current project.
595
595
 
596
596
  #{colorize(:cyan, 'Documentation')}
597
- Learn more about Bolt plans at https://docs.openvoxproject.org/openbolt/latest/plans.html.
597
+ Learn more about plans at https://docs.openvoxproject.org/openbolt/latest/plans.html.
598
598
 
599
599
  #{colorize(:cyan, 'Examples')}
600
600
  bolt plan new myproject::myplan
@@ -611,7 +611,7 @@ module Bolt
611
611
  Run a plan on the specified targets.
612
612
 
613
613
  #{colorize(:cyan, 'Documentation')}
614
- Learn more about Bolt plans at https://docs.openvoxproject.org/openbolt/latest/plans.html.
614
+ Learn more about plans at https://docs.openvoxproject.org/openbolt/latest/plans.html.
615
615
 
616
616
  #{colorize(:cyan, 'Examples')}
617
617
  bolt plan run canary --targets target1,target2 command=hostname
@@ -628,13 +628,13 @@ module Bolt
628
628
  Show available plans and plan documentation.
629
629
 
630
630
  Omitting the name of a plan will display a list of plans available
631
- in the Bolt project.
631
+ in the OpenBolt project.
632
632
 
633
633
  Providing the name of a plan will display detailed documentation for
634
634
  the plan, including a list of available parameters.
635
635
 
636
636
  #{colorize(:cyan, 'Documentation')}
637
- Learn more about Bolt plans at https://docs.openvoxproject.org/openbolt/latest/plans.html.
637
+ Learn more about plans at https://docs.openvoxproject.org/openbolt/latest/plans.html.
638
638
 
639
639
  #{colorize(:cyan, 'Examples')}
640
640
  Display a list of available plans
@@ -654,7 +654,7 @@ module Bolt
654
654
  Show available plugins.
655
655
 
656
656
  #{colorize(:cyan, 'Documentation')}
657
- Learn more about Bolt plugins at https://docs.openvoxproject.org/openbolt/latest/using_plugins.html.
657
+ Learn more about plugins at https://docs.openvoxproject.org/openbolt/latest/using_plugins.html.
658
658
 
659
659
  #{colorize(:cyan, 'Actions')}
660
660
  show Show available plugins
@@ -671,7 +671,7 @@ module Bolt
671
671
  Show available plugins.
672
672
 
673
673
  #{colorize(:cyan, 'Documentation')}
674
- Learn more about Bolt plugins at https://docs.openvoxproject.org/openbolt/latest/using_plugins.html.
674
+ Learn more about plugins at https://docs.openvoxproject.org/openbolt/latest/using_plugins.html.
675
675
  HELP
676
676
 
677
677
  POLICY_HELP = <<~HELP
@@ -731,14 +731,14 @@ module Bolt
731
731
  bolt project <action> [options]
732
732
 
733
733
  #{colorize(:cyan, 'Description')}
734
- Create and migrate Bolt projects
734
+ Create and migrate OpenBolt projects
735
735
 
736
736
  #{colorize(:cyan, 'Documentation')}
737
- To learn more about Bolt projects, run 'bolt guide project'.
737
+ To learn more about OpenBolt projects, run 'bolt guide project'.
738
738
 
739
739
  #{colorize(:cyan, 'Actions')}
740
- init Create a new Bolt project
741
- migrate Migrate a Bolt project to the latest version
740
+ init Create a new OpenBolt project
741
+ migrate Migrate an OpenBolt project to the latest version
742
742
  HELP
743
743
 
744
744
  PROJECT_INIT_HELP = <<~HELP
@@ -749,19 +749,19 @@ module Bolt
749
749
  bolt project init [name] [options]
750
750
 
751
751
  #{colorize(:cyan, 'Description')}
752
- Create a new Bolt project in the current working directory.
752
+ Create a new OpenBolt project in the current working directory.
753
753
 
754
- Specify a name for the Bolt project. Defaults to the basename of the current working directory.
754
+ Specify a name for the OpenBolt project. Defaults to the basename of the current working directory.
755
755
 
756
756
  #{colorize(:cyan, 'Documentation')}
757
- To learn more about Bolt projects, run 'bolt guide project'.
757
+ To learn more about OpenBolt projects, run 'bolt guide project'.
758
758
 
759
759
  #{colorize(:cyan, 'Examples')}
760
- Create a new Bolt project using the directory as the project name.
760
+ Create a new OpenBolt project using the directory as the project name.
761
761
  bolt project init
762
- Create a new Bolt project with a specified name.
762
+ Create a new OpenBolt project with a specified name.
763
763
  bolt project init myproject
764
- Create a new Bolt project with existing modules.
764
+ Create a new OpenBolt project with existing modules.
765
765
  bolt project init --modules puppetlabs-apt,puppetlabs-ntp
766
766
  HELP
767
767
 
@@ -773,11 +773,11 @@ module Bolt
773
773
  bolt project migrate [options]
774
774
 
775
775
  #{colorize(:cyan, 'Description')}
776
- Migrate a Bolt project to use current best practices and the latest version of
776
+ Migrate an OpenBolt project to use current best practices and the latest version of
777
777
  configuration files.
778
778
 
779
779
  #{colorize(:cyan, 'Documentation')}
780
- To learn more about Bolt projects, run 'bolt guide project'.
780
+ To learn more about OpenBolt projects, run 'bolt guide project'.
781
781
  HELP
782
782
 
783
783
  SCRIPT_HELP = <<~HELP
@@ -888,13 +888,13 @@ module Bolt
888
888
  bolt task <action> [options]
889
889
 
890
890
  #{colorize(:cyan, 'Description')}
891
- Show and run Bolt tasks.
891
+ Show and run tasks.
892
892
 
893
893
  #{colorize(:cyan, 'Documentation')}
894
- Learn more about Bolt tasks at https://docs.openvoxproject.org/openbolt/latest/tasks.html.
894
+ Learn more about tasks at https://docs.openvoxproject.org/openbolt/latest/tasks.html.
895
895
 
896
896
  #{colorize(:cyan, 'Actions')}
897
- run Run a Bolt task
897
+ run Run a task
898
898
  show Show available tasks and task documentation
899
899
  HELP
900
900
 
@@ -912,7 +912,7 @@ module Bolt
912
912
  Parameters take the form parameter=value.
913
913
 
914
914
  #{colorize(:cyan, 'Documentation')}
915
- Learn more about Bolt tasks at https://docs.openvoxproject.org/openbolt/latest/tasks.html.
915
+ Learn more about tasks at https://docs.openvoxproject.org/openbolt/latest/tasks.html.
916
916
 
917
917
  #{colorize(:cyan, 'Examples')}
918
918
  bolt task run package --targets target1,target2 action=status name=bash
@@ -929,13 +929,13 @@ module Bolt
929
929
  Show available tasks and task documentation.
930
930
 
931
931
  Omitting the name of a task will display a list of tasks available
932
- in the Bolt project.
932
+ in the OpenBolt project.
933
933
 
934
934
  Providing the name of a task will display detailed documentation for
935
935
  the task, including a list of available parameters.
936
936
 
937
937
  #{colorize(:cyan, 'Documentation')}
938
- Learn more about Bolt tasks at https://docs.openvoxproject.org/openbolt/latest/tasks.html.
938
+ Learn more about tasks at https://docs.openvoxproject.org/openbolt/latest/tasks.html.
939
939
 
940
940
  #{colorize(:cyan, 'Examples')}
941
941
  Display a list of available tasks
@@ -962,7 +962,7 @@ module Bolt
962
962
  "Available filters are 'all', 'failure', and 'success'.") do |rerun|
963
963
  @options[:rerun] = rerun
964
964
  end
965
- define('--noop', 'See what changes Bolt will make without actually executing the changes.') do |_|
965
+ define('--noop', 'See what changes OpenBolt will make without actually executing the changes.') do |_|
966
966
  @options[:noop] = true
967
967
  end
968
968
  define('--params PARAMETERS',
@@ -1034,7 +1034,7 @@ module Bolt
1034
1034
  @options[:cleanup] = cleanup
1035
1035
  end
1036
1036
  define('-m', '--modulepath MODULES',
1037
- "List of directories containing modules, separated by '#{File::PATH_SEPARATOR}'",
1037
+ "List of directories containing modules, separated by '#{File::PATH_SEPARATOR}'.",
1038
1038
  'Directories are case-sensitive.') do |modulepath|
1039
1039
  # When specified from the CLI, modulepath entries are relative to pwd
1040
1040
  @options[:modulepath] = modulepath.split(File::PATH_SEPARATOR).map do |moduledir|
@@ -1042,7 +1042,7 @@ module Bolt
1042
1042
  end
1043
1043
  end
1044
1044
  define('--project PATH',
1045
- 'Path to load the Bolt project from (default: autodiscovered from current dir).') do |path|
1045
+ 'Path to load the OpenBolt project from (default: autodiscovered from current dir).') do |path|
1046
1046
  @options[:project] = path
1047
1047
  end
1048
1048
  define('--hiera-config PATH',
@@ -1161,7 +1161,7 @@ module Bolt
1161
1161
  separator "\n#{self.class.colorize(:cyan, 'Module options')}"
1162
1162
  define('--[no-]resolve',
1163
1163
  'Use --no-resolve to install modules listed in the Puppetfile without resolving modules configured',
1164
- 'in Bolt project configuration.') do |resolve|
1164
+ 'in OpenBolt project configuration.') do |resolve|
1165
1165
  @options[:resolve] = resolve
1166
1166
  end
1167
1167
 
@@ -1210,7 +1210,7 @@ module Bolt
1210
1210
  end
1211
1211
  define('--stream',
1212
1212
  'Stream output from scripts and commands to the console.',
1213
- 'Run with --no-verbose to prevent Bolt from displaying output',
1213
+ 'Run with --no-verbose to prevent OpenBolt from displaying output',
1214
1214
  'a second time after the action is completed.') do |_|
1215
1215
  @options[:stream] = true
1216
1216
  end
data/lib/bolt/cli.rb CHANGED
@@ -675,7 +675,8 @@ module Bolt
675
675
  end
676
676
 
677
677
  # Process the target list by turning a PuppetDB query or rerun mode into a
678
- # list of target names.
678
+ # list of target names. Try to parse each options[:targets] entry as JSON
679
+ # Array/Hash, return the value as-is if failed.
679
680
  #
680
681
  # @param plugins [Bolt::Plugin] The Plugin instance.
681
682
  # @param rerun [Bolt::Rerun] The Rerun instance.
@@ -688,7 +689,25 @@ module Bolt
688
689
  elsif options[:rerun]
689
690
  rerun.get_targets(options[:rerun])
690
691
  elsif options[:targets]
691
- options[:targets]
692
+ options[:targets].map do |target|
693
+ parsed = JSON.parse(target)
694
+ case parsed
695
+ when Array
696
+ parsed
697
+ when Hash
698
+ items = parsed['items']
699
+ if items.is_a?(Array)
700
+ items.map { |item| item['target'] }
701
+ else
702
+ raise Bolt::Error.new("Expected a JSON array or an object with an 'items' array, got #{parsed.class}",
703
+ 'bolt/invalid-targets')
704
+ end
705
+ else
706
+ target
707
+ end
708
+ rescue JSON::ParserError
709
+ target
710
+ end
692
711
  end
693
712
  end
694
713
 
@@ -185,7 +185,7 @@ module Bolt
185
185
  },
186
186
  "disable-warnings" => {
187
187
  description: "An array of IDs of warnings to suppress. Warnings with a matching ID will not be logged " \
188
- "by Bolt. If you are upgrading Bolt to a new major version, you should re-enable all warnings " \
188
+ "by OpenBolt. If you are upgrading OpenBolt to a new major version, you should re-enable all warnings " \
189
189
  "until you have finished upgrading.",
190
190
  type: Array,
191
191
  items: {
@@ -203,7 +203,7 @@ module Bolt
203
203
  _default: "human"
204
204
  },
205
205
  "future" => {
206
- description: "Enable new Bolt features that may include breaking changes.",
206
+ description: "Enable new OpenBolt features that may include breaking changes.",
207
207
  type: Hash,
208
208
  properties: {
209
209
  "file_paths" => {
@@ -211,7 +211,7 @@ module Bolt
211
211
  type: [TrueClass, FalseClass],
212
212
  _example: true,
213
213
  _default: false,
214
- _deprecation: "Bolt no longer honors this option and enables loading scripts from the scripts " \
214
+ _deprecation: "OpenBolt no longer honors this option and enables loading scripts from the scripts " \
215
215
  "directory by default."
216
216
  },
217
217
  "script_interpreter" => {
@@ -258,9 +258,9 @@ module Bolt
258
258
  description: "A map of configuration for the logfile output. Under `log`, you can configure log options " \
259
259
  "for `console` and add configuration for individual log files, such as " \
260
260
  "`~/.puppetlabs/bolt/debug.log`. Individual log files must be valid filepaths. If the log " \
261
- "file does not exist, then Bolt will create it before logging information. Set the value to " \
261
+ "file does not exist, then OpenBolt will create it before logging information. Set the value to " \
262
262
  "`disable` to remove a log file defined at an earlier level of the config hierarchy. By " \
263
- "default, Bolt logs to a bolt-debug.log file in the Bolt project directory.",
263
+ "default, OpenBolt logs to a bolt-debug.log file in the OpenBolt project directory.",
264
264
  type: Hash,
265
265
  properties: {
266
266
  "console" => {
@@ -300,7 +300,7 @@ module Bolt
300
300
  "~/logs/debug.log" => { "append" => false, "level" => "debug" } }
301
301
  },
302
302
  "modulepath" => {
303
- description: "An array of directories that Bolt loads content such as plans and tasks from. Read more " \
303
+ description: "An array of directories that OpenBolt loads content such as plans and tasks from. Read more " \
304
304
  "about modules in [Module structure](module_structure.md).",
305
305
  type: [Array, String],
306
306
  items: {
@@ -311,7 +311,7 @@ module Bolt
311
311
  _default: ["project/modules"]
312
312
  },
313
313
  "module-install" => {
314
- description: "Options that configure where Bolt downloads modules from. This option is only used when " \
314
+ description: "Options that configure where OpenBolt downloads modules from. This option is only used when " \
315
315
  "installing modules using the `bolt module add|install` commands and " \
316
316
  "`Add|Install-BoltModule` cmdlets.",
317
317
  type: Hash,
@@ -359,7 +359,7 @@ module Bolt
359
359
  description: "A list of module dependencies for the project. Each dependency is a map of data specifying " \
360
360
  "the module to install. To install the project's module dependencies, run the `bolt module " \
361
361
  "install` command. For more information about specifying modules, see [the " \
362
- "documentation](https://docs.openvoxproject.org/openbolt/latest/bolt_installing_modules.html#manually-specify-modules-in-a-bolt-project).",
362
+ "documentation](bolt_installing_modules.md#manually-specify-modules-in-a-bolt-project).",
363
363
  type: Array,
364
364
  items: {
365
365
  type: [Hash, String],
@@ -417,8 +417,8 @@ module Bolt
417
417
  ]
418
418
  },
419
419
  "name" => {
420
- description: "The name of the Bolt project. When this option is configured, the project is considered a " \
421
- "[Bolt project](projects.md), allowing Bolt to load content from the project directory " \
420
+ description: "The name of the OpenBolt project. When this option is configured, the project is considered an " \
421
+ "[OpenBolt project](projects.md), allowing OpenBolt to load content from the project directory " \
422
422
  "as though it were a module.",
423
423
  type: String,
424
424
  _plugin: false,
@@ -427,7 +427,7 @@ module Bolt
427
427
  "plans" => {
428
428
  description: "A list of plan names and glob patterns to filter the project's plans by. This option is used " \
429
429
  "to limit the visibility of plans for users of the project. For example, project authors " \
430
- "might want to limit the visibility of plans that are bundled with Bolt or plans that should " \
430
+ "might want to limit the visibility of plans that are bundled with OpenBolt or plans that should " \
431
431
  "only be run as part of another plan. When this option is not configured, all plans are " \
432
432
  "visible. This option does not prevent users from running plans that are not part of this " \
433
433
  "list.",
@@ -467,7 +467,7 @@ module Bolt
467
467
  _example: ["myproject::apache", "myproject::postgres"]
468
468
  },
469
469
  "puppetdb" => {
470
- description: "A map containing options for [configuring the Bolt PuppetDB " \
470
+ description: "A map containing options for [configuring the OpenBolt PuppetDB " \
471
471
  "client](bolt_connect_puppetdb.md).",
472
472
  type: Hash,
473
473
  properties: PUPPETDB_OPTIONS,
@@ -476,7 +476,7 @@ module Bolt
476
476
  "puppetdb-instances" => {
477
477
  description: "A map of named PuppetDB instances and their configuration, where keys are the name " \
478
478
  "of a PuppetDB instance and values are maps of configuration options. For more " \
479
- "information, see [Connecting Bolt to PuppetDB](bolt_connect_puppetdb.md).",
479
+ "information, see [Connecting OpenBolt to OpenVoxDB](bolt_connect_puppetdb.md).",
480
480
  type: Hash,
481
481
  additionalProperties: {
482
482
  type: Hash,
@@ -492,7 +492,7 @@ module Bolt
492
492
  _plugin: true
493
493
  },
494
494
  "save-rerun" => {
495
- description: "Whether to update `.rerun.json` in the Bolt project directory. If " \
495
+ description: "Whether to update `.rerun.json` in the OpenBolt project directory. If " \
496
496
  "your target names include passwords, set this value to `false` to avoid " \
497
497
  "writing passwords to disk.",
498
498
  type: [TrueClass, FalseClass],
@@ -501,7 +501,7 @@ module Bolt
501
501
  _default: true
502
502
  },
503
503
  "spinner" => {
504
- description: "Whether to print a spinner to the console for long-running Bolt operations.",
504
+ description: "Whether to print a spinner to the console for long-running OpenBolt operations.",
505
505
  type: [TrueClass, FalseClass],
506
506
  _plugin: false,
507
507
  _example: false,
@@ -518,7 +518,7 @@ module Bolt
518
518
  "tasks" => {
519
519
  description: "A list of task names and glob patterns to filter the project's tasks by. This option is used " \
520
520
  "to limit the visibility of tasks for users of the project. For example, project authors " \
521
- "might want to limit the visibility of tasks that are bundled with Bolt or plans that should " \
521
+ "might want to limit the visibility of tasks that are bundled with OpenBolt or plans that should " \
522
522
  "only be run as part of a larger workflow. When this option is not configured, all tasks " \
523
523
  "are visible. This option does not prevent users from running tasks that are not part of " \
524
524
  "this list.",
@@ -530,8 +530,8 @@ module Bolt
530
530
  _example: ["myproject", "myproject::foo", "myproject::bar", "myproject::deploy_*"]
531
531
  },
532
532
  "trusted-external-command" => {
533
- description: "The path to an executable on the Bolt controller that can produce external trusted facts. " \
534
- "**External trusted facts are experimental in both Puppet and Bolt and this API might " \
533
+ description: "The path to an executable on the OpenBolt controller that can produce external trusted facts. " \
534
+ "**External trusted facts are experimental in both Puppet and OpenBolt and this API might " \
535
535
  "change or be removed.**",
536
536
  type: String,
537
537
  _plugin: false,
@@ -12,9 +12,11 @@ module Bolt
12
12
  collective
13
13
  command-timeout
14
14
  config-file
15
+ file-transfer-timeout
15
16
  host
16
17
  interpreters
17
18
  mcollective-certname
19
+ message-data-size
18
20
  broker-timeout
19
21
  brokers
20
22
  puppet-environment
@@ -25,6 +27,7 @@ module Bolt
25
27
  task-agent
26
28
  task-timeout
27
29
  tmpdir
30
+ upload-batch-size
28
31
  ].sort.freeze
29
32
 
30
33
  DEFAULTS = {
@@ -19,8 +19,8 @@ module Bolt
19
19
  "batch-mode" => {
20
20
  type: [TrueClass, FalseClass],
21
21
  description: "Whether to disable password querying. When set to `false`, SSH will fall back to " \
22
- "prompting for a password if key authentication fails. This might cause Bolt to hang. " \
23
- "To prevent Bolt from hanging, you can configure `ssh-command` to use an SSH utility " \
22
+ "prompting for a password if key authentication fails. This might cause OpenBolt to hang. " \
23
+ "To prevent OpenBolt from hanging, you can configure `ssh-command` to use an SSH utility " \
24
24
  "such as sshpass that supports providing a password non-interactively. For more " \
25
25
  "information, see [Providing a password non-interactively using " \
26
26
  "`native-ssh`](troubleshooting.md#providing-a-password-non-interactively-using-native-ssh).",
@@ -29,7 +29,7 @@ module Bolt
29
29
  _example: false
30
30
  },
31
31
  "bundled-ruby" => {
32
- description: "Whether to use the Ruby bundled with Bolt packages for local targets.",
32
+ description: "Whether to use the Ruby bundled with OpenBolt packages for local targets.",
33
33
  type: [TrueClass, FalseClass],
34
34
  _plugin: false,
35
35
  _example: true,
@@ -44,7 +44,7 @@ module Bolt
44
44
  "cleanup" => {
45
45
  type: [TrueClass, FalseClass],
46
46
  description: "Whether to clean up temporary files created on targets. When running commands on a target, " \
47
- "Bolt might create temporary files. After completing the command, these files are " \
47
+ "OpenBolt might create temporary files. After completing the command, these files are " \
48
48
  "automatically deleted. This value can be set to 'false' if you wish to leave these " \
49
49
  "temporary files on the target.",
50
50
  _plugin: true,
@@ -101,10 +101,33 @@ module Bolt
101
101
  _default: 30,
102
102
  _example: 60
103
103
  },
104
+ "file-transfer-timeout" => {
105
+ type: Integer,
106
+ description: "How long to wait in seconds for targets to respond to a file transfer request. Default is " \
107
+ "300, and the wait is never shorter than the agent's DDL timeout of 120 seconds.",
108
+ minimum: 1,
109
+ _plugin: true,
110
+ _example: 600
111
+ },
112
+ "message-data-size" => {
113
+ type: Integer,
114
+ description: "The file content in one Choria RPC message, in kibibytes, for uploads, downloads and " \
115
+ "directory listings. Default is 512, half the broker's 1 MiB message limit.",
116
+ minimum: 1,
117
+ _plugin: true,
118
+ _example: 256
119
+ },
120
+ "upload-batch-size" => {
121
+ type: Integer,
122
+ description: "How many targets one chunk request is published to at a time. Default is 256.",
123
+ minimum: 1,
124
+ _plugin: true,
125
+ _example: 100
126
+ },
104
127
  "connect-timeout" => {
105
128
  type: Integer,
106
129
  description: "How long to wait in seconds when establishing connections. Set this value higher if you " \
107
- "frequently encounter connection timeout errors when running Bolt.",
130
+ "frequently encounter connection timeout errors when running OpenBolt.",
108
131
  minimum: 1,
109
132
  _plugin: true,
110
133
  _default: 10,
@@ -112,7 +135,7 @@ module Bolt
112
135
  },
113
136
  "copy-command" => {
114
137
  type: [Array, String],
115
- description: "The command to use when copying files using native SSH. Bolt runs `<copy-command> <src> " \
138
+ description: "The command to use when copying files using native SSH. OpenBolt runs `<copy-command> <src> " \
116
139
  "<dest>`. This option is used when you need support for features or algorithms that are not " \
117
140
  "supported by the net-ssh Ruby library. **This option is experimental.** You can read more " \
118
141
  "about this option in [Native SSH transport](experimental_features.md#native-ssh-transport).",
@@ -203,7 +226,7 @@ module Bolt
203
226
  "override the shebang defined in a task executable. The extension can optionally be " \
204
227
  "specified with the `.` character (`.py` and `py` both map to a task executable " \
205
228
  "`task.py`) and the extension is case sensitive. When a target's name is `localhost`, " \
206
- "Ruby tasks run with the Bolt Ruby interpreter by default.",
229
+ "Ruby tasks run with the OpenBolt Ruby interpreter by default.",
207
230
  additionalProperties: {
208
231
  type: [String, Array],
209
232
  _plugin: false
@@ -239,7 +262,7 @@ module Bolt
239
262
  },
240
263
  "login-shell" => {
241
264
  type: String,
242
- description: "Which login shell Bolt should expect on the target. Supported shells are " \
265
+ description: "Which login shell OpenBolt should expect on the target. Supported shells are " \
243
266
  "#{LOGIN_SHELLS.join(', ')}. **This option is experimental.**",
244
267
  enum: LOGIN_SHELLS,
245
268
  _plugin: true,
@@ -354,9 +377,9 @@ module Bolt
354
377
  },
355
378
  "run-as-command" => {
356
379
  type: Array,
357
- description: "The command to elevate permissions. Bolt appends the user and command strings to the " \
358
- "configured `run-as-command` before running it on the target. This command must not require " \
359
- "aninteractive password prompt, and the `sudo-password` option is ignored when " \
380
+ description: "The command to elevate permissions. OpenBolt appends the user and command strings to the " \
381
+ "configured `run-as-command` before running it on the target. This command must not require " \
382
+ "an interactive password prompt, and the `sudo-password` option is ignored when " \
360
383
  "`run-as-command` is specified. The `run-as-command` must be specified as an array.",
361
384
  items: {
362
385
  type: String
data/lib/bolt/executor.rb CHANGED
@@ -401,6 +401,10 @@ module Bolt
401
401
  @fiber_executor.get_current_plan_id(fiber: fiber)
402
402
  end
403
403
 
404
+ def run_in_new_fiber(&block)
405
+ @fiber_executor.run_in_new_fiber(&block)
406
+ end
407
+
404
408
  def plan_complete?
405
409
  @fiber_executor.plan_complete?
406
410
  end