From: Martin Basti Date: Wed, 29 Jul 2026 15:44:06 +0000 (+0000) Subject: Document the ns template variable in the cookbook X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ff1792931639a51a21eae335773e9695e9a505dc;p=thirdparty%2Fbind9.git Document the ns template variable in the cookbook 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 --- diff --git a/bin/tests/system/COOKBOOK.md b/bin/tests/system/COOKBOOK.md index 56febcce310..3589876a40b 100644 --- a/bin/tests/system/COOKBOOK.md +++ b/bin/tests/system/COOKBOOK.md @@ -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