Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

It's been a while and we've already found a solution for some time and i wanted to finally post it: We're creating the zonefile with puppetlabs-concat. We're having several concat-fragments for header information, body, etc. One fragment only contains the serial. The serial fragment refers to a local source:

  concat::fragment{"serial $file":
    target  => "$root_dir/$file",
    source  => "file:///var/lib/bind/serials/${file_without_dirs}_serial",
    order   => '02',

This file is written by a ruby script as part of an exec statement. The ruby script calculates the correct serial. The exec statement is - of course - refreshonly and triggered by any zonefile change, so if one of the concat fragments change, the serial is incremented: notify => Exec["/scripts/getserial.rb ${serial} >/var/lib/bind/serials/${file_without_dirs}_serial"]