]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Add shared templates for the named.conf options plumbing
authorNicki Křížek <nicki@isc.org>
Thu, 23 Jul 2026 16:25:04 +0000 (16:25 +0000)
committerNicki Křížek <nicki@isc.org>
Thu, 6 Aug 2026 11:50:09 +0000 (13:50 +0200)
Almost every test instance's options block starts with the same seven
statements varying only in the instance address: the source-address
trio, port, pid-file, and the listen-on pair. Provide them as jinja2
partials in _common/options/ plus two umbrellas built on the
auto-injected per-instance `ns` variable: options.conf.j2 for the
v4-only case and options-dual.conf.j2 for dual-stack instances.

The partials carry no indentation of their own: consumers pull them in
with {% include_indented %} at the desired depth, so the templates do
not hardcode the block structure they are used in.

Semantic options (recursion, dnssec-validation, notify, allow-*) stay
in the individual config files by design.

Assisted-by: Claude:claude-fable-5
bin/tests/system/_common/options-dual.conf.j2 [new file with mode: 0644]
bin/tests/system/_common/options.conf.j2 [new file with mode: 0644]
bin/tests/system/_common/options/listen-dual.conf.j2 [new file with mode: 0644]
bin/tests/system/_common/options/listen.conf.j2 [new file with mode: 0644]
bin/tests/system/_common/options/server.conf.j2 [new file with mode: 0644]
bin/tests/system/_common/options/sources-dual.conf.j2 [new file with mode: 0644]
bin/tests/system/_common/options/sources-v6.conf.j2 [new file with mode: 0644]
bin/tests/system/_common/options/sources.conf.j2 [new file with mode: 0644]

diff --git a/bin/tests/system/_common/options-dual.conf.j2 b/bin/tests/system/_common/options-dual.conf.j2
new file mode 100644 (file)
index 0000000..cbe09ec
--- /dev/null
@@ -0,0 +1,3 @@
+{% include "_common/options/sources-dual.conf.j2" %}
+{% include "_common/options/server.conf.j2" %}
+{% include "_common/options/listen-dual.conf.j2" %}
diff --git a/bin/tests/system/_common/options.conf.j2 b/bin/tests/system/_common/options.conf.j2
new file mode 100644 (file)
index 0000000..219e6a2
--- /dev/null
@@ -0,0 +1,3 @@
+{% include "_common/options/sources.conf.j2" %}
+{% include "_common/options/server.conf.j2" %}
+{% include "_common/options/listen.conf.j2" %}
diff --git a/bin/tests/system/_common/options/listen-dual.conf.j2 b/bin/tests/system/_common/options/listen-dual.conf.j2
new file mode 100644 (file)
index 0000000..078db39
--- /dev/null
@@ -0,0 +1,2 @@
+listen-on { @ns.ip@; };
+listen-on-v6 { @ns.ip6@; };
diff --git a/bin/tests/system/_common/options/listen.conf.j2 b/bin/tests/system/_common/options/listen.conf.j2
new file mode 100644 (file)
index 0000000..76fd5ef
--- /dev/null
@@ -0,0 +1,2 @@
+listen-on { @ns.ip@; };
+listen-on-v6 { none; };
diff --git a/bin/tests/system/_common/options/server.conf.j2 b/bin/tests/system/_common/options/server.conf.j2
new file mode 100644 (file)
index 0000000..77865fc
--- /dev/null
@@ -0,0 +1,2 @@
+port @PORT@;
+pid-file "named.pid";
diff --git a/bin/tests/system/_common/options/sources-dual.conf.j2 b/bin/tests/system/_common/options/sources-dual.conf.j2
new file mode 100644 (file)
index 0000000..7c88fe0
--- /dev/null
@@ -0,0 +1,2 @@
+{% include "_common/options/sources.conf.j2" %}
+{% include "_common/options/sources-v6.conf.j2" %}
diff --git a/bin/tests/system/_common/options/sources-v6.conf.j2 b/bin/tests/system/_common/options/sources-v6.conf.j2
new file mode 100644 (file)
index 0000000..6a004bd
--- /dev/null
@@ -0,0 +1,3 @@
+query-source-v6 address @ns.ip6@;
+notify-source-v6 @ns.ip6@;
+transfer-source-v6 @ns.ip6@;
diff --git a/bin/tests/system/_common/options/sources.conf.j2 b/bin/tests/system/_common/options/sources.conf.j2
new file mode 100644 (file)
index 0000000..3b003b8
--- /dev/null
@@ -0,0 +1,3 @@
+query-source address @ns.ip@;
+notify-source @ns.ip@;
+transfer-source @ns.ip@;