From 0066e5bb4bd181df63a7415a10929dc513936238 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Tue, 15 Feb 2022 22:45:59 +0100 Subject: Document want for zone_file path setting. --- lib/puppet/functions/zones.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib') diff --git a/lib/puppet/functions/zones.rb b/lib/puppet/functions/zones.rb index 2f675d4..ef54427 100644 --- a/lib/puppet/functions/zones.rb +++ b/lib/puppet/functions/zones.rb @@ -6,6 +6,14 @@ def get_zone(zone_name) end if ! $zones[zone_name] + # TODO templetize this path! + # I would prefer if the user did something like + # class { 'dns_record': + # zone_pattern => '/var/named/dynamic/db.%s', + # } + # and here we used dns_record.zone_pattern. + # But I don't know how. + # Functions have the method `closure_scope` but we dont't. zone_file = "/var/named/dynamic/db.#{zone_name}" if File.exists?(zone_file) $zones[zone_name] = Zonefile.from_file(zone_file, "#{zone_name}.") -- cgit v1.2.3