You would have to implement the idempotence check yourself separate from the file contents. You could do something like make a template with the serial always set to 0, and use a notification that when that template changes trigger a ruby_block to bump the serial number on disk and write out the real template.
On May 25, 2015, at 8:26 AM, Kevin Keane Subscription email@example.com wrote:
I am looking for a way to put a time stamp into a template, without causing the file to be regenerated on each chef run. I want the time stamp to be updated only if something else has changed in the template, as well.
The use case is for generating a DNS zone file and updating the serial number only when there was a change.
Is there a common solution for this problem in Chef?
Our values: Privacy, Liberty, Justice