Sha256: 4b633415dafaf771fd1d87e1b3d973fb9f6100fc2d0925a6362a35387521a6da

Contents?: true

Size: 776 Bytes

Versions: 1

Compression:

Stored size: 776 Bytes

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
  def initialize(factory)
    @factory = factory
  end

  # Retrieve facts from the central server.
  def download_plugins(environment)
    plugin_downloader = @factory.create_plugin_downloader(environment)
    plugin_fact_downloader = @factory.create_plugin_facts_downloader(environment)
    locales_downloader = @factory.create_locales_downloader(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

1 entries across 1 versions & 1 rubygems

Version Path
bolt-0.8.0 vendored/puppet/lib/puppet/configurer/plugin_handler.rb