Re: Building files from snippets
David Schmitt <david <at> schmitt.edv-bus.at>
2007-12-03 08:41:35 GMT
On Saturday 01 December 2007, José González Gómez wrote:
> Hi there,
> I'm facing a problem that I think it's common enough to be solved directly
> by puppet or at least have a best practice recommended: building a config
> file from snippets. I'm thinking for example about a dns zone and hosts
> inside that zone, ldap server and ldap databases, samba server and samba
> shares, a firewall config and firewall rules,... The first part of the list
> (ldap server, samba server, firewall config) seems to map to the concept of
> class in puppet, while the second part (DNS host, ldap database, samba
> share, firewall rule) seems to map to puppet types or definitions related
> to the first group.
> I've searched a bit, and have found that people use to solve this creating
> a set of files on disk and concatenating them using some script  or even
> having a definition that takes care of this stuff .
> The questions are: Is there any best practice regarding this or any other
> way to do it? Do you think puppet should provide direct support for this?
> Best regards
>  http://snurl.com/1uh2o
>  http://snurl.com/1uh2n
Using concatenated_file from  works very well for me. Being the author of
that Define, I might be biased though.
The "best practice" of course would be to model the contents of each config
file as Resources and create a native ParsedFile provided Type handling the
format in question.
The primary freedom of open source is not the freedom from cost, but the free-
dom to shape software to do what you want. This freedom is /never/ exercised
without cost, but is available /at all/ only by accepting the very different
costs associated with open source, costs not in money, but in time and effort.