class R10K::Action::Puppetfile::Install

Public Instance Methods

call() click to toggle source
# File lib/r10k/action/puppetfile/install.rb, line 11
def call
  @visit_ok = true
  pf = R10K::Puppetfile.new(@root, @moduledir, @puppetfile, nil , @force)
  pf.accept(self)
  @visit_ok
end

Private Instance Methods

allowed_initialize_opts() click to toggle source
# File lib/r10k/action/puppetfile/install.rb, line 39
def allowed_initialize_opts
  super.merge(root: :self, puppetfile: :self, moduledir: :self, force: :self )
end
visit_module(mod) click to toggle source
# File lib/r10k/action/puppetfile/install.rb, line 28
def visit_module(mod)
  @force ||= false
  logger.info _("Updating module %{mod_path}") % {mod_path: mod.path}

  if mod.respond_to?(:desired_ref) && mod.desired_ref == :control_branch
    logger.warn _("Cannot track control repo branch for content '%{name}' when not part of a 'deploy' action, will use default if available." % {name: mod.name})
  end

  mod.sync(force: @force)
end
visit_puppetfile(pf) { || ... } click to toggle source
# File lib/r10k/action/puppetfile/install.rb, line 22
def visit_puppetfile(pf)
  pf.load!
  yield
  pf.purge!
end