namevar can be used as "$owner", if $owner is not set.
*/
define bind::a($ensure=present,
$zone,
- $owner,
+ $owner=false,
$host,
$ttl=false) {
*/
define bind::aaaa($ensure=present,
$zone,
- $owner,
+ $owner=false,
$host,
$ttl=false) {
*/
define bind::cname($ensure=present,
$zone,
- $owner,
+ $owner=false,
$host,
$ttl=false) {
*/
define bind::mx($ensure=present,
$zone,
- $owner,
+ $owner=false,
$priority,
$host,
$ttl=false) {
+ if $owner {
+ $_owner = $owner
+ } else {
+ $_owner = $name
+ }
+
common::concatfilepart{"bind.${name}":
file => "/etc/bind/pri/${zone}",
ensure => $ensure,
*/
define bind::ns($ensure=present,
$zone,
- $owner,
+ $owner=false,
$host,
$ttl=false) {
*/
define bind::record($ensure=present,
$zone,
- $owner,
+ $owner=false,
$host,
$record_type,
$record_class='IN',
$ttl=false) {
+ if $owner {
+ $_owner = $owner
+ } else {
+ $_owner = $name
+ }
+
common::concatfilepart {"${zone}.${record_type}.${name}":
ensure => $ensure,
file => "/etc/bind/pri/${zone}.conf",
<% if ttl -%>
-<%=owner%> <%=ttl%> <%=record_class%> <%=record_type%> <%=host%>
+<%=_owner%> <%=ttl%> <%=record_class%> <%=record_type%> <%=host%>
<% else -%>
-<%=owner%> <%=record_class%> <%=record_type%> <%=host%>
+<%=_owner%> <%=record_class%> <%=record_type%> <%=host%>
<% end -%>