On Thu, Dec 4, 2008 at 5:41 PM, Jeffrey Hulten <[EMAIL PROTECTED]> wrote:
> > Is there a way, in a puppet config, to query the current nodes config > elements and use them in a template? My specific case is a JBOSS > configuration with multiple instances on one server installation. I > have the server configured as a class (with unpacking the zip file and > making the server level changes), then each instance in a definition > (making a copy of the default instance config and changing instance > specific settings). > > The class needs to be able to look at the expected instances and make > some server level config changes (like one line in a common config for > each instance). > > Is this possible? I had a similar problem with Tomcat, and I decided to tell the class what instances to expect separately. Before including the class in each node, I provided a list variable containing the domain names of virtual hosts I had defined. The main server.xml template iterated over them and added XML Entity includes pointing to the files that were created by my puppet definition for each virtual host. node www.example.com { $vhosts = [ "www.example.com", "www.example.net" ] include tomcat5 } class tomcat5 { } -- Thanks, Jared Brothers --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---