From f67e7fa39479751a7c5268bd32e503e35602ce4f Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Wed, 2 Mar 2011 18:16:41 -0800 Subject: Modifying Facts.upload a bit The functionality is basically the same, but we're no longer using caching, and we log that it happened. Signed-off-by: Luke Kanies --- lib/puppet/interface/facts.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/puppet/interface/facts.rb b/lib/puppet/interface/facts.rb index 7b269e0d0..326274545 100644 --- a/lib/puppet/interface/facts.rb +++ b/lib/puppet/interface/facts.rb @@ -7,7 +7,10 @@ Puppet::Interface::Indirector.new(:facts) do # Upload our facts to the server action(:upload) do |*args| Puppet::Node::Facts.indirection.terminus_class = :facter - Puppet::Node::Facts.indirection.cache_class = :rest - Puppet::Node::Facts.indirection.find(Puppet[:certname]) + facts = Puppet::Node::Facts.indirection.find(Puppet[:certname]) + Puppet::Node::Facts.indirection.terminus_class = :rest + Puppet::Node::Facts.indirection.save(facts) + Puppet.notice "Uploaded facts for '#{Puppet[:certname]}'" + nil end end -- cgit