Sha256: 0f9f0c5795f2b39b8c3bde0a7e215d09ec0da4624c548c8183262f6545ad9366

Contents?: true

Size: 1.15 KB

Versions: 3

Compression:

Stored size: 1.15 KB

Contents

# Break out the code related to plugins.  This module is
# just included into the agent, but having it here makes it
# easier to test.
require 'puppet/configurer'

class Puppet::Configurer::PluginHandler
  # Retrieve facts from the central server.
  def download_plugins(environment)
    source_permissions = Puppet.features.microsoft_windows? ? :ignore : :use

    plugin_downloader = Puppet::Configurer::Downloader.new(
      "plugin",
      Puppet[:plugindest],
      Puppet[:pluginsource],
      Puppet[:pluginsignore],
      environment
    )
    plugin_fact_downloader = Puppet::Configurer::Downloader.new(
      "pluginfacts",
      Puppet[:pluginfactdest],
      Puppet[:pluginfactsource],
      Puppet[:pluginsignore],
      environment,
      source_permissions
    )
    locales_downloader = Puppet::Configurer::Downloader.new(
      "locales",
      Puppet[:localedest],
      Puppet[:localesource],
      Puppet[:localeignore],
      environment
    )

    result = []
    result += plugin_fact_downloader.evaluate
    result += plugin_downloader.evaluate
    result += locales_downloader.evaluate

    Puppet::Util::Autoload.reload_changed

    result
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
bolt-0.11.0 vendored/puppet/lib/puppet/configurer/plugin_handler.rb
bolt-0.10.0 vendored/puppet/lib/puppet/configurer/plugin_handler.rb
bolt-0.9.0 vendored/puppet/lib/puppet/configurer/plugin_handler.rb