lib/r10k/cli/deploy.rb in r10k-1.2.4 vs lib/r10k/cli/deploy.rb in r10k-1.3.0rc1
- old
+ new
@@ -49,10 +49,14 @@
on modules specified in the Puppetfile and an update will be automatically
scheduled. On subsequent deployments, Puppetfile deployment will default to off.
DESCRIPTION
flag :p, :puppetfile, 'Deploy modules from a puppetfile'
+ flag :h, :help, 'Show help for this command' do |value, cmd|
+ puts cmd.help
+ exit 0
+ end
run do |opts, args, cmd|
deploy = R10K::Deployment.load_config(opts[:config])
task = R10K::Task::Deployment::DeployEnvironments.new(deploy)
@@ -84,15 +88,22 @@
`r10k deploy module` Deploys and updates modules inside of Puppet environments.
It will load the Puppetfile configurations out of all environments, and will
try to deploy the given module names in all environments.
DESCRIPTION
+ flag :h, :help, 'Show help for this command' do |value, cmd|
+ puts cmd.help
+ exit 0
+ end
+ required :e, :environment, 'Update the modules in the given environment'
+
run do |opts, args, cmd|
deploy = R10K::Deployment.load_config(opts[:config])
task = R10K::Task::Deployment::DeployModules.new(deploy)
task.module_names = args
+ task.environment_names = [opts[:environment]] if opts[:environment]
runner = R10K::TaskRunner.new(:trace => opts[:trace])
runner.append_task task
runner.run
@@ -109,9 +120,13 @@
name 'display'
usage 'display'
summary 'Display environments and modules in the deployment'
flag :p, :puppetfile, 'Display Puppetfile modules'
+ flag :h, :help, 'Show help for this command' do |value, cmd|
+ puts cmd.help
+ exit 0
+ end
run do |opts, args, cmd|
deploy = R10K::Deployment.load_config(opts[:config])
task = R10K::Task::Deployment::Display.new(deploy)