Make rake lint happy by fixing WARNINGS

This commit is contained in:
Cedric DEFORTIS 2017-04-27 09:26:45 +02:00
parent 9d640d64af
commit 3ad9e7d8d3
5 changed files with 33 additions and 33 deletions

View File

@ -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,

View File

@ -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}",

View File

@ -6,7 +6,7 @@ define bind::server (
$key = undef,
$transfers = undef,
) {
include bind
include ::bind
concat::fragment { "bind-server-${name}":
order => 10,

View File

@ -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,
}
}

View File

@ -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)) {