$_owner = $name
}
- common::concatfilepart{"bind.${name}":
- file => "/etc/bind/pri/${zone}",
+ concat::fragment {"bind.${name}":
ensure => $ensure,
- notify => Service["bind9"],
+ target => "/etc/bind/pri/${zone}.conf",
content => template("bind/mx-record.erb"),
+ notify => Service["bind9"],
require => [Bind::Zone[$zone], Bind::A[$host]],
}
}
$_owner = $name
}
- common::concatfilepart {"${zone}.${record_type}.${name}":
+ concat::fragment {"${zone}.${record_type}.${name}":
ensure => $ensure,
- file => "/etc/bind/pri/${zone}.conf",
+ target => "/etc/bind/pri/${zone}.conf",
content => template("bind/default-record.erb"),
notify => Service["bind9"],
}
$zone_xfers=false,
$zone_masters=false,
$zone_origin=false) {
+
+ concat {"/etc/bind/pri/${name}.conf":
+ owner => root,
+ group => root,
+ mode => '0644',
+ }
+
+ concat {"/etc/bind/zones/${name}.conf":
+ owner => root,
+ group => root,
+ mode => '0644',
+ }
- common::concatfilepart {"bind.zones.${name}":
+ concat::fragment {"bind.zones.${name}":
ensure => $ensure,
+ target => "/etc/bind/zones/${name}.conf",
notify => Service["bind9"],
- file => "/etc/bind/zones/${name}.conf",
require => Package["bind9"],
}
- common::concatfilepart {"named.local.zone.${name}":
+ concat::fragment {"named.local.zone.${name}":
ensure => $ensure,
- notify => Service["bind9"],
- file => "/etc/bind/named.conf.local",
+ target => "/etc/bind/named.conf.local",
content => "include \"/etc/bind/zones/${name}.conf\";\n",
+ notify => Service["bind9"],
require => Package["bind9"],
}
if !$zone_masters {
fail "No master defined for ${name}!"
}
- Common::Concatfilepart["bind.zones.${name}"] {
+ Concat::Fragment["bind.zones.${name}"] {
content => template("bind/zone-slave.erb"),
}
## END of slave
fail "No ttl defined for ${name}!"
}
- Common::Concatfilepart["bind.zones.${name}"] {
+ Concat::Fragment["bind.zones.${name}"] {
content => template("bind/zone-master.erb"),
}
- common::concatfilepart {"00.bind.${name}":
- ensure => $ensure,
- file => "/etc/bind/pri/${name}.conf",
+ concat::fragment {"00.bind.${name}":
+ ensure => $ensure,
+ target => "/etc/bind/pri/${name}.conf",
content => template("bind/zone-header.erb"),
require => Package["bind9"],
}
file {"/etc/bind/pri/${name}.conf.d":
- ensure => directory,
- mode => 0700,
- purge => true,
+ ensure => absent,
+ mode => 0700,
+ purge => true,
recurse => true,
backup => false,
force => true,