lib/bolt/bolt_option_parser.rb in bolt-2.23.0 vs lib/bolt/bolt_option_parser.rb in bolt-2.24.0
- old
+ new
@@ -59,10 +59,13 @@
banner: GROUP_SHOW_HELP }
else
{ flags: OPTIONS[:global],
banner: GROUP_HELP }
end
+ when 'guide'
+ { flags: OPTIONS[:global] + %w[format],
+ banner: GUIDE_HELP }
when 'plan'
case action
when 'convert'
{ flags: OPTIONS[:global] + OPTIONS[:global_config_setters],
banner: PLAN_CONVERT_HELP }
@@ -83,11 +86,11 @@
case action
when 'init'
{ flags: OPTIONS[:global] + %w[modules],
banner: PROJECT_INIT_HELP }
when 'migrate'
- { flags: OPTIONS[:global] + %w[inventoryfile boltdir configfile],
+ { flags: OPTIONS[:global] + %w[inventoryfile project configfile],
banner: PROJECT_MIGRATE_HELP }
else
{ flags: OPTIONS[:global],
banner: PROJECT_HELP }
end
@@ -162,17 +165,21 @@
SUBCOMMANDS
apply Apply Puppet manifest code
command Run a command remotely
file Copy files between the controller and targets
group Show the list of groups in the inventory
+ guide View guides for Bolt concepts and features
inventory Show the list of targets an action would run on
plan Convert, create, show, and run Bolt plans
project Create and migrate Bolt projects
puppetfile Install and list modules and generate type references
script Upload a local script and run it remotely
secret Create encryption keys and encrypt and decrypt values
task Show and run Bolt tasks
+
+ GUIDES
+ For a list of guides on Bolt's concepts and features, run 'bolt guide'.
HELP
APPLY_HELP = <<~HELP
NAME
apply
@@ -287,10 +294,30 @@
DESCRIPTION
Show the list of groups in the inventory.
HELP
+ GUIDE_HELP = <<~HELP
+ NAME
+ guide
+
+ USAGE
+ bolt guide [topic] [options]
+
+ DESCRIPTION
+ View guides for Bolt's concepts and features.
+
+ Omitting a topic will display a list of available guides,
+ while providing a topic will display the relevant guide.
+
+ EXAMPLES
+ View a list of available guides
+ bolt guide
+ View the 'project' guide page
+ bolt guide project
+ HELP
+
INVENTORY_HELP = <<~HELP
NAME
inventory
USAGE
@@ -442,14 +469,11 @@
USAGE
bolt project migrate [options]
DESCRIPTION
- Migrate a Bolt project to the latest version.
-
- Loads a Bolt project's inventory file and migrates it to the latest version. The
- inventory file is modified in place and will not preserve comments or formatting.
+ Migrate a Bolt project to use current best practices and the latest version of configuration files.
HELP
PUPPETFILE_HELP = <<~HELP
NAME
puppetfile
@@ -861,10 +885,10 @@
msg = "Command line option '--debug' is deprecated, set '--log-level debug' instead."
@deprecations << { type: 'Using --debug instead of --log-level debug', msg: msg }
end
define('--log-level LEVEL',
"Set the log level for the console. Available options are",
- "debug, info, notice, warn, error, fatal, any.") do |level|
+ "trace, debug, info, warn, error, fatal, any.") do |level|
@options[:log] = { 'console' => { 'level' => level } }
end
define('--plugin PLUGIN', 'Select the plugin to use') do |plug|
@options[:plugin] = plug
end