summaryrefslogtreecommitdiffstats
path: root/lib/puppet/node
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet/node')
-rwxr-xr-xlib/puppet/node/facts.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/puppet/node/facts.rb b/lib/puppet/node/facts.rb
index c60be3fcf..8ee90b4ac 100755
--- a/lib/puppet/node/facts.rb
+++ b/lib/puppet/node/facts.rb
@@ -8,8 +8,16 @@ class Puppet::Node::Facts
# the node sources.
extend Puppet::Indirector
+ # We want to expire any cached nodes if the facts are saved.
+ module NodeExpirer
+ def save(instance, *args)
+ Puppet::Node.expire(instance.name)
+ super
+ end
+ end
+
# Use the node source as the indirection terminus.
- indirects :facts, :terminus_class => :facter
+ indirects :facts, :terminus_class => :facter, :extend => NodeExpirer
attr_accessor :name, :values