diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-02-15 22:45:59 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-02-16 15:37:14 +0100 |
commit | 0066e5bb4bd181df63a7415a10929dc513936238 (patch) | |
tree | ce3eb41d114f880ef05a47209664f7b77a11a709 /lib | |
parent | Create new zone if file doesn't exist. (diff) | |
download | dns_record-0066e5bb4bd181df63a7415a10929dc513936238.tar.gz dns_record-0066e5bb4bd181df63a7415a10929dc513936238.tar.xz |
Document want for zone_file path setting.
Diffstat (limited to '')
-rw-r--r-- | lib/puppet/functions/zones.rb | 8 |
1 files changed, 8 insertions, 0 deletions
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}.") |