Class: Puppet::Configurer::PluginHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/puppet/configurer/plugin_handler.rb

Instance Method Summary collapse

Constructor Details

#initialize(factory) ⇒ PluginHandler

Returns a new instance of PluginHandler.



7
8
9
# File 'lib/puppet/configurer/plugin_handler.rb', line 7

def initialize(factory)
  @factory = factory
end

Instance Method Details

#download_plugins(environment) ⇒ Object

Retrieve facts from the central server.



12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/puppet/configurer/plugin_handler.rb', line 12

def download_plugins(environment)
  plugin_downloader = @factory.create_plugin_downloader(environment)

  result = []

  plugin_fact_downloader = @factory.create_plugin_facts_downloader(environment)
  result += plugin_fact_downloader.evaluate

  result += plugin_downloader.evaluate
  Puppet::Util::Autoload.reload_changed

  result
end