Module: Puppet::Configurer::PluginHandler

Included in:
Puppet::Configurer
Defined in:
lib/puppet/configurer/plugin_handler.rb

Overview

Break out the code related to plugins. This module is just included into the agent, but having it here makes it easier to test.

API:

  • public

Instance Method Summary collapse

Instance Method Details

#download_plugins(environment) ⇒ Object

Retrieve facts from the central server.

API:

  • public



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/puppet/configurer/plugin_handler.rb', line 6

def download_plugins(environment)
  plugin_downloader = Puppet::Configurer::Downloader.new(
    "plugin",
    Puppet[:plugindest],
    Puppet[:pluginsource],
    Puppet[:pluginsignore],
    environment
  )
  if Puppet.features.external_facts?
     plugin_fact_downloader = Puppet::Configurer::Downloader.new(
        "pluginfacts",
        Puppet[:pluginfactdest],
        Puppet[:pluginfactsource],
        Puppet[:pluginsignore],
        environment,
        :use
     )
     plugin_fact_downloader.evaluate
  end

  plugin_downloader.evaluate
  Puppet::Util::Autoload.reload_changed
end