From 7b3fed95f91a6877a88758558babf1bc549eeffc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Fri, 9 Jun 2023 14:38:51 +0200 Subject: Place each zone and key declaration in own file. This removes the dependency on concat, and allows for non-purging configurations. --- manifests/zone.pp | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'manifests/zone.pp') 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_], } } -- cgit v1.2.3