>
> Indeed, templates and Concat, either individually or in combination, are 
> great tools for managing files, including where responsibility for 
> different pieces of the file is spread across multiple classes.
>
 
This is exactly my situation.  I need multiple other modules to contribute 
multiple lines to the file.
 

>   Unfortunately, none of that is really analogous to Stdlib::File_line, 
> which manages *just* one line in a file, without managing the rest of the 
> file's content.  That's a pretty strange thing to do in the Puppet scheme 
> of things, actually, but I suppose it can be useful.
>
> I am not aware of any existing, publicly available module providing a type 
> that manages blocks of lines in a manner analogous to Stdlib::File_line.  
> There are several possible approaches that might work instead, depending on 
> the details of the problem, among them:
>
>    - Manage the whole file (best, if it is feasible).  Templates and/or 
>    Concat fit right into this.
>
> I would like to use templates if possible but what I have not figured out 
yet is how to provide the lines from different modules during the catalog 
compile.  Is it possible to send the lines from multiple modules to another 
and guarantee that the module managing the file has received all the 
lines?  My understanding is that puppet does not guarantee ordering during 
the catalog compile.

>  
>    - Put everything on one line and manage it via Stdlib::File_line.  
>    That assumes the line breaks are optional (or can be replaced with 
>    something else), which is often true, but not always. 
>    - Put the managed content in a separate, wholly-managed file, and 
>    include it into the target via a target-specific inclusion feature.  For 
>    instance, some configuration file languages have an 'include' statement 
>    that interpolates external files (much like the C preprocessor's #include 
>    directive).  Better, some programs automatically read all files from a 
>    given directory.
>
> If none of those are suitable then it's a very unusual case; the best 
> available option may then be to build what you need yourself.
>
>
> John
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to