summaryrefslogtreecommitdiff
path: root/manifests/zone.pp
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2023-06-09 14:38:51 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2023-06-09 14:38:51 +0200
commit7b3fed95f91a6877a88758558babf1bc549eeffc (patch)
tree85760a3c81ce5c35764140e507fae5d4db1befa9 /manifests/zone.pp
parentRevert extra rndc-keyfile include. (diff)
downloaddns-7b3fed95f91a6877a88758558babf1bc549eeffc.tar.gz
dns-7b3fed95f91a6877a88758558babf1bc549eeffc.tar.xz
Place each zone and key declaration in own file.
This removes the dependency on concat, and allows for non-purging configurations.
Diffstat (limited to '')
-rw-r--r--manifests/zone.pp19
1 files changed, 8 insertions, 11 deletions
diff --git a/manifests/zone.pp b/manifests/zone.pp
index 817451b..e6fc397 100644
--- a/manifests/zone.pp
+++ b/manifests/zone.pp
@@ -162,22 +162,19 @@ define dns::zone (
ttl => $record['ttl'],
}
}
-
} else {
dns_zone2 { $zone_:
ensure => 'absent',
}
}
- if $ensure == 'present' {
- concat::fragment { "Dns::Zone - ${zone_}":
- target => $dns::config_file,
- content => epp("${module_name}/zoneconf.epp", {
- zone => $zone_,
- type => $type,
- update_policy => $update_policy,
- }),
- require => Dns_zone2[$zone_],
- }
+ file { "${dns::zoneconf_dir}/${zone_}conf":
+ ensure => $ensure,
+ content => epp("${module_name}/zoneconf.epp", {
+ zone => $zone_,
+ type => $type,
+ update_policy => $update_policy,
+ }),
+ require => Dns_zone2[$zone_],
}
}