More DNS fixes for Fedora and CentOS 6.

This commit is contained in:
Timo Mkinen 2012-01-20 14:57:14 +02:00
parent eab2dc4626
commit 1fb5c59940

View file

@ -58,7 +58,10 @@ class dns::server {
},
}
exec { "rndc-confgen":
command => "rndc-confgen -a -t ${chroot}",
command => $chroot ? {
"" => "rndc-confgen -r /dev/urandom -a",
default => "rndc-confgen -r /dev/urandom -a -t ${chroot}",
},
path => "/bin:/usr/bin:/sbin:/usr/sbin",
unless => "test -s ${chroot}${confdir}/rndc.key",
require => File["${chroot}${confdir}/rndc.key"],
@ -114,7 +117,15 @@ class dns::server {
}
}
default: {
file { "${chroot}${confdir}/named.conf":
file { "named.conf":
path => $operatingsystem ? {
"centos" => $operatingsystemrelease ? {
/^5\..*/ => "${chroot}${confdir}/named.conf",
default => "/etc/named.conf",
},
"fedora" => "/etc/named.conf",
default => "${chroot}${confdir}/named.conf",
},
ensure => present,
source => [ "puppet:///files/dns/named.conf.${fqdn}",
"puppet:///files/dns/named.conf", ],