On Sun, Jun 27, 2010 at 3:20 AM, Daniel Pittman <dan...@rimspace.net> wrote: > Douglas Garstang <doug.garst...@gmail.com> writes: >> On Sat, Jun 26, 2010 at 8:00 PM, Daniel Pittman <dan...@rimspace.net> wrote: >>> "R.I.Pienaar" <r...@devco.net> writes: >>>> ----- "Douglas Garstang" <doug.garst...@gmail.com> wrote: >>>> >>>>> I've not quite figured out how to do complex templating in puppet yet. > > [...] > >>>>> Anyone know how I could do this? >>>> >>>> I find concatenated snippets work well for this kind of problem. >>>> http://github.com/ripienaar/puppet-concat >>> >>> *nod* They are pretty much the best solution available at this time. >> >> I must be missing something fundamental then, because I am getting this: >> >> Could not run Puppet configuration client: Could not find dependent >> Exec[concat_/tmp/foo] for File[/_tmp_foo/fragments/10__tmp_foo] at >> /etc/puppet/modules/concat/manifests/fragment.pp:45 > > Did you follow the examples in the documentation of the module, and that > R.I.Pienaar pointed you to? > > Can you post the code that isn't working for you? > > My guess is that you have not included the setup and overall file target > sections, only a fragment, but without seeing what you wrote we could only > guess at what you had actually done...
Using the simple use case example in the comments at the top of concat/init.pp, simply, node 'test01.fr.xxx.com' { concat::fragment{ "foo.com_config": target => "/etc/somefile", content => template("dhcp/host.erb"); } } That's it. I figured it would take the contents of dhcp/host.erb and append it to /etc/somefile, but instead I get the error: Could not run Puppet configuration client: Could not find dependent Exec[concat_/etc/named.conf] for File[/_etc_named.conf/fragments/10_foo.com_config] at /etc/puppet/modules/concat/manifests/fragment.pp:45 And .... now that I think about it... isn't this incredibly inefficient? Doesn't the client basically have to reconstruct the file from scratch every time? Doug. -- 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.