diff --git a/manifests/init.pp b/manifests/init.pp index d820662..d3c16da 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -15,7 +15,7 @@ class bind ( File { ensure => present, owner => 'root', - group => $bind_group, + group => $::bind::defaults::bind_group, mode => '0644', require => Package['bind'], notify => Service['bind'], @@ -25,7 +25,7 @@ class bind ( package { 'bind': ensure => latest, - name => $bind_package, + name => $::bind::defaults::bind_package, } if $dnssec { @@ -42,7 +42,7 @@ class bind ( bind::key { 'rndc-key': algorithm => 'hmac-md5', secret_bits => '512', - keydir => $confdir, + keydir => $bind::defaults::confdir, keyfile => 'rndc.key', include => false, } @@ -55,36 +55,36 @@ class bind ( content => template('bind/rndc-helper.erb'), } - file { "${confdir}/zones": - ensure => directory, - mode => '2755', + file { "${::bind::defaults::confdir}/zones": + ensure => directory, + mode => '2755', } - file { $namedconf: + file { $::bind::defaults::namedconf: content => template('bind/named.conf.erb'), } - if $include_default_zones and $default_zones_source { - file { $default_zones_include: - source => $default_zones_source, + if $::bind::defaults::include_default_zones and $::bind::defaults::default_zones_source { + file { $::bind::defaults::default_zones_include: + source => $::bind::defaults::default_zones_source, } } - class { 'bind::keydir': - keydir => "${confdir}/keys", + class { '::bind::keydir': + keydir => "${::bind::defaults::confdir}/keys", } concat { [ - "${confdir}/acls.conf", - "${confdir}/keys.conf", - "${confdir}/views.conf", - "${confdir}/servers.conf", - "${confdir}/logging.conf", - "${confdir}/view-mappings.txt", - "${confdir}/domain-mappings.txt", + "${::bind::defaults::confdir}/acls.conf", + "${::bind::defaults::confdir}/keys.conf", + "${::bind::defaults::confdir}/views.conf", + "${::bind::defaults::confdir}/servers.conf", + "${::bind::defaults::confdir}/logging.conf", + "${::bind::defaults::confdir}/view-mappings.txt", + "${::bind::defaults::confdir}/domain-mappings.txt", ]: owner => 'root', - group => $bind_group, + group => $::bind::defaults::bind_group, mode => '0644', warn => true, require => Package['bind'], @@ -92,20 +92,20 @@ class bind ( } concat::fragment { 'bind-logging-header': - order => "00-header", - target => "${confdir}/logging.conf", + order => '00-header', + target => "${::bind::defaults::confdir}/logging.conf", content => "logging {\n"; } concat::fragment { 'bind-logging-footer': - order => "99-footer", - target => "${confdir}/logging.conf", + order => '99-footer', + target => "${::bind::defaults::confdir}/logging.conf", content => "};\n"; } service { 'bind': ensure => running, - name => $bind_service, + name => $::bind::defaults::bind_service, enable => true, hasrestart => true, hasstatus => true, diff --git a/manifests/logging/category.pp b/manifests/logging/category.pp index 6f613c2..15af2e0 100644 --- a/manifests/logging/category.pp +++ b/manifests/logging/category.pp @@ -1,7 +1,7 @@ # ex: syntax=puppet si ts=4 sw=4 et define bind::logging::category ( - $channels + $channels ) { concat::fragment { "bind-logging-category-${name}": order => "60-${name}", diff --git a/manifests/server.pp b/manifests/server.pp index fe9475f..0bf9412 100644 --- a/manifests/server.pp +++ b/manifests/server.pp @@ -6,7 +6,7 @@ define bind::server ( $key = undef, $transfers = undef, ) { - include bind + include ::bind concat::fragment { "bind-server-${name}": order => 10, diff --git a/manifests/updater.pp b/manifests/updater.pp index c90aedf..499aa9e 100644 --- a/manifests/updater.pp +++ b/manifests/updater.pp @@ -4,10 +4,10 @@ class bind::updater ( $keydir = undef, ) inherits bind::defaults { - if $nsupdate_package { + if $::bind::defaults::nsupdate_package { package { 'bind-tools': ensure => present, - name => $nsupdate_package, + name => $::bind::defaults::nsupdate_package, } } diff --git a/manifests/zone.pp b/manifests/zone.pp index 6fe0b05..867697d 100644 --- a/manifests/zone.pp +++ b/manifests/zone.pp @@ -22,7 +22,7 @@ define bind::zone ( $forwarders_port = 53, ) { # where there is a zone, there is a server - include bind + include ::bind # Pull some platform defaults and `bind` class parameters into the local scope $cachedir = $::bind::defaults::cachedir @@ -54,15 +54,15 @@ define bind::zone ( } unless !($allow_updates != '' and ! $dynamic) { - fail("allow_updates may only be provided for bind::zone resources with dynamic set to true") + fail('allow_updates may only be provided for bind::zone resources with dynamic set to true') } unless !($dnssec and ! $dynamic) { - fail("dnssec may only be true for bind::zone resources with dynamic set to true") + fail('dnssec may only be true for bind::zone resources with dynamic set to true') } unless !($key_directory != '' and ! $dnssec) { - fail("key_directory may only be provided for bind::zone resources with dnssec set to true") + fail('key_directory may only be provided for bind::zone resources with dnssec set to true') } unless !($allow_notify != '' and ! member(['slave', 'stub'], $zone_type)) {