hello, I want to be able to do create a bunch of resources inside a class ie. a bit like create_resources with with the additional step of also creating the class.
A simple bit of testing inside a node block using inline_template: compiler = scope.compiler klass = Puppet::Parser::Resource.new("class", "dynamic", :scope => scope) resource = Puppet::Parser::Resource.new(:notify, "dynamic", :scope => klass.scope) compiler.add_class("dynamic") compiler.catalog.add_resource(klass) compiler.add_resource(klass.scope, resource) Gets me this far: /Stage[main]//Node[default]/Notify[dynamic]/message: defined 'message' as 'dynamic' if I print out the catalog I can see my 'dynamic' class is there but I have a few problems: - the class isnt in any stage - probably cos I use nodescope but thats all I could get working. Other classes other than compiler.topscope all give me grief - the notify[dynamic] resource is not seen as being part of the class not by inspecting the catalog and its also obvious from just reading the line of output above. So, how do I get the class to be part of main stage and how do I get this resource to be part of the class? so that require => Class["dynamic"] does the right thing? --- R.I.Pienaar -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To post to this group, send email to puppet-dev@googlegroups.com. To unsubscribe from this group, send email to puppet-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.