Module: R10K::CLI::Deploy::Module

Defined in:
lib/r10k/cli/deploy.rb

Class Method Summary collapse

Class Method Details

.commandObject



77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# File 'lib/r10k/cli/deploy.rb', line 77

def self.command
  @cmd ||= Cri::Command.define do
    name  'module'
    usage 'module [module] <module ...>'
    summary 'Deploy modules in all environments'

    description "`r10k deploy module` Deploys and updates modules inside of Puppet environments.\nIt will load the Puppetfile configurations out of all environments, and will\ntry to deploy the given module names in all environments.\n    DESCRIPTION\n\n    required :e, :environment, 'Update the modules in the given environment'\n\n    run do |opts, args, cmd|\n      deploy = R10K::Deployment.load_config(opts[:config])\n\n      task = R10K::Task::Deployment::DeployModules.new(deploy)\n      task.module_names = args\n      task.environment_names = [opts[:environment]] if opts[:environment]\n\n      runner = R10K::TaskRunner.new(:trace => opts[:trace])\n      runner.append_task task\n      runner.run\n\n      exit runner.exit_value\n    end\n  end\nend\n"