From f522a7e4fe87de6214d1d8e5e6d587d1948117ab Mon Sep 17 00:00:00 2001 From: luke Date: Tue, 11 Apr 2006 22:23:23 +0000 Subject: Adding the host name as a tag (stripped of the domain name) git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1105 980ebf18-57e1-0310-9a29-db15c13687c0 --- lib/puppet/parser/ast/node.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/puppet/parser') diff --git a/lib/puppet/parser/ast/node.rb b/lib/puppet/parser/ast/node.rb index 2e68cbdb3..2a8e6a85b 100644 --- a/lib/puppet/parser/ast/node.rb +++ b/lib/puppet/parser/ast/node.rb @@ -39,6 +39,10 @@ class Puppet::Parser::AST # And then evaluate our code. @code.safeevaluate(:scope => scope) + # Mark our node name as a class, too, but strip it of the domain + # name. + scope.setclass(self.object_id, @type.sub(/\..+/, '')) + return scope end -- cgit