change how hosts forward zones are generated, to use a similar technique as for reverse zones, with both using etc/hosts/{forward,reverse} -> var/zones/hosts/{forward,reverse}
Manage DNS/bind9 zonefiles.
update:
./bin/update reads data from settings/, and generates zonefiles under var/zones/.
`update` also shows and commits changes in settings/ data.
-d DIR
Do data operations under given dir-root, as opposed to CWD.
-q
Quiet. No log messages except errors.
-vDV
Increasing logging verbosity.
-p
Show diffs for changed output on stdout.
-F
Force-update output files, even if newer than input files.
-S
Do not generate new serials for zones.
-s
Generate new serials for all zones.
-n
Fake-update; show changes, but don't actually commit/deploy them.
Useful for testing.
-C
Do not commit source changes.
-c
Force-commit source changes, even though -n
-m MSG
Commit message for source changes; optional
bin/update-serial:
Increment DNS SOA record serials in the given .serial files.
Uses a YYYYMMDDXX format, but supports XX overflow.
bin/process-zone:
Read zonefile containing records, and generate any of:
--check-hosts:
Check for duplicate host names/IPs.
--forward-zone:
Generate additional TXT/MX records to supplement A/CNAME records.
--reverse-zone=NET
Generate PTR records for all matching A records.
--meta-zone:
Generate additional TXT records from zonefile metadata, read from:
hg annotate -q --date | ./bin/process-zone --input-line-date ...
bin/expand-zone:
Expand template vars in a zone textfile; does not parse records, just passes through lines.
Used to substitute e.g. `--serial .../foo.serial` values into SOA '{serial}' fields.
bin/update:
Runs update-serial/process-zone/expand-zone to keep various generated zones/views up-to-date with respect to
source files under settings/.
Also supports hg diff/commit/annotate integration with settings.
Acts as our configuration file, determining the data/zones layout below.
settings/:
Input files, fed through update to generate files under zones/
*.zone:
Zone header, passed through process-zone with `--serial *.serial` and any appropriate `--expand view=...`.
May include a view-based $INCLUDE to include different zone data for different views.
*.zone.*:
Include zonefiles, $INCLUDE'd from *.zone
*.txt:
Hosts zone data, used to generate forwards/reverse -hosts zones
var/
Generated files.
zones/:
Generated zonefiles, loaded by bind.
common/*
Common zone files shared across views.
hosts/*:$view
View-variant hosts zones generated from settings/*.txt
hosts/*
Host zones generated from settings/*.txt, may be used in some views but not others.
includes/*:$view
View-specific zone includes used from view/*.
includes/*.*
Zone includes used from view/*.
$view/*
Zone data for given zone/domain in given view
$view/* -> ...:
Symlinked generic-zone data for some specific zone; either to common/* or $view/*.
serials/*.serial
Zone serial numbers for corresponding zones/*/*.zone