summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-04-11 22:23:23 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-04-11 22:23:23 +0000
commitf522a7e4fe87de6214d1d8e5e6d587d1948117ab (patch)
tree9529f77a196972cc84c29bb4cdf163907740e2ee /lib/puppet/parser
parent373fb3b57c9edafc1935789d7b5cb99d45656f2e (diff)
downloadpuppet-f522a7e4fe87de6214d1d8e5e6d587d1948117ab.tar.gz
puppet-f522a7e4fe87de6214d1d8e5e6d587d1948117ab.tar.xz
puppet-f522a7e4fe87de6214d1d8e5e6d587d1948117ab.zip
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
Diffstat (limited to 'lib/puppet/parser')
-rw-r--r--lib/puppet/parser/ast/node.rb4
1 files changed, 4 insertions, 0 deletions
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