diff options
author | Thomas Backlund <tmb@mageia.org> | 2015-10-20 13:08:53 +0300 |
---|---|---|
committer | Thomas Backlund <tmb@mageia.org> | 2015-10-20 13:08:53 +0300 |
commit | 1124d971f54ffbf8a2744c4f534e31569317a4fb (patch) | |
tree | 833626f22c612a429631770c8b18ced2affeca95 | |
parent | 3a1a0404f0ccf0286c75a796f1c14b013e8a8dc0 (diff) | |
download | puppet-1124d971f54ffbf8a2744c4f534e31569317a4fb.tar puppet-1124d971f54ffbf8a2744c4f534e31569317a4fb.tar.gz puppet-1124d971f54ffbf8a2744c4f534e31569317a4fb.tar.bz2 puppet-1124d971f54ffbf8a2744c4f534e31569317a4fb.tar.xz puppet-1124d971f54ffbf8a2744c4f534e31569317a4fb.zip |
lint fixes for youri-check
-rw-r--r-- | modules/youri-check/manifests/init.pp | 102 | ||||
-rw-r--r-- | modules/youri-check/templates/4.conf | 1 | ||||
-rw-r--r-- | modules/youri-check/templates/5.conf | 1 | ||||
-rw-r--r-- | modules/youri-check/templates/cauldron.conf | 1 |
4 files changed, 51 insertions, 54 deletions
diff --git a/modules/youri-check/manifests/init.pp b/modules/youri-check/manifests/init.pp index eafbf622..25d70875 100644 --- a/modules/youri-check/manifests/init.pp +++ b/modules/youri-check/manifests/init.pp @@ -9,44 +9,44 @@ class youri-check { home => $home, } - file { $home: - ensure => directory, - owner => $user, - group => $user, - } + file { $home: + ensure => directory, + owner => $user, + group => $user, + } - $pgsql_server = "$vhost" + $pgsql_server = "${vhost}" - package { ['youri-check', 'perl-DBD-Pg', 'perl-Youri-Media']: } + package { ['youri-check', 'perl-DBD-Pg', 'perl-Youri-Media']: } } define config($version) { - include youri-check::base - - $config = "/etc/youri/$version.conf" - $outdir = "/var/www/youri-check/$version" - $pgsql_db = "youri_check_$version" - $pgsql_server = $base::pgsql_server - $pgsql_user = "youri$version" - $pgsql_password = extlookup('youri_pgsql','x') - - file { "$config": - ensure => present, - owner => $base::user, - mode => 640, - content => template("youri-check/$version.conf"), - require => User[$base::user], - } + include youri-check::base + + $config = "/etc/youri/${version}.conf" + $outdir = "/var/www/youri-check/${version}" + $pgsql_db = "youri_check_${version}" + $pgsql_server = $base::pgsql_server + $pgsql_user = "youri${version}" + $pgsql_password = extlookup('youri_pgsql','x') + + file { "${config}": + ensure => present, + owner => $base::user, + mode => '0640', + content => template("youri-check/${version}.conf"), + require => User[$base::user], + } } define check($version, $hour = "*", $minute = 0) { - include youri-check::base - $config = "/etc/youri/$version.conf" - $pgsql_server = $base::pgsql_server - $pgsql_db = "youri_check_$version" - $pgsql_user = "youri$version" - $pgsql_password = extlookup('youri_pgsql','x') + include youri-check::base + $config = "/etc/youri/${version}.conf" + $pgsql_server = $base::pgsql_server + $pgsql_db = "youri_check_${version}" + $pgsql_user = "youri${version}" + $pgsql_password = extlookup('youri_pgsql','x') postgresql::remote_user { $pgsql_user: password => $base::pgsql_password, @@ -54,27 +54,27 @@ class youri-check { postgresql::remote_database { $pgsql_db: description => "Youri Check results", - user => $pgsql_user, + user => $pgsql_user, } - cron { "check_$version": - command => "youri-check -c $config test", - hour => $hour, - minute => $minute, - user => $base::user, - environment => "MAILTO=root", - require => User[$base::user], + cron { "check_${version}": + command => "youri-check -c ${config} test", + hour => $hour, + minute => $minute, + user => $base::user, + environment => "MAILTO=root", + require => User[$base::user], } } define report_www { include youri-check::base - $outdir = "/var/www/youri-check/" + $outdir = "/var/www/youri-check/" apache::vhost::base { $base::vhost: location => $outdir, } apache::vhost::base { "ssl_${base::vhost}": - vhost => $base::vhost, - use_ssl => true, + vhost => $base::vhost, + use_ssl => true, location => $outdir, } } @@ -82,21 +82,21 @@ class youri-check { define report($version, $hour = "*", $minute = 20) { include youri-check::base - $config = "/etc/youri/$version.conf" + $config = "/etc/youri/${version}.conf" - $outdir = "/var/www/youri-check/$version" - file { "$outdir": + $outdir = "/var/www/youri-check/${version}" + file { "${outdir}": ensure => directory, - owner => $base::user, - mode => 755, + owner => $base::user, + mode => '0755', } - cron { "check_$version": - command => "youri-check -c $config report", - hour => $hour, - minute => $minute, - user => $base::user, - require => User[$base::user], + cron { "check_${version}": + command => "youri-check -c ${config} report", + hour => $hour, + minute => $minute, + user => $base::user, + require => User[$base::user], } } } diff --git a/modules/youri-check/templates/4.conf b/modules/youri-check/templates/4.conf index e4af2b06..3e7df09e 100644 --- a/modules/youri-check/templates/4.conf +++ b/modules/youri-check/templates/4.conf @@ -239,4 +239,3 @@ medias: - nonfree.x86_64 - core.i586 - nonfree.i586 - diff --git a/modules/youri-check/templates/5.conf b/modules/youri-check/templates/5.conf index 422ac1ad..ca54f36e 100644 --- a/modules/youri-check/templates/5.conf +++ b/modules/youri-check/templates/5.conf @@ -239,4 +239,3 @@ medias: - nonfree.x86_64 - core.i586 - nonfree.i586 - diff --git a/modules/youri-check/templates/cauldron.conf b/modules/youri-check/templates/cauldron.conf index 8268f309..e32b5bfd 100644 --- a/modules/youri-check/templates/cauldron.conf +++ b/modules/youri-check/templates/cauldron.conf @@ -494,4 +494,3 @@ medias: - tainted.x86_64 - core.i586 - tainted.i586 - |