Paul Gear wrote: > Hi, > > I'm trying to create a squid url_regex ACL source file for various > different sites. Each site needs a slightly different configuration, so > my plan was to create the a bunch of files on the server, then drag them > down and concatenate them into a single file on the client. > > I found http://reductivelabs.com/trac/puppet/wiki/CompleteConfiguration > and i've been trying to understand its approach to constructing a file > out of fragments. Am i right in thinking that i need to distribute an > entire directory from the server, then use concatenated_file to combine > those files into one file on the puppet agent? > > I'd rather not distribute the entire directory from the server, since it > contains custom content for each node. Is there a way i can do this > with templates that include other files? (Or templates that are plain > text rather than .erb?) I'd really like to find a technique that > doesn't require separately copying the file fragments to the client also... > > I've had 3 or 4 tries at getting the right approach and am still no > closer to a working solution. Attached is my non-working attempt at a > class to do this - what am i doing wrong? (Comments about what's not > working can be found after the @@@ comments.) I thought this was a > fairly simple problem, but i've been banging my head against it all day > without any success.
My approach in the CompleteConfiguration repos is to use the concatenated_file_part define to put file parts onto the client and then locally concatenated them all on the client with the concatenated_file define which does some shell magic internally. You seem to try to use a server side function ( file() ) to create a similar effect. You just have to be aware that functions always run on the server. Regards, DavidS --~--~---------~--~----~------------~-------~--~----~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---