Hi Dick,
I saw an example of this in Edwin Shao''s newly posted modules.
http://github.com/eshao/puppet/blob/master/manifests/macros.pp , look for
the definition named itpl
He is using a define to wrap if statements to select which template is used
based on availability. He also wrote a custom function to check which
template files exist on the server.
This answers your question, but I am not sure if this is the best approach.
Why cant you just create the .conf files in the classes that represent the
applications? (ie: class app1 , manages the resource
/etc/httpd/conf.d/app1.conf, etc..) Are you modifying httpd.conf based on
the applications that are installed (or trying to modify a single file based
on which classes are included?)
regards,
Dan
On Tue, Nov 17, 2009 at 10:15 AM, Dick Davies
<rasputnik@hellooperator.net>wrote:
>
> If I use the source attribute to file, I can pass in a list of files
> that will be searched until one matches.
>
> Is there a way to do something similar with templates?
>
> (Use case: I''m trying to make a generic apache module, but every
> webserver we run is totally different,
> so rather than make a single one size fits all template I''d like
to be
> able to pass a per-vhost template in).
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
puppet-users+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---