From fc65db3de507b03680b4c5c53957f15d6614e6da Mon Sep 17 00:00:00 2001 From: mwiegand Date: Sun, 14 Nov 2021 16:18:27 +0100 Subject: [PATCH] bind remove db prefix --- bundles/bind/files/named.conf.local | 2 +- bundles/bind/items.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bundles/bind/files/named.conf.local b/bundles/bind/files/named.conf.local index 4bf32ba..b5dbdc7 100644 --- a/bundles/bind/files/named.conf.local +++ b/bundles/bind/files/named.conf.local @@ -57,7 +57,7 @@ view "${view_name}" { % endfor }; % endif - file "/var/lib/bind/${view_name}/db.${zone_name}"; + file "/var/lib/bind/${view_name}/${zone_name}"; }; % endfor diff --git a/bundles/bind/items.py b/bundles/bind/items.py index 616af3c..ba54c95 100644 --- a/bundles/bind/items.py +++ b/bundles/bind/items.py @@ -109,7 +109,7 @@ for view_name, view_conf in master_node.metadata.get('bind/views').items(): } for zone_name, zone_conf in view_conf['zones'].items(): - files[f"/var/lib/bind/{view_name}/db.{zone_name}"] = { + files[f"/var/lib/bind/{view_name}/{zone_name}"] = { 'owner': 'bind', 'group': 'bind', 'needs': [ @@ -123,10 +123,10 @@ for view_name, view_conf in master_node.metadata.get('bind/views').items(): ], } #FIXME: slave doesnt get updated if db doesnt get rewritten on each apply - files[f"/var/lib/bind/{view_name}/db.{zone_name}"].update({ + files[f"/var/lib/bind/{view_name}/{zone_name}"].update({ 'source': 'db', 'content_type': 'mako', - 'unless': f"test -f /var/lib/bind/{view_name}/db.{zone_name}" if zone_conf.get('allow_update', False) else 'false', + 'unless': f"test -f /var/lib/bind/{view_name}/{zone_name}" if zone_conf.get('allow_update', False) else 'false', 'context': { 'serial': datetime.now().strftime('%Y%m%d%H'), 'records': zone_conf['records'],