On Thu, 2010-02-18 at 15:36 +0100, Peter Meier wrote: > On Thu, 2010-02-18 at 05:59 -0800, jcbollinger wrote: > >On Feb 17, 10:07 pm, Grant McLean <gr...@mclean.net.nz> wrote: > > > I'm playing around with writing a custom resource type for managing my > > > Apache configs and I would like to use templates. > > > > Are you sure you need a custom resource type? It might be easier and > > more maintainable to use a Puppet define wrapped around one or more > > File resources, especially if you're going to use templates to > > generate the content.
Actually, I'm quite sure I don't *need* to use a custom resource type. I am able to implement a solution with define+File resources, but I wanted to try using a custom resource in order to reduce the amount of boilerplate and repetition in my defines. The result was much more concise. > the apache module @ [1] has different kinds of defines to create vhost > entries. Most of them follow certain conventions so that defining a > standard vhost is really only a bunch of lines, whoever you're able to > tweak nearly each aspect of a vhost. That seems to address a different use case to my situation. In my current project very few of the Apache instances use vhosts. We use the template to generate a complete config file for an Apache server which is dedicated to performing one particular role in the application. Having all the roles generated out of a single template has proven to vastly simplify the management. Thanks Grant -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.