From c472f5250a80e6796f8b7ad50b704d0b78b4f59b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20M=E4kinen?= Date: Wed, 21 Mar 2012 15:48:56 +0200 Subject: [PATCH] Cleanup for DNS master zone config file. --- dns/templates/zone.master.erb | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/dns/templates/zone.master.erb b/dns/templates/zone.master.erb index 942b498..c3a1a06 100644 --- a/dns/templates/zone.master.erb +++ b/dns/templates/zone.master.erb @@ -1,14 +1,20 @@ zone "<%= zone %>" { type master; - <% if zone.match(/\//) %> +<% if zone.match(/\//) -%> file "<%= zonedir %>/db.<%= zone.sub(/\//, '-') %>"; - <% else %> +<% else -%> file "<%= zonedir %>/db.<%= zone %>"; - <% end -%> +<% end -%> allow-transfer { - <% slaves.each_pair do |k, v| -%> +<% if slaves != [] -%> +<% slaves.each_pair do |k, v| -%> <%= v['ip'] %>; - <% end -%> +<% end -%> +<% else -%> + none; +<% end -%> + }; + allow-update { + none; }; - allow-update { none; }; };