Signed-off-by: James Turnbull <[email protected]>
---
 lib/puppet/node/facts.rb |    1 +
 spec/unit/node/facts.rb  |    5 +++++
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/lib/puppet/node/facts.rb b/lib/puppet/node/facts.rb
index ed7fe12..490174b 100755
--- a/lib/puppet/node/facts.rb
+++ b/lib/puppet/node/facts.rb
@@ -22,6 +22,7 @@ class Puppet::Node::Facts
     attr_accessor :name, :values
 
     def add_local_facts
+        values["clientcert"] = Puppet.settings[:certname]
         values["clientversion"] = Puppet.version.to_s
         values["environment"] ||= Puppet.settings[:environment]
     end
diff --git a/spec/unit/node/facts.rb b/spec/unit/node/facts.rb
index a6e227a..f5f90f2 100755
--- a/spec/unit/node/facts.rb
+++ b/spec/unit/node/facts.rb
@@ -15,6 +15,11 @@ describe Puppet::Node::Facts, "when indirecting" do
         @facts.values["one"].should == "1"
     end
 
+    it "should add the node's certificate name as the 'clientcert' fact when 
adding lcoal facts" do
+        @facts.add_local_facts
+        @facts.values["clientcert"].should == Puppet.settings[:certname]
+    end 
+
     it "should add the Puppet version as a 'clientversion' fact when adding 
local facts" do
         @facts.add_local_facts
         @facts.values["clientversion"].should == Puppet.version.to_s
-- 
1.6.6.1

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to