Merged in oherrala/puppet (pull request #20)
This commit is contained in:
commit
085d67c1c0
1 changed files with 17 additions and 9 deletions
|
@ -107,6 +107,16 @@ class dns::server {
|
|||
}
|
||||
}
|
||||
|
||||
exec { "named-checkconf":
|
||||
command => $chroot ? {
|
||||
"" => "/usr/sbin/named-checkconf -z",
|
||||
default => "/usr/sbin/named-checkconf -z -t ${chroot}"
|
||||
},
|
||||
refreshonly => true,
|
||||
require => Exec["rndc-confgen"],
|
||||
notify => Service["named"],
|
||||
}
|
||||
|
||||
service { "named":
|
||||
name => $::operatingsystem ? {
|
||||
"ubuntu" => "bind9",
|
||||
|
@ -123,7 +133,6 @@ class dns::server {
|
|||
"openbsd" => "/usr/sbin/named",
|
||||
default => undef,
|
||||
},
|
||||
require => Exec["rndc-confgen"],
|
||||
}
|
||||
|
||||
file { "named.conf":
|
||||
|
@ -155,7 +164,7 @@ class dns::server {
|
|||
user => "root",
|
||||
refreshonly => true,
|
||||
require => File["/usr/local/sbin/generate-named-conf.sh"],
|
||||
notify => Service["named"],
|
||||
notify => Exec["named-checkconf"],
|
||||
}
|
||||
|
||||
file { "${chroot}${confdir}/named.conf.options":
|
||||
|
@ -170,7 +179,7 @@ class dns::server {
|
|||
"openbsd" => undef,
|
||||
default => Package["bind"],
|
||||
},
|
||||
notify => Service["named"],
|
||||
notify => Exec["named-checkconf"],
|
||||
}
|
||||
|
||||
file { "${chroot}${confdir}/named.conf.local":
|
||||
|
@ -185,7 +194,7 @@ class dns::server {
|
|||
"openbsd" => undef,
|
||||
default => Package["bind"],
|
||||
},
|
||||
notify => Service["named"],
|
||||
notify => Exec["named-checkconf"],
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -225,7 +234,7 @@ class dns::server::ldap inherits dns::server {
|
|||
command => "dnsdump.py --notest /var/named/master.in /var/named/master",
|
||||
require => File["/usr/local/sbin/dnsdump.py"],
|
||||
unless => "dnsdump.py --test /var/named/master.in /var/named/master",
|
||||
notify => Service["named"]
|
||||
notify => Exec["named-checkconf"],
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -389,7 +398,7 @@ define dns::zone($role = "master", $master = "", $slaves = [], $forwarders = [],
|
|||
"openbsd" => undef,
|
||||
default => Package["bind"],
|
||||
},
|
||||
notify => Service["named"],
|
||||
notify => Exec["named-checkconf"],
|
||||
}
|
||||
file { "${dns::server::chroot}${zonedir}/db.${zone}-dynamic":
|
||||
ensure => present,
|
||||
|
@ -405,7 +414,7 @@ define dns::zone($role = "master", $master = "", $slaves = [], $forwarders = [],
|
|||
"openbsd" => undef,
|
||||
default => Package["bind"],
|
||||
},
|
||||
notify => Service["named"],
|
||||
notify => Exec["named-checkconf"],
|
||||
}
|
||||
file { "${dns::server::chroot}${zonedir}/db.${zone}-static":
|
||||
ensure => present,
|
||||
|
@ -421,7 +430,7 @@ define dns::zone($role = "master", $master = "", $slaves = [], $forwarders = [],
|
|||
"openbsd" => undef,
|
||||
default => Package["bind"],
|
||||
},
|
||||
notify => Service["named"],
|
||||
notify => Exec["named-checkconf"],
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -468,5 +477,4 @@ class dns::nsupdate {
|
|||
minute => "*/5",
|
||||
require => File["/usr/local/sbin/nsupdate.sh"],
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue