summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifests/zone.pp1
-rw-r--r--templates/zone-header.erb2
-rw-r--r--templates/zone-master.erb2
-rw-r--r--templates/zone-slave.erb2
4 files changed, 4 insertions, 3 deletions
diff --git a/manifests/zone.pp b/manifests/zone.pp
index 52a2e5f..7e1ec71 100644
--- a/manifests/zone.pp
+++ b/manifests/zone.pp
@@ -16,6 +16,7 @@
# *$zone_origin*: The origin of the zone
#
define bind::zone (
+ $zone = $name,
$ensure = present,
$is_slave = false,
$zone_ttl = false,
diff --git a/templates/zone-header.erb b/templates/zone-header.erb
index 418aef8..a9bb7b3 100644
--- a/templates/zone-header.erb
+++ b/templates/zone-header.erb
@@ -3,7 +3,7 @@ $TTL <%=zone_ttl%>
<% if zone_origin -%>
$ORIGIN <%=zone_origin%>
<% end -%>
-@ IN SOA <%=name%>. <%=zone_contact%>. (
+@ IN SOA <%=zone%>. <%=zone_contact%>. (
<%=zone_serial%> ; serial
<%=zone_refresh%> ; refresh
<%=zone_retry%> ; retry
diff --git a/templates/zone-master.erb b/templates/zone-master.erb
index 2ec3973..f66cd7b 100644
--- a/templates/zone-master.erb
+++ b/templates/zone-master.erb
@@ -1,5 +1,5 @@
# File managed by puppet
-zone "<%=name%>" IN {
+zone "<%=zone%>" IN {
type master;
file "/etc/bind/pri/<%=name%>.conf";
<% if zone_xfers and not zone_xfers.empty? -%>
diff --git a/templates/zone-slave.erb b/templates/zone-slave.erb
index 0ae7e5d..c867428 100644
--- a/templates/zone-slave.erb
+++ b/templates/zone-slave.erb
@@ -1,5 +1,5 @@
# File managed by puppet
-zone <%=name%> IN {
+zone <%=zone%> IN {
type slave;
<% if zone_masters.is_a?(Array) -%>
masters { <%= zone_masters.join('; ') -%>; };