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?