Ticket #1115: puppet_erb_classes_tags.patch
| File puppet_erb_classes_tags.patch, 1.1 kB (added by johnf, 8 months ago) |
|---|
-
a/CHANGELOG
old new 1 Fixed #1115 - Add to predefined variables to the ERB template space. "classes" 2 and "tags" which provide arrays of all the defined classes and tags 3 for a node. 4 1 5 0.24.4 2 6 Pass source to pkg_add via the PKG_PATH environment variable if 3 7 it ends in a '/' indicating it is a directory. Allows pkg_add -
a/lib/puppet/parser/templatewrapper.rb
old new 20 20 end 21 21 end 22 22 23 # Allow templates to accss the defined classes 24 def classes 25 return @scope.compiler.catalog.classes 26 end 27 28 # Allow templates to accss the defined classes 29 def tags 30 return @scope.compiler.catalog.classes 31 end 32 23 33 # Ruby treats variables like methods, so we can cheat here and 24 34 # trap missing vars like they were missing methods. 25 35 def method_missing(name, *args)