From 041525556e5d3307cf6eed1478221241e20f6dfa Mon Sep 17 00:00:00 2001 From: Matthias Baur Date: Mon, 6 Jun 2016 11:13:05 +0200 Subject: [PATCH] Fix puppet-lint issues and bad style --- manifests/config.pp | 2 +- manifests/defaults.pp | 25 +++++++++---------------- manifests/hourly.pp | 13 +++++-------- 3 files changed, 15 insertions(+), 25 deletions(-) diff --git a/manifests/config.pp b/manifests/config.pp index c74f5119..c3c248cf 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -26,4 +26,4 @@ create_resources('logrotate::conf', $custom_config) } -} \ No newline at end of file +} diff --git a/manifests/defaults.pp b/manifests/defaults.pp index 27684f9c..7f66da7a 100644 --- a/manifests/defaults.pp +++ b/manifests/defaults.pp @@ -28,18 +28,15 @@ } if !defined( Logrotate::Rule['wtmp'] ) { - logrotate::rule { - 'wtmp': + logrotate::rule { 'wtmp': path => '/var/log/wtmp', create_mode => '0664', } } if !defined( Logrotate::Rule['btmp'] ) { - logrotate::rule { - 'btmp': + logrotate::rule { 'btmp': path => '/var/log/btmp', create_mode => '0600', - } } } @@ -58,8 +55,7 @@ } if !defined( Logrotate::Rule['wtmp'] ) { - logrotate::rule { - 'wtmp': + logrotate::rule { 'wtmp': path => '/var/log/wtmp', create_mode => '0664', missingok => false, @@ -67,11 +63,10 @@ } } if !defined( Logrotate::Rule['btmp'] ) { - logrotate::rule { - 'btmp': + logrotate::rule { 'btmp': path => '/var/log/btmp', create_mode => '0600', - minsize => '1M'; + minsize => '1M', } } } @@ -92,17 +87,15 @@ } if !defined( Logrotate::Rule['wtmp'] ) { - logrotate::rule { - 'wtmp': + logrotate::rule { 'wtmp': path => '/var/log/wtmp', create_mode => '0664', - missingok => false; + missingok => false, } } if !defined( Logrotate::Rule['btmp'] ) { - logrotate::rule { - 'btmp': + logrotate::rule { 'btmp': path => '/var/log/btmp', create_mode => '0600', create_group => 'root', @@ -115,4 +108,4 @@ } } } -} \ No newline at end of file +} diff --git a/manifests/hourly.pp b/manifests/hourly.pp index 1dc2b766..fc5c2e53 100644 --- a/manifests/hourly.pp +++ b/manifests/hourly.pp @@ -25,21 +25,18 @@ } } - file { - '/etc/logrotate.d/hourly': + file { '/etc/logrotate.d/hourly': ensure => $dir_ensure, owner => 'root', group => 'root', - mode => '0755'; - '/etc/cron.hourly/logrotate': + mode => '0755', + } + file { '/etc/cron.hourly/logrotate': ensure => $ensure, owner => 'root', group => 'root', mode => '0555', source => 'puppet:///modules/logrotate/etc/cron.hourly/logrotate', - require => [ - File['/etc/logrotate.d/hourly'], - Package['logrotate'], - ]; + require => [ File['/etc/logrotate.d/hourly'], Package['logrotate'], ], } }