Sha256: 49e9c0a29538ccb3a5afe558493b7f75bcd632c20fb355d62ff589754fad7412

Contents?: true

Size: 1.15 KB

Versions: 5

Compression:

Stored size: 1.15 KB

Contents

require 'puppet/configurer'

# Factory for <tt>Puppet::Configurer::Downloader</tt> objects.
#
# Puppet's pluginsync facilities can be used to download modules
# and external facts, each with a different destination directory
# and related settings.
#
# @api private
#
class Puppet::Configurer::DownloaderFactory
  def create_plugin_downloader(environment)
    plugin_downloader = Puppet::Configurer::Downloader.new(
      "plugin",
      Puppet[:plugindest],
      Puppet[:pluginsource],
      Puppet[:pluginsignore],
      environment
    )
  end

  def create_plugin_facts_downloader(environment)
    source_permissions = Puppet.features.microsoft_windows? ? :ignore : :use

    plugin_fact_downloader = Puppet::Configurer::Downloader.new(
      "pluginfacts",
      Puppet[:pluginfactdest],
      Puppet[:pluginfactsource],
      Puppet[:pluginsignore],
      environment,
      source_permissions
    )
  end

  def create_locales_downloader(environment)
    locales_downloader = Puppet::Configurer::Downloader.new(
      "locales",
      Puppet[:localedest],
      Puppet[:localesource],
      Puppet[:pluginsignore] + " config.yaml",
      environment
    )
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
puppet-5.3.4 lib/puppet/configurer/downloader_factory.rb
puppet-5.3.4-x86-mingw32 lib/puppet/configurer/downloader_factory.rb
puppet-5.3.4-x64-mingw32 lib/puppet/configurer/downloader_factory.rb
puppet-5.3.4-universal-darwin lib/puppet/configurer/downloader_factory.rb
bolt-0.8.0 vendored/puppet/lib/puppet/configurer/downloader_factory.rb