Fixed dns::server for Puppet 2.7
This commit is contained in:
parent
8a729c3e9f
commit
97821c14ac
1 changed files with 34 additions and 33 deletions
|
@ -72,6 +72,39 @@ class dns::server {
|
||||||
require => Exec["rndc-confgen"],
|
require => Exec["rndc-confgen"],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
define populate_zones() {
|
||||||
|
$zone = $name
|
||||||
|
file { "${confdir}/db.${zone}":
|
||||||
|
ensure => present,
|
||||||
|
content => template("dns/db.erb"),
|
||||||
|
mode => 0640,
|
||||||
|
owner => "root",
|
||||||
|
group => "bind",
|
||||||
|
require => Package["bind"],
|
||||||
|
notify => Service["named"],
|
||||||
|
}
|
||||||
|
file { "${confdir}/db.${zone}-dynamic":
|
||||||
|
ensure => present,
|
||||||
|
source => [ "puppet:///files/dns/db.${zone}-dynamic.${homename}",
|
||||||
|
"puppet:///files/dns/empty", ],
|
||||||
|
mode => 0640,
|
||||||
|
owner => "root",
|
||||||
|
group => "bind",
|
||||||
|
require => Package["bind"],
|
||||||
|
notify => Service["named"],
|
||||||
|
}
|
||||||
|
file { "${confdir}/db.${zone}-static":
|
||||||
|
ensure => present,
|
||||||
|
source => [ "puppet:///files/dns/db.${zone}-static.${homename}",
|
||||||
|
"puppet:///files/dns/empty", ],
|
||||||
|
mode => 0640,
|
||||||
|
owner => "root",
|
||||||
|
group => "bind",
|
||||||
|
require => Package["bind"],
|
||||||
|
notify => Service["named"],
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
case $operatingsystem {
|
case $operatingsystem {
|
||||||
"ubuntu": {
|
"ubuntu": {
|
||||||
$ipaddr = $dns_listener_ipaddr
|
$ipaddr = $dns_listener_ipaddr
|
||||||
|
@ -93,39 +126,7 @@ class dns::server {
|
||||||
require => Package["bind"],
|
require => Package["bind"],
|
||||||
notify => Service["named"],
|
notify => Service["named"],
|
||||||
}
|
}
|
||||||
define populate_zones {
|
populate_zones { $dns_zones: }
|
||||||
$zone = $name
|
|
||||||
file { "${confdir}/db.${zone}":
|
|
||||||
ensure => present,
|
|
||||||
content => template("dns/db.erb"),
|
|
||||||
mode => 0640,
|
|
||||||
owner => "root",
|
|
||||||
group => "bind",
|
|
||||||
require => Package["bind"],
|
|
||||||
notify => Service["named"],
|
|
||||||
}
|
|
||||||
file { "${confdir}/db.${zone}-dynamic":
|
|
||||||
ensure => present,
|
|
||||||
source => [ "puppet:///files/dns/db.${zone}-dynamic.${homename}",
|
|
||||||
"puppet:///files/dns/empty", ],
|
|
||||||
mode => 0640,
|
|
||||||
owner => "root",
|
|
||||||
group => "bind",
|
|
||||||
require => Package["bind"],
|
|
||||||
notify => Service["named"],
|
|
||||||
}
|
|
||||||
file { "${confdir}/db.${zone}-static":
|
|
||||||
ensure => present,
|
|
||||||
source => [ "puppet:///files/dns/db.${zone}-static.${homename}",
|
|
||||||
"puppet:///files/dns/empty", ],
|
|
||||||
mode => 0640,
|
|
||||||
owner => "root",
|
|
||||||
group => "bind",
|
|
||||||
require => Package["bind"],
|
|
||||||
notify => Service["named"],
|
|
||||||
}
|
|
||||||
}
|
|
||||||
populate_zones { $dns_zones: }
|
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
file { "${confdir}/named.conf":
|
file { "${confdir}/named.conf":
|
||||||
|
|
Loading…
Add table
Reference in a new issue