Giuseppe Lavagetto has uploaded a new change for review. https://gerrit.wikimedia.org/r/270895
Change subject: logrotate: add centralized define, apply to pybal ...................................................................... logrotate: add centralized define, apply to pybal To avoid inconsistencies, a centralized logrotate::conf is created and for now applied to pybal logrotate rule, which needed fixing and is relatively not risky. Bug: T127025 Change-Id: I24c3e62caa8d09cba68424c4401e212bd1bc7bf6 --- A modules/logrotate/manifests/conf.pp M modules/pybal/manifests/init.pp 2 files changed, 22 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/95/270895/1 diff --git a/modules/logrotate/manifests/conf.pp b/modules/logrotate/manifests/conf.pp new file mode 100644 index 0000000..f3c8624 --- /dev/null +++ b/modules/logrotate/manifests/conf.pp @@ -0,0 +1,21 @@ +# === Define logrotate::conf +# +# Thin helper for the definition of logrotate rules. +# It basically ensure consistency and that we don't risk things like +# https://phabricator.wikimedia.org/T127025 to happen again +# +define logrotate::conf ( + $ensure = present, + $source = undef, + $content = undef, + ) { + + file { "/etc/logrotate.d/${title}": + ensure => $ensure, + owner => 'root', + group => 'root', + mode => '0444', + source => $source, + content => $content, + } +} diff --git a/modules/pybal/manifests/init.pp b/modules/pybal/manifests/init.pp index e6c0154..27f1f2f 100644 --- a/modules/pybal/manifests/init.pp +++ b/modules/pybal/manifests/init.pp @@ -23,10 +23,9 @@ before => Service['pybal'], } - file { '/etc/logrotate.d/pybal': + logrotate::conf { 'pybal': ensure => present, source => 'puppet:///modules/pybal/pybal.logrotate.conf', - mode => '0444', } nrpe::monitor_service { 'pybal': -- To view, visit https://gerrit.wikimedia.org/r/270895 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I24c3e62caa8d09cba68424c4401e212bd1bc7bf6 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Giuseppe Lavagetto <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
