From dc30e40b36d7b6081ab9bdfbe471614bcc0f6116 Mon Sep 17 00:00:00 2001 From: Steffen Zieger Date: Wed, 3 Aug 2016 15:49:18 +0200 Subject: [PATCH] various lint changes --- manifests/client.pp | 2 +- manifests/database.pp | 4 ++-- manifests/imfile.pp | 2 +- manifests/init.pp | 10 +++++----- manifests/params.pp | 8 ++++---- manifests/snippet.pp | 2 +- templates/rsyslog.conf.erb | 2 +- 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/manifests/client.pp b/manifests/client.pp index 8ce60f0..386df49 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -116,7 +116,7 @@ class rsyslog::client ( } if $ssl_auth_mode != 'anon' and $rsyslog::ssl == false { - fail("You need to enable SSL in order to use ssl_auth_mode.") + fail('You need to enable SSL in order to use ssl_auth_mode.') } if $ssl_permitted_peer and $ssl_auth_mode != 'x509/name' { diff --git a/manifests/database.pp b/manifests/database.pp index f847f12..e03badf 100644 --- a/manifests/database.pp +++ b/manifests/database.pp @@ -33,8 +33,8 @@ class rsyslog::database ( $db_module = "om${backend}" case $backend { - mysql: { $db_package = $rsyslog::mysql_package_name } - pgsql: { $db_package = $rsyslog::pgsql_package_name } + 'mysql': { $db_package = $rsyslog::mysql_package_name } + 'pgsql': { $db_package = $rsyslog::pgsql_package_name } default: { fail("Unsupported backend: ${backend}. Only MySQL (mysql) and PostgreSQL (pgsql) are supported.") } } diff --git a/manifests/imfile.pp b/manifests/imfile.pp index c06424d..e05685f 100644 --- a/manifests/imfile.pp +++ b/manifests/imfile.pp @@ -37,7 +37,7 @@ define rsyslog::imfile( $imfile_template = 'rsyslog/imfile.erb', ) { - include rsyslog + include ::rsyslog $extra_modules = $rsyslog::extra_modules # This mode should defined when having multiline messages. diff --git a/manifests/init.pp b/manifests/init.pp index 732ba97..0fb01a8 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -43,7 +43,7 @@ class rsyslog ( $local_host_name = undef, $max_message_size = $rsyslog::params::max_message_size, $system_log_rate_limit_interval = $rsyslog::params::system_log_rate_limit_interval, - $system_log_rateLimit_burst = $rsyslog::params::system_log_rateLimit_burst, + $system_log_rate_limit_burst = $rsyslog::params::system_log_rate_limit_burst, $extra_modules = $rsyslog::params::extra_modules, $default_template = $rsyslog::params::default_template, $msg_reduction = $rsyslog::params::msg_reduction, @@ -54,12 +54,12 @@ class rsyslog ( $im_journal_ratelimit_burst = $rsyslog::params::im_journal_ratelimit_burst, $im_journal_ignore_previous_messages = $rsyslog::params::im_journal_ignore_previous_messages ) inherits rsyslog::params { - class { 'rsyslog::install': } - class { 'rsyslog::config': } + class { '::rsyslog::install': } + class { '::rsyslog::config': } if $extra_modules != [] { - class { 'rsyslog::modload': } + class { '::rsyslog::modload': } } - class { 'rsyslog::service': } + class { '::rsyslog::service': } } diff --git a/manifests/params.pp b/manifests/params.pp index b616d29..a545408 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -15,7 +15,7 @@ class rsyslog::params { $max_message_size = '2k' $system_log_rate_limit_interval = '1' - $system_log_rateLimit_burst = '100' + $system_log_rate_limit_burst = '100' $purge_rsyslog_d = false $extra_modules = [] $default_template = undef @@ -30,7 +30,7 @@ class rsyslog::params { case $::osfamily { 'Debian': { case $::operatingsystem { - 'Debian': { + default: { $log_user = 'root' $run_user = 'root' $run_group = 'root' @@ -194,7 +194,7 @@ class rsyslog::params { 'FreeBSD': { $rsyslog_package_name = 'sysutils/rsyslog8' $relp_package_name = false - $mysql_package_name = false + $mysql_package_name = false $pgsql_package_name = false $gnutls_package_name = false $package_status = 'present' @@ -229,7 +229,7 @@ class rsyslog::params { 'Gentoo': { $rsyslog_package_name = 'app-admin/rsyslog' $relp_package_name = false - $mysql_package_name = 'rsyslog-mysql' + $mysql_package_name = 'rsyslog-mysql' $pgsql_package_name = 'rsyslog-pgsql' $gnutls_package_name = false $package_status = 'present' diff --git a/manifests/snippet.pp b/manifests/snippet.pp index e2f5059..8c27443 100644 --- a/manifests/snippet.pp +++ b/manifests/snippet.pp @@ -22,7 +22,7 @@ define rsyslog::snippet( $ensure = 'present', $file_mode = 'undef' ) { - include rsyslog + include ::rsyslog if $file_mode == 'undef' { $file_mode_real = $rsyslog::perm_file diff --git a/templates/rsyslog.conf.erb b/templates/rsyslog.conf.erb index 52fe235..ede26f1 100644 --- a/templates/rsyslog.conf.erb +++ b/templates/rsyslog.conf.erb @@ -30,7 +30,7 @@ $MaxMessageSize <%= scope.lookupvar('rsyslog::max_message_size') %> # Set rate limit for messages received. # $SystemLogRateLimitInterval <%= scope.lookupvar('rsyslog::system_log_rate_limit_interval') %> -$SystemLogRateLimitBurst <%= scope.lookupvar('rsyslog::system_log_rateLimit_burst') %> +$SystemLogRateLimitBurst <%= scope.lookupvar('rsyslog::system_log_rate_limit_burst') %> <% if scope.lookupvar('rsyslog::default_template') and scope.lookupvar('rsyslog::default_template') != :undef -%> #