From b7fdd9f7afd94ac17183a5e72d56be0aa71161f8 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Mon, 22 Jul 2013 22:42:09 -0300 Subject: Adding zone parameter to bind::zone so the same domains can be defined in different views --- manifests/zone.pp | 1 + templates/zone-header.erb | 2 +- templates/zone-master.erb | 2 +- templates/zone-slave.erb | 2 +- 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('; ') -%>; }; -- cgit v1.2.3