Sha256: 9fddfa26585b3a08894e485db229f997b71c20232f1b61a08aef585982fe9666
Contents?: true
Size: 856 Bytes
Versions: 5
Compression:
Stored size: 856 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. module Puppet::Configurer::PluginHandler def download_plugins? Puppet[:pluginsync] end # Retrieve facts from the central server. def download_plugins return nil unless download_plugins? Puppet::Configurer::Downloader.new("plugin", Puppet[:plugindest], Puppet[:pluginsource], Puppet[:pluginsignore]).evaluate.each { |file| load_plugin(file) } end def load_plugin(file) return unless FileTest.exist?(file) return if FileTest.directory?(file) begin Puppet.info "Loading downloaded plugin #{file}" load file rescue SystemExit,NoMemoryError raise rescue Exception => detail Puppet.err "Could not load downloaded file #{file}: #{detail}" end end end
Version data entries
5 entries across 5 versions & 1 rubygems