summaryrefslogtreecommitdiffstats
path: root/lib/puppet/interface
diff options
context:
space:
mode:
authorLuke Kanies <luke@puppetlabs.com>2011-03-02 18:16:41 -0800
committerLuke Kanies <luke@puppetlabs.com>2011-03-02 18:16:41 -0800
commitf67e7fa39479751a7c5268bd32e503e35602ce4f (patch)
treebdc082f68959ebcd6883fdb3e7d378da25c35482 /lib/puppet/interface
parentece0c8e8defeec7af5aa28bb583bbb69aaba79a9 (diff)
downloadpuppet-f67e7fa39479751a7c5268bd32e503e35602ce4f.tar.gz
puppet-f67e7fa39479751a7c5268bd32e503e35602ce4f.tar.xz
puppet-f67e7fa39479751a7c5268bd32e503e35602ce4f.zip
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 <luke@puppetlabs.com>
Diffstat (limited to 'lib/puppet/interface')
-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