Revision e1338843
Added by Greg Sutcliffe about 12 years ago
README.md | ||
---|---|---|
|
||
A puppet module to setup bind for The Foreman
|
||
|
||
## Dependencies
|
||
|
||
* Reworked Concat module (https://github.com/GregSutcliffe/pupmod-concat)
|
||
|
||
ToDo
|
||
----
|
||
OSes other than Debian
|
manifests/init.pp | ||
---|---|---|
ensure => directory;
|
||
}
|
||
|
||
include concat::setup
|
||
|
||
concat::fragment {
|
||
"dns_zone_${zone}-header":
|
||
order => 05,
|
||
target => "$publicviewpath",
|
||
concat_build { 'dns_zones':
|
||
order => ['*.dns'],
|
||
target => "${publicviewpath}",
|
||
notify => Service["$namedservicename"],
|
||
content => template("dns/publicView.conf-header.erb");
|
||
}
|
||
concat { "${publicviewpath}": }
|
||
|
||
concat_fragment { "dns_zones+05_${zone}.dns":
|
||
content => template("dns/publicView.conf-header.erb"),
|
||
}
|
||
|
||
service {
|
||
"$namedservicename":
|
manifests/zone.pp | ||
---|---|---|
include dns
|
||
include dns::params
|
||
|
||
$zone = $name
|
||
$filename = "db.${zone}"
|
||
$dnsdir = $dns::params::dnsdir
|
||
$zonefilename = "${dns::params::zonefilepath}/${filename}"
|
||
$publicviewpath = $dns::params::publicviewpath
|
||
$zonefilepath = $dns::params::zonefilepath
|
||
$vardir = $dns::params::vardir
|
||
$zone = $name
|
||
$filename = "db.${zone}"
|
||
$dnsdir = $dns::params::dnsdir
|
||
$zonefilename = "${dns::params::zonefilepath}/${filename}"
|
||
$publicviewpath = $dns::params::publicviewpath
|
||
$zonefilepath = $dns::params::zonefilepath
|
||
$vardir = $dns::params::vardir
|
||
$namedservicename = $dns::params::namedservicename
|
||
|
||
include concat::setup
|
||
|
||
concat { "${vardir}/puppetstore/${filename}": }
|
||
concat_build { "zonefile_${zone}":
|
||
order => ['*.zone'],
|
||
target => "${vardir}/puppetstore/${filename}",
|
||
notify => Service["$namedservicename"],
|
||
}
|
||
|
||
concat::fragment {
|
||
"dns_zone_${zone}": # this sets the named zones config
|
||
target => "$publicviewpath",
|
||
notify => Service["$namedservicename"],
|
||
content => template("dns/named.zone.erb");
|
||
"dns_zonefile_${zone}": # build zonefile header
|
||
order => "05",
|
||
target => "${vardir}/puppetstore/${filename}",
|
||
notify => Service["$namedservicename"],
|
||
content => template("dns/zone.header.erb");
|
||
concat_fragment { "dns_zones+10_${zone}.dns":
|
||
content => template("dns/named.zone.erb"),
|
||
notify => Service["$namedservicename"],
|
||
}
|
||
concat_fragment { "zonefile_${zone}+05_${zone}.zone":
|
||
content => template("dns/zone.header.erb"),
|
||
notify => Service["$namedservicename"],
|
||
}
|
||
|
||
exec { "create-zone_${zone}":
|
Also available in: Unified diff
Rework to use my rewritten concat module