[chef] [Chef] Write current date to template, when it changes


Chronological Thread 
  • From:
  • To:
  • Subject: [chef] [Chef] Write current date to template, when it changes
  • Date: Tue, 06 Mar 2012 15:29:56 +0100

Hi,

I want to write a cookbook for a bind. My problem is, that I don't know how I 
 can generate the timestamp (serial) without changing the template everytime.


$TTL    86400 ; TTL: 1 day
@         IN      SOA     hostname.domainname. 
hostmaster.domainname.  (
                                               201203061523 ; Serial (last 
changed date and time)
                                                           3h      ; Refresh
                                                           15      ; Retry
                                                           1w      ; Expire
                                                           3h      ; Minimum
                                                        )
I want to generate the timestamp with the following ruby code: 
Time.new.strftime("%Y%m%d%H%M")

So I only want to write the current time to the template if the template 
changes.

How can I do that?
-- 
NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone!                        
          
Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a



Archive powered by MHonArc 2.6.16.

§