Sha256: 10100e23819cddc2e2dffe75a4a5e444be341d9955f7acedd860829ea936d65e

Contents?: true

Size: 962 Bytes

Versions: 15

Compression:

Stored size: 962 Bytes

Contents

require 'r10k/module'

# A dummy module type that can be used to "protect" Puppet modules that exist
# inside of the Puppetfile "moduledir" location. Local modules will not be
# modified, and will not be purged when r10k removes unmanaged modules.
class R10K::Module::Local < R10K::Module::Base

  R10K::Module.register(self)

  def self.implement?(name, args)
    args[:local] || args[:type].to_s == 'local'
  end

  def self.statically_defined_version(*)
    "0.0.0"
  end

  def version
    self.class.statically_defined_version
  end

  def properties
    {
      :expected => "0.0.0 (local)",
      :actual   => "0.0.0 (local)",
      :type     => :forge,
    }
  end

  def status
    :insync
  end

  # @param [Hash] opts Deprecated
  # @return [Boolean] false, because local modules are always considered in-sync
  def sync(opts={})
    logger.debug1 _("Module %{title} is a local module, always indicating synced.") % {title: title}
    false
  end
end

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
r10k-5.0.0 lib/r10k/module/local.rb
r10k-4.1.0 lib/r10k/module/local.rb
r10k-4.0.2 lib/r10k/module/local.rb
r10k-4.0.1 lib/r10k/module/local.rb
r10k-4.0.0 lib/r10k/module/local.rb
r10k-4.0.0.pre lib/r10k/module/local.rb
r10k-3.16.0 lib/r10k/module/local.rb
r10k-3.15.4 lib/r10k/module/local.rb
r10k-3.15.3 lib/r10k/module/local.rb
r10k-3.15.2 lib/r10k/module/local.rb
r10k-3.15.1 lib/r10k/module/local.rb
r10k-3.15.0 lib/r10k/module/local.rb
akerl-r10k-3.14.2.1 lib/r10k/module/local.rb
r10k-3.14.2 lib/r10k/module/local.rb
r10k-3.14.1 lib/r10k/module/local.rb