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

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

Class Method Summary collapse

Class Method Details

.commandObject



110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# File 'lib/r10k/cli/deploy.rb', line 110

def self.command
  @cmd ||= Cri::Command.define do
    name  'display'
    usage 'display'
    summary 'Display environments and modules in the deployment'

    flag :p, :puppetfile, 'Display Puppetfile modules'

    run do |opts, args, cmd|
      deploy = R10K::Deployment.load_config(opts[:config])

      task = R10K::Task::Deployment::Display.new(deploy)
      task.puppetfile = opts[:puppetfile]

      runner = R10K::TaskRunner.new(:trace => opts[:trace])
      runner.prepend_task task
      runner.run

      exit runner.exit_value
    end
  end
end