Class: R10K::Task::Puppetfile::Purge Deprecated
- Defined in:
- lib/r10k/task/puppetfile.rb
Overview
Deprecated.
Constant Summary
Constants included from Logging
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(puppetfile) ⇒ Purge
constructor
A new instance of Purge.
Methods included from Logging
formatter, included, level, level=, levels, #logger, #logger_name, outputter, parse_level
Constructor Details
#initialize(puppetfile) ⇒ Purge
Returns a new instance of Purge.
80 81 82 |
# File 'lib/r10k/task/puppetfile.rb', line 80 def initialize(puppetfile) @puppetfile = puppetfile end |
Instance Method Details
#call ⇒ Object
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/r10k/task/puppetfile.rb', line 84 def call moduledir = @puppetfile.moduledir @puppetfile.load stale_mods = @puppetfile.stale_contents if stale_mods.empty? logger.debug "No stale modules in #{moduledir}" else logger.info "Purging stale modules from #{moduledir}" logger.debug "Stale modules in #{moduledir}: #{stale_mods.join(', ')}" @puppetfile.purge! end end |