On Mon, Dec 20, 2010 at 08:16, rjl <rjlin...@gmail.com> wrote:

> How can I put in an update time in a template file? The problem I am
> running it to is this...  Here is my file to update the timestamp

[...]

> The problem is that everytime puppet runs, it updates the time stamp.
> I only want it to update if there was an actual change to the content
> of the file

It would: there is no way for puppet to know that the changed content
of the template header is "unimportant", compared to other changes.
(Given this is an ERB template, there is no possible way to ever
determine that, unfortunately, and we can't hook template generation
well enough either.)

Your only solution would be to use some detail that did not ever
change: personally, I used the "Time Stamp" feature that Emacs offers
to statically update the timestamp when the file was saved, rather
than puppet.

If you wanted something more automatic I would probably look to VCS
keyword expansion, or to using the mtime of the template on the server
as the date, rather than the time that puppet expanded it.

Regards,
    Daniel
-- 
✣ Daniel Pittman            ✉ dan...@rimspace.net            ☎ +61 401 155 707
              ♽ made with 100 percent post-consumer electrons

-- 
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.

Reply via email to