Commit 855e0d06 authored by Lucas Nussbaum's avatar Lucas Nussbaum

Do not clean old zone files before execution

parent db6acd90
Pipeline #60677 passed with stages
in 1 minute and 48 seconds
......@@ -403,6 +403,8 @@ def write_zone(zone)
File.write(zone.file_path, zone.dump)
# main method
def generate_puppet_bindg5k(options)
$options = options
......@@ -423,7 +425,7 @@ def generate_puppet_bindg5k(options)
dest_dir = "#{$options[:output_dir]}/platforms/production/modules/generated/files/bind/"
zones_dir = File.join(dest_dir, "zones/#{site_uid}")
if File::exist?(zones_dir)
if CLEAN_OLD_ZONE_FILES and File::exist?(zones_dir)
# Cleanup of old zone files
Find.find(zones_dir) do |path|
next if not File::file?(path)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment