diff options
-rw-r--r-- | manifests/dns_zones.pp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/manifests/dns_zones.pp b/manifests/dns_zones.pp index f4bf630..fbd6061 100644 --- a/manifests/dns_zones.pp +++ b/manifests/dns_zones.pp @@ -24,6 +24,13 @@ class profiles::dns_zones ( $zonedata.each |$zone, $_| { Dns_record <<| zone == $zone |>> + + exec { "reload ${zone}": + command => ['rndc' ,'reload', $zone], + path => ['/usr/bin', '/usr/sbin'], + refreshonly => true, + subscribe => Dns_zone[$zone], + } } $records.each |$zone, $record_entries| { @@ -34,7 +41,10 @@ class profiles::dns_zones ( ["${zone} ${type} ${key} ${value}", $d] } - create_resources(dns_record, Hash($zone_hash), { 'zone' => $zone, }) + create_resources(dns_record, Hash($zone_hash), { + 'zone' => $zone, + }) + } |