Class: R10K::Task::Puppetfile::DeployModules Deprecated
- Defined in:
- lib/r10k/task/puppetfile.rb
Overview
Deprecated.
Constant Summary
Constants included from Logging
Instance Attribute Summary collapse
-
#module_names ⇒ Object
Returns the value of attribute module_names.
Attributes inherited from Base
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(puppetfile) ⇒ DeployModules
constructor
A new instance of DeployModules.
Methods included from Logging
formatter, included, level, level=, levels, #logger, #logger_name, outputter, parse_level
Constructor Details
#initialize(puppetfile) ⇒ DeployModules
Returns a new instance of DeployModules.
34 35 36 |
# File 'lib/r10k/task/puppetfile.rb', line 34 def initialize(puppetfile) @puppetfile = puppetfile end |
Instance Attribute Details
#module_names ⇒ Object
Returns the value of attribute module_names.
32 33 34 |
# File 'lib/r10k/task/puppetfile.rb', line 32 def module_names @module_names end |
Instance Method Details
#call ⇒ Object
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/r10k/task/puppetfile.rb', line 38 def call logger.debug "Updating module list for Puppetfile #{@puppetfile.basedir}" @puppetfile.load load_modulemap! existing = @modulemap.keys warn_on_missing(existing, @module_names) to_deploy = existing & @module_names to_deploy.each do |mod_name| mod = @modulemap[mod_name] task = R10K::Task::Module::Sync.new(mod) task_runner.insert_task_after(self, task) end end |