From 84bd5285db5a80b01dd0359387516210ccb5b625 Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Fri, 13 Feb 2009 21:06:34 -0600 Subject: Actualling syncing facts and plugins Also fixing the argument order while downloading either of them. I had my Downloader.new calls using the wrong argument order. Signed-off-by: Luke Kanies --- lib/puppet/configurer.rb | 2 ++ lib/puppet/configurer/fact_handler.rb | 4 +++- lib/puppet/configurer/plugin_handler.rb | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/puppet/configurer.rb b/lib/puppet/configurer.rb index 67c744d39..b29082d5a 100644 --- a/lib/puppet/configurer.rb +++ b/lib/puppet/configurer.rb @@ -124,6 +124,8 @@ class Puppet::Configurer # This just passes any options on to the catalog, # which accepts :tags and :ignoreschedules. def run(options = {}) + prepare() + unless catalog = retrieve_catalog Puppet.err "Could not retrieve catalog; skipping run" return diff --git a/lib/puppet/configurer/fact_handler.rb b/lib/puppet/configurer/fact_handler.rb index 9435cb22a..d0e890f62 100644 --- a/lib/puppet/configurer/fact_handler.rb +++ b/lib/puppet/configurer/fact_handler.rb @@ -1,5 +1,7 @@ require 'puppet/indirector/facts/facter' +require 'puppet/configurer/downloader' + # Break out the code related to facts. This module is # just included into the agent, but having it here makes it # easier to test. @@ -23,7 +25,7 @@ module Puppet::Configurer::FactHandler def download_fact_plugins return unless download_fact_plugins? - Puppet::Configurer::Downloader.new("fact", Puppet[:factsource], Puppet[:factdest], Puppet[:factsignore]).evaluate + Puppet::Configurer::Downloader.new("fact", Puppet[:factdest], Puppet[:factsource], Puppet[:factsignore]).evaluate end # Clear out all of the loaded facts and reload them from disk. diff --git a/lib/puppet/configurer/plugin_handler.rb b/lib/puppet/configurer/plugin_handler.rb index cadf300fd..def6a1707 100644 --- a/lib/puppet/configurer/plugin_handler.rb +++ b/lib/puppet/configurer/plugin_handler.rb @@ -9,7 +9,7 @@ module Puppet::Configurer::PluginHandler # Retrieve facts from the central server. def download_plugins return nil unless download_plugins? - Puppet::Configurer::Downloader.new("plugin", Puppet[:pluginsource], Puppet[:plugindest], Puppet[:pluginsignore]).evaluate.each { |file| load_plugin(file) } + Puppet::Configurer::Downloader.new("plugin", Puppet[:plugindest], Puppet[:pluginsource], Puppet[:pluginsignore]).evaluate.each { |file| load_plugin(file) } end def load_plugin(file) -- cgit