]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Document the ns template variable in the cookbook
authorMartin Basti <mbasti@isc.org>
Wed, 29 Jul 2026 15:44:06 +0000 (15:44 +0000)
committerNicki Křížek <nicki@isc.org>
Thu, 6 Aug 2026 11:50:09 +0000 (13:50 +0200)
The explanation of the auto-injected ns variable was dropped when the
shared plumbing templates were documented, leaving @ns.ip@ and
@ns.ip6@ undocumented while the _common/options/ partials are built
on them. Restore it to the cookbook.

Assisted-by: Claude:claude-fable-5
bin/tests/system/COOKBOOK.md

index 56febcce310f21f364d9c84eaa6d5ac9442605b1..3589876a40bb28b7e331703e563f919ae0a32b98 100644 (file)
@@ -92,6 +92,13 @@ options your test actually cares about below the include.  When the standard
 block doesn't fit, compose the pieces from `_common/options/` instead and put
 anything nonstandard inline.
 
+The plumbing templates are built on the `ns` variable: templates inside an
+`nsN`/`ansN` subdirectory automatically get one describing that server, so a
+config never hardcodes its own address — `@ns.ip@` renders to 10.53.0.1 in
+ns1, 10.53.0.2 in ns2, ..., and `@ns.ip6@` to the matching
+fd92:7065:b8e:ffff::N address.  Use it wherever a config refers to the
+instance's own address; references to *other* servers stay literal.
+
 The `_common/controls.conf.j2` include sets up the rndc control channel, so
 the test (and the runner's shutdown sequence) can use `rndc`.  A resolver
 instance would also include `_common/root.hint.conf` to get the standard