Re: [Puppet Users] DNS Zone serial numbers
On 09/09/2011 05:36 PM, Peter Berghold wrote: Normally when I hand edit zone files I use a serial number format of MMDDXXX where is the year, MM is the month and DD is the day the change is being made with XX being a two digit number incremented for each change done that day. I cannot figure out a good way to do this with puppet. Any thoughts? Either a ridiculous erb template or a relatively simple custom function would do the trick, though either way you'll have to write some Ruby. -- Daniel Maher « makin' plans now to live on Mars 'cuz I got Earth on lock. » -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@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.
Re: [Puppet Users] DNS Zone serial numbers
I'd just write a custom script in the language of your choice, put it on the server, and use the generate() function to pull the data. Since it doesn't need to run on the client this should make things simpler. On Fri, Sep 9, 2011 at 9:02 AM, Jan-Piet Mens jpm...@gmail.com wrote: and the template will include the zone delegation record. What I'm trying to figure out is how to generate the serial numbers. I'd forego the MMDDxxx format and use either UNIX epoch time which is auto-incrementing anyway, or store an integer counter (in a file) and increment that each time your zone changes. (Do note, though, that if you do move away from MMDDxxx, you'll probably have to reset your zones' SOA serial numbers so that slave servers don't miss out on zone transfers. [1].) Hope that helps a bit (from the DNS point of view), and I cannot really give you a good answer from the Puppet-point-of-view. -JP [1] http://www.zytrax.com/books/dns/ch9/serial.html -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@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. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@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.
Re: [Puppet Users] DNS Zone serial numbers
- Original Message - and the template will include the zone delegation record. What I'm trying to figure out is how to generate the serial numbers. I'd forego the MMDDxxx format and use either UNIX epoch time which is auto-incrementing anyway, or store an integer counter (in a file) and increment that each time your zone changes. (Do note, though, that if you do move away from MMDDxxx, you'll probably have to reset your zones' SOA serial numbers so that slave servers don't miss out on zone transfers. [1].) Hope that helps a bit (from the DNS point of view), and I cannot really give you a good answer from the Puppet-point-of-view. the puppet problem is if you generate the serial you should only generate it if the content of the rest of the file changes, this is pretty hard without a type/provider. I have some code to increment serials the way you want with mmddxx but dont have an immediate answer to how to use that without writing a type -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@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.
Re: [Puppet Users] DNS Zone serial numbers
and the template will include the zone delegation record. What I'm trying to figure out is how to generate the serial numbers. I'd forego the MMDDxxx format and use either UNIX epoch time which is auto-incrementing anyway, or store an integer counter (in a file) and increment that each time your zone changes. (Do note, though, that if you do move away from MMDDxxx, you'll probably have to reset your zones' SOA serial numbers so that slave servers don't miss out on zone transfers. [1].) Hope that helps a bit (from the DNS point of view), and I cannot really give you a good answer from the Puppet-point-of-view. -JP [1] http://www.zytrax.com/books/dns/ch9/serial.html -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@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.