lib/bolt/bolt_option_parser.rb in bolt-2.29.0 vs lib/bolt/bolt_option_parser.rb in bolt-2.30.0

- old
+ new

@@ -64,19 +64,22 @@ when 'guide' { flags: OPTIONS[:global] + %w[format], banner: GUIDE_HELP } when 'module' case action + when 'add' + { flags: OPTIONS[:global] + %w[configfile project], + banner: MODULE_ADD_HELP } + when 'generate-types' + { flags: OPTIONS[:global] + OPTIONS[:global_config_setters], + banner: MODULE_GENERATETYPES_HELP } when 'install' - { flags: OPTIONS[:global] + %w[configfile force project], + { flags: OPTIONS[:global] + %w[configfile force project resolve], banner: MODULE_INSTALL_HELP } when 'show' { flags: OPTIONS[:global] + OPTIONS[:global_config_setters], banner: MODULE_SHOW_HELP } - when 'generate-types' - { flags: OPTIONS[:global] + OPTIONS[:global_config_setters], - banner: MODULE_GENERATETYPES_HELP } else { flags: OPTIONS[:global], banner: MODULE_HELP } end when 'plan' @@ -182,10 +185,11 @@ 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 + module Manage Bolt project modules 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 @@ -362,31 +366,38 @@ USAGE bolt module <action> [options] DESCRIPTION - Install and list modules and generate type references + Manage Bolt project modules + The module command is only supported when a project is configured + with the 'modules' key. + ACTIONS + add Add a module to the project generate-types Generate type references to register in plans install Install the project's modules show List modules available to the Bolt project HELP - MODULE_INSTALL_HELP = <<~HELP + MODULE_ADD_HELP = <<~HELP NAME - install + add USAGE - bolt module install [options] + bolt module add <module> [options] DESCRIPTION - Install the project's modules. + Add a module to the project. Module declarations are loaded from the project's configuration file. Bolt will automatically resolve all module dependencies, generate a Puppetfile, and install the modules. + + The module command is only supported when a project is configured + with the 'modules' key. HELP MODULE_GENERATETYPES_HELP = <<~HELP NAME generate-types @@ -394,21 +405,42 @@ USAGE bolt module generate-types [options] DESCRIPTION Generate type references to register in plans. + + The module command is only supported when a project is configured + with the 'modules' key. HELP + MODULE_INSTALL_HELP = <<~HELP + NAME + install + + USAGE + bolt module install [options] + + DESCRIPTION + Install the project's modules. + + Module declarations are loaded from the project's configuration + file. Bolt will automatically resolve all module dependencies, + generate a Puppetfile, and install the modules. + HELP + MODULE_SHOW_HELP = <<~HELP NAME show USAGE bolt module show [options] DESCRIPTION List modules available to the Bolt project. + + The module command is only supported when a project is configured + with the 'modules' key. HELP PLAN_HELP = <<~HELP NAME plan @@ -902,9 +934,16 @@ define('--[no-]tty', 'Request a pseudo TTY on targets that support it') do |tty| @options[:tty] = tty end define('--tmpdir DIR', 'The directory to upload and execute temporary files on the target') do |tmpdir| @options[:tmpdir] = tmpdir + end + + separator "\nMODULE OPTIONS" + define('--[no-]resolve', + 'Use --no-resolve to install modules listed in the Puppetfile without resolving modules configured', + 'in Bolt project configuration') do |resolve| + @options[:resolve] = resolve end separator "\nDISPLAY OPTIONS" define('--filter FILTER', 'Filter tasks and plans by a matching substring') do |filter| unless /^[a-z0-9_:]+$/.match(filter)