I am using puppet to manage files on the nodes with the ERB templates. Plain old standard. What I need to do is to get a copy of the generated (parsed) template file on the puppet master server. What I want to achieve is that I want to see the current version of the file as it is on the client, but on the server... I was going through the documentation but I didn''t find anything useful. The closest thing was the "backup" feature of file resource what I think does exactly what I want, but for the previous version, not the current one. so, by example, given the following definition: file { "/some/file": source => template("sometemplate"); } I want to have the /some/file contents on puppetmaster server too, not only on the client. I see in the docs that I can do something like: $variable = template("xx"); but how to put that then in the file on the puppetmaster? -- 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+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/dc6c5930-a0b8-4c91-870f-ef24039d9648%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Felix Frank
2013-Nov-25 15:59 UTC
Re: [Puppet Users] saving copy of template on puppetmaster
Hi, you might use that to cobble something together (using generate?) but that will most certainly end up very, very ugly. Instead, you may want to look for the documentation on how to recompile the catalog for a specific agent. You will need to configure the master to keep the requests (including facts etc.) around. The rendered template is part of the catalog. If you have trouble finding the information, come back here and I''ll have a closer look. HTH, Felix On 11/21/2013 06:55 PM, warden wrote:> I want to have the /some/file contents on puppetmaster server too, not > only on the client. I see in the docs that I can do something like: > > |$variable = template("xx"); > | > > but how to put that then in the file on the puppetmaster? >-- 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+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/529373F4.3030500%40alumni.tu-berlin.de. For more options, visit https://groups.google.com/groups/opt_out.