Initial commit for bind, templates for named.conf.* and zones and zone creation.
This commit is contained in:
parent
37e39c5c19
commit
0f21d12012
4 changed files with 119 additions and 2 deletions
|
@ -74,9 +74,10 @@ class dns::server {
|
|||
|
||||
case $operatingsystem {
|
||||
"ubuntu": {
|
||||
$ipaddr = $dns_listener_ipaddr
|
||||
file { "${confdir}/named.conf.local":
|
||||
ensure => present,
|
||||
source => "puppet:///files/dns/named.conf.${fqdn}",
|
||||
content => template("dns/named.conf.local.erb"),
|
||||
mode => 0640,
|
||||
owner => "root",
|
||||
group => "bind",
|
||||
|
@ -85,13 +86,46 @@ class dns::server {
|
|||
}
|
||||
file { "${confdir}/named.conf.options":
|
||||
ensure => present,
|
||||
source => "puppet:///files/dns/named.conf.options.${fqdn}",
|
||||
content => template("dns/named.conf.options.erb"),
|
||||
mode => 0640,
|
||||
owner => "root",
|
||||
group => "bind",
|
||||
require => Package["bind"],
|
||||
notify => Service["named"],
|
||||
}
|
||||
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"],
|
||||
}
|
||||
}
|
||||
populate_zones { $dns_zones: }
|
||||
}
|
||||
default: {
|
||||
file { "${confdir}/named.conf":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue