Class: R10K::Task::Deployment::Display

Inherits:
Base
  • Object
show all
Defined in:
lib/r10k/task/deployment.rb

Constant Summary

Constants included from Logging

Logging::LOG_LEVELS

Instance Attribute Summary collapse

Attributes inherited from Base

#task_runner

Instance Method Summary collapse

Methods included from Logging

formatter, included, level, level=, levels, #logger, #logger_name, outputter, parse_level

Constructor Details

#initialize(deployment) ⇒ Display

Returns a new instance of Display.



133
134
135
# File 'lib/r10k/task/deployment.rb', line 133

def initialize(deployment)
  @deployment = deployment
end

Instance Attribute Details

#puppetfileObject

Returns the value of attribute puppetfile.



131
132
133
# File 'lib/r10k/task/deployment.rb', line 131

def puppetfile
  @puppetfile
end

Instance Method Details

#callObject



137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
# File 'lib/r10k/task/deployment.rb', line 137

def call
  @deployment.environments.each do |env|

    puts "  - #{env.dirname}"

    if @puppetfile
      puppetfile = env.puppetfile
      puppetfile.load

      puppetfile.modules.each do |mod|
        puts "    - #{mod.name} (#{mod.version})"
      end
    end
  end
end