summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/puppet/interface/facts.rb7
1 files changed, 5 insertions, 2 deletions
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