]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Use the root-hint template for indented hint configs
authorNicki Křížek <nicki@isc.org>
Tue, 28 Jul 2026 18:11:50 +0000 (20:11 +0200)
committerNicki Křížek <nicki@isc.org>
Thu, 6 Aug 2026 11:50:09 +0000 (13:50 +0200)
Replace the root hints boilerplate with a template in configs where the
config section should be indented, i.e. in view statements. While named
doesn't care about whitespace, use the ident filter to make the final
rendered config more readable.

Assisted-by: Claude:claude-fable-5
28 files changed:
bin/tests/system/addzone/ns2/named2.conf.j2
bin/tests/system/addzone/ns2/named3.conf.j2
bin/tests/system/allow_query/ns2/named21.conf.j2
bin/tests/system/allow_query/ns2/named22.conf.j2
bin/tests/system/allow_query/ns2/named23.conf.j2
bin/tests/system/allow_query/ns2/named24.conf.j2
bin/tests/system/allow_query/ns2/named25.conf.j2
bin/tests/system/allow_query/ns2/named26.conf.j2
bin/tests/system/allow_query/ns2/named27.conf.j2
bin/tests/system/allow_query/ns2/named28.conf.j2
bin/tests/system/allow_query/ns2/named29.conf.j2
bin/tests/system/allow_query/ns2/named30.conf.j2
bin/tests/system/allow_query/ns2/named31.conf.j2
bin/tests/system/allow_query/ns2/named32.conf.j2
bin/tests/system/allow_query/ns2/named33.conf.j2
bin/tests/system/allow_query/ns2/named34.conf.j2
bin/tests/system/allow_query/ns2/named55.conf.j2
bin/tests/system/allow_query/ns2/named56.conf.j2
bin/tests/system/allow_query/ns2/named57.conf.j2
bin/tests/system/allow_query/ns3/named5.conf.j2
bin/tests/system/allow_query/ns3/named6.conf.j2
bin/tests/system/allow_query/ns3/named7.conf.j2
bin/tests/system/allow_query/ns3/named8.conf.j2
bin/tests/system/dnssec/ns4/named.conf.j2
bin/tests/system/dnssec/ns5/named.conf.j2
bin/tests/system/mkeys/ns7/named.conf.j2
bin/tests/system/rndc/ns3/named.conf.j2
bin/tests/system/views/ns2/named2.conf.j2

index c9e8359b0ee062d64e100a15976233051e143282..c168712ead492f56ccac88537b2c6ec001e139d2 100644 (file)
@@ -23,10 +23,7 @@ view internal {
 
        response-policy { zone "policy"; };
 
-       zone "." {
-               type hint;
-               file "../../_common/root.hint";
-       };
+       {% include_indented "_common/root.hint.conf" %}
 
        zone "policy" {
                type primary;
@@ -38,10 +35,7 @@ view external {
        match-clients { any; };
        allow-new-zones yes;
 
-       zone "." {
-               type hint;
-               file "../../_common/root.hint";
-       };
+       {% include_indented "_common/root.hint.conf" %}
 };
 
 # This view is only here to test that configuration context is cleaned
index a481476223a50cca35ddf5cb9af4d43e7da8e0a2..1356d1dffe25073c3266085c452795ab33559c70 100644 (file)
@@ -23,10 +23,7 @@ view internal {
 
        response-policy { zone "policy"; };
 
-       zone "." {
-               type hint;
-               file "../../_common/root.hint";
-       };
+       {% include_indented "_common/root.hint.conf" %}
 
        zone "policy" {
                type primary;
@@ -38,20 +35,14 @@ view directory {
        match-clients { 10.53.0.5; };
        allow-new-zones yes;
 
-       zone "." {
-               type hint;
-               file "../../_common/root.hint";
-       };
+       {% include_indented "_common/root.hint.conf" %}
 };
 
 view external {
        match-clients { any; };
        allow-new-zones yes;
 
-       zone "." {
-               type hint;
-               file "../../_common/root.hint";
-       };
+       {% include_indented "_common/root.hint.conf" %}
 };
 
 # This view is only here to test that configuration context is cleaned
index e4c2eaf634becaa7c1c19770e0bb752d0c880eb0..e00ed6aa2077593685e3f284e1b655c3b1fe85a3 100644 (file)
@@ -8,10 +8,7 @@ options {
 
 view "internal" {
 
-       zone "." {
-               type hint;
-               file "../../_common/root.hint";
-       };
+       {% include_indented "_common/root.hint.conf" %}
 
        zone "normal.example" {
                type primary;
index 2b64844bd6011aeafdeea5e4cbaf24fa15d768f1..c2d99bcdc31c8c779cae01f574bc730842e132b5 100644 (file)
@@ -10,10 +10,7 @@ view "internal" {
 
        allow-query { any; };
 
-       zone "." {
-               type hint;
-               file "../../_common/root.hint";
-       };
+       {% include_indented "_common/root.hint.conf" %}
 
        zone "normal.example" {
                type primary;
index fa508308d23e39bd528af65dbd871b614a2b0b1a..2452d863acc5d22bd477a28906612556adb50ea4 100644 (file)
@@ -10,10 +10,7 @@ view "internal" {
 
        allow-query { none; };
 
-       zone "." {
-               type hint;
-               file "../../_common/root.hint";
-       };
+       {% include_indented "_common/root.hint.conf" %}
 
        zone "normal.example" {
                type primary;
index 1cfbdeb9e999c88cb5d619d510a3e6c141aa9ae3..c7e418c24b2ff5ab2305239322b68b59c543ba67 100644 (file)
@@ -10,10 +10,7 @@ view "internal" {
 
        allow-query { 10.53.0.2; };
 
-       zone "." {
-               type hint;
-               file "../../_common/root.hint";
-       };
+       {% include_indented "_common/root.hint.conf" %}
 
        zone "normal.example" {
                type primary;
index 37e24c72656d53310abdb9ba9e0eaf7d92a15091..8d2ff47f7c7f70e2ae16070cf052a3c9c5c46568 100644 (file)
@@ -10,10 +10,7 @@ view "internal" {
 
        allow-query { 10.53.0.1; };
 
-       zone "." {
-               type hint;
-               file "../../_common/root.hint";
-       };
+       {% include_indented "_common/root.hint.conf" %}
 
        zone "normal.example" {
                type primary;
index 4af789c6b3ae03db448025aa18630aa39b7407e1..8a10c2e13ba9cfb106368f039e77e33f097db10d 100644 (file)
@@ -10,10 +10,7 @@ view "internal" {
 
        allow-query {! 10.53.0.2; };
 
-       zone "." {
-               type hint;
-               file "../../_common/root.hint";
-       };
+       {% include_indented "_common/root.hint.conf" %}
 
        zone "normal.example" {
                type primary;
index b8e1d4e91c30fac50a55db103b42dc913bd926e4..e70e013882a5a746f5b97edb188147b564f416a0 100644 (file)
@@ -12,10 +12,7 @@ view "internal" {
 
        allow-query { accept; };
 
-       zone "." {
-               type hint;
-               file "../../_common/root.hint";
-       };
+       {% include_indented "_common/root.hint.conf" %}
 
        zone "normal.example" {
                type primary;
index 53665846b36c341a730a982eb56bf813b84c6e03..879312bd9d1a1b70a827f435e387af5e8f611816 100644 (file)
@@ -12,10 +12,7 @@ view "internal" {
 
        allow-query { accept; };
 
-       zone "." {
-               type hint;
-               file "../../_common/root.hint";
-       };
+       {% include_indented "_common/root.hint.conf" %}
 
        zone "normal.example" {
                type primary;
index 6aa26b9d3a607073659733c4b219e9b94fc17bff..a12fc1eb5b955a4df7cf0dce12f58ddfd85199e2 100644 (file)
@@ -12,10 +12,7 @@ view "internal" {
 
        allow-query {! accept; };
 
-       zone "." {
-               type hint;
-               file "../../_common/root.hint";
-       };
+       {% include_indented "_common/root.hint.conf" %}
 
        zone "normal.example" {
                type primary;
index 77880a8554986c3313ad32acdf8a013097d82d0f..b26484c2ec8e6069639a68011c0f8689c8678ed0 100644 (file)
@@ -15,10 +15,7 @@ view "internal" {
 
        allow-query { key one; };
 
-       zone "." {
-               type hint;
-               file "../../_common/root.hint";
-       };
+       {% include_indented "_common/root.hint.conf" %}
 
        zone "normal.example" {
                type primary;
index c26a669c62a1a2714fd4d3c1907de3d517b68068..854bbc1eae76310a9ffb323c802cf79c5908cf27 100644 (file)
@@ -22,10 +22,7 @@ view "internal" {
 
        allow-query { key one; };
 
-       zone "." {
-               type hint;
-               file "../../_common/root.hint";
-       };
+       {% include_indented "_common/root.hint.conf" %}
 
        zone "normal.example" {
                type primary;
index 0bceaf541471fbb301ecb64422fe59e30a87bf81..ff30f0023e2fc7744819008ac62809912f4096b6 100644 (file)
@@ -15,10 +15,7 @@ view "internal" {
 
        allow-query {! key one; };
 
-       zone "." {
-               type hint;
-               file "../../_common/root.hint";
-       };
+       {% include_indented "_common/root.hint.conf" %}
 
        zone "normal.example" {
                type primary;
index 1c02e6d4605ee8c44a545d15a3946cba9592415a..4d14e10e5f10be305f58c40847523e626329d798 100644 (file)
@@ -11,10 +11,7 @@ view "internal" {
 
        allow-query { any; };
 
-       zone "." {
-               type hint;
-               file "../../_common/root.hint";
-       };
+       {% include_indented "_common/root.hint.conf" %}
 
        zone "normal.example" {
                type primary;
index d9196a032649a393443a9b2f6100e30cc55951a8..ec273406011ec9b187c15afaefbda70c87b2f77c 100644 (file)
@@ -11,10 +11,7 @@ view "internal" {
 
        allow-query { none; };
 
-       zone "." {
-               type hint;
-               file "../../_common/root.hint";
-       };
+       {% include_indented "_common/root.hint.conf" %}
 
        zone "normal.example" {
                type primary;
index 7d010e65177497d5b1b686f3ff56ec73293db761..4db3e98033563d73d5d3250aa524009f7f6f76a6 100644 (file)
@@ -10,10 +10,7 @@ view "internal" {
 
        allow-query { none; };
 
-       zone "." {
-               type hint;
-               file "../../_common/root.hint";
-       };
+       {% include_indented "_common/root.hint.conf" %}
 
        zone "normal.example" {
                type primary;
index a3e67aea9d3ad5a350a6b7e4ab9989e6e166071b..e4ef258c1c99bf6f9923d3e8777942a6624562ee 100644 (file)
@@ -10,10 +10,7 @@ view "internal" {
 
        allow-query { any; };
 
-       zone "." {
-               type hint;
-               file "../../_common/root.hint";
-       };
+       {% include_indented "_common/root.hint.conf" %}
 
        zone "normal.example" {
                type primary;
index 9fe197cd23ba8a40507bf1c6a1b8e4c114ec21b5..a8c2902fa53539bf7bd639ad8d2f406f4a99cc05 100644 (file)
@@ -9,10 +9,7 @@ options {
 view "internal" {
        allow-query-on { any; };
 
-       zone "." {
-               type hint;
-               file "../../_common/root.hint";
-       };
+       {% include_indented "_common/root.hint.conf" %}
 
        zone "normal.example" {
                type primary;
index ed81cf3c6141799fcd0a73962556b84ab7ddbfb7..0b21fa28cd0f28f4d6575a405dac247e868f0a76 100644 (file)
@@ -12,10 +12,7 @@ options {
 
 view internal {
         match-destinations { 10.53.0.3; };
-        zone "." {
-                type hint;
-                file "../../_common/root.hint";
-        };
+        {% include_indented "_common/root.hint.conf" %}
 
         recursion yes;
         allow-recursion { any; };
index 1343c4faa7afd1eae7c4aea17114c25ac94d2804..723c58430e70e9db87fa06c9be200759d535afee 100644 (file)
@@ -9,10 +9,7 @@ options {
 
 view internal {
         match-destinations { 10.53.0.3; };
-        zone "." {
-                type hint;
-                file "../../_common/root.hint";
-        };
+        {% include_indented "_common/root.hint.conf" %}
         recursion yes;
        allow-recursion{ any; };
 };
index d50070019dbb8804c5af062bbd007211afdd9f55..dd5846cdfd08d7d5b904ebc5f9d477e50fc249ed 100644 (file)
@@ -9,10 +9,7 @@ options {
 
 view internal {
         match-destinations { 10.53.0.3; };
-        zone "." {
-                type hint;
-                file "../../_common/root.hint";
-        };
+        {% include_indented "_common/root.hint.conf" %}
         recursion yes;
        allow-query{ any; };
 };
index cea81a390585b47909c426e584aa0555366791b8..9f1ddbb6ed538c60463f862aa86adc7a415f710d 100644 (file)
@@ -11,10 +11,7 @@ options {
 {% include "_common/controls.conf.j2" %}
 
 view internal {
-        zone "." {
-                type hint;
-                file "../../_common/root.hint";
-        };
+       {% include_indented "_common/root.hint.conf" %}
 
         recursion yes;
         allow-query-cache { 10.53.0.3; 10.53.0.4; };
index 511d82f84eaa165ebddf6715920ff13d1292e937..77b77b8cf31346a17ae553d525e02c9b8069d327 100644 (file)
@@ -44,10 +44,7 @@ include "trusted.conf";
 
                include "trusted.conf";
 
-               zone "." {
-                       type hint;
-                       file "../../_common/root.hint";
-               };
+               {% include_indented "_common/root.hint.conf" %}
 
                zone secure.example {
                        type static-stub;
@@ -65,10 +62,7 @@ include "trusted.conf";
                allow-recursion { none; };
                dnssec-validation no;
 
-               zone "." {
-                       type hint;
-                       file "../../_common/root.hint";
-               };
+               {% include_indented "_common/root.hint.conf" %}
 
                zone secure.example {
                        type secondary;
@@ -81,8 +75,5 @@ include "trusted.conf";
                };
        };
 {% else %}
-       zone "." {
-               type hint;
-               file "../../_common/root.hint";
-       };
+       {% include_indented "_common/root.hint.conf" %}
 {% endif %}
index d9fb336926c114f2d79d23f14732d835c64c398a..ae0c58917182cd995337f0a915e57ce8a1c695f8 100644 (file)
@@ -42,25 +42,16 @@ options {
                };
        };
 {% elif broken_key %}
-       zone "." {
-               type hint;
-               file "../../_common/root.hint";
-       };
+       {% include_indented "_common/root.hint.conf" %}
 
        include "broken.conf";
 {% elif many_anchors %}
-       zone "." {
-               type hint;
-               file "../../_common/root.hint";
-       };
+       {% include_indented "_common/root.hint.conf" %}
 
        include "many-managed.conf";
        include "many-trusted.conf";
 {% else %}
-       zone "." {
-               type hint;
-               file "../../_common/root.hint";
-       };
+       {% include_indented "_common/root.hint.conf" %}
 
        include "trusted.conf";
 {% endif %}
index e2eaa065b035c7c48692c4dd41aaeff471489436..c93df98a366131d05371739afc48f3b27ada54ca 100644 (file)
@@ -9,15 +9,9 @@ options {
 {% include "_common/controls.conf.j2" %}
 
 view view1 {
-       zone "." {
-               type hint;
-               file "../../_common/root.hint";
-       };
+       {% include_indented "_common/root.hint.conf" %}
 };
 
 view view2 {
-       zone "." {
-               type hint;
-               file "../../_common/root.hint";
-       };
+       {% include_indented "_common/root.hint.conf" %}
 };
index ee725b83a6aecf87533c4663a62fb853b3d9a2df..1c08e5859d47a2cb1cc4187bcd5eda0a805df840 100644 (file)
@@ -15,10 +15,7 @@ view all {
 
        recursion no;
 
-       zone "." {
-               type hint;
-               file "../../_common/root.hint";
-       };
+       {% include_indented "_common/root.hint.conf" %}
 };
 
 view none {
index 4b7ca6f8436fd42a1cabb01de4de8769d801d6cb..db9b2a783f5d20ac49229f1ff7c3c233bdd53987 100644 (file)
@@ -20,10 +20,7 @@ view "internal" {
        match-clients { 10.53.0.2;
                        10.53.0.3; };
 
-       zone "." {
-               type hint;
-               file "../../_common/root.hint";
-       };
+       {% include_indented "_common/root.hint.conf" %}
 
        zone "example" {
                type primary;
@@ -54,10 +51,7 @@ view "internal" {
 view "external" {
        match-clients { any; };
 
-       zone "." {
-               type hint;
-               file "../../_common/root.hint";
-       };
+       {% include_indented "_common/root.hint.conf" %}
 
        zone "example" {
                type primary;