lib/bolt/bolt_option_parser.rb in bolt-2.2.0 vs lib/bolt/bolt_option_parser.rb in bolt-2.3.0

- old
+ new

@@ -74,11 +74,11 @@ banner: PLAN_HELP } end when 'project' case action when 'init' - { flags: OPTIONS[:global], + { flags: OPTIONS[:global] + %w[modules], banner: PROJECT_INIT_HELP } when 'migrate' { flags: OPTIONS[:global] + %w[inventoryfile boltdir configfile], banner: PROJECT_MIGRATE_HELP } else @@ -389,10 +389,12 @@ EXAMPLES Create a new Bolt project in the current working directory. bolt project init Create a new Bolt project at a specified path. bolt project init ~/path/to/project + Create a new Bolt project with existing modules. + bolt project init --modules puppetlabs-apt,puppetlabs-ntp HELP PROJECT_MIGRATE_HELP = <<~HELP NAME migrate @@ -759,9 +761,16 @@ define('-v', '--[no-]verbose', 'Display verbose logging') do |value| @options[:verbose] = value end define('--trace', 'Display error stack traces') do |_| @options[:trace] = true + end + + separator "\nADDITIONAL OPTIONS" + define('--modules MODULES', + 'A comma-separated list of modules to install from the Puppet Forge', + 'when initializing a project. Resolves and installs all dependencies.') do |modules| + @options[:modules] = modules.split(',') end separator "\nGLOBAL OPTIONS" define('-h', '--help', 'Display help') do |_| @options[:help] = true