Gehel has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/373509 )
Change subject: elasticsearch - switch to using logrotate::rule ...................................................................... elasticsearch - switch to using logrotate::rule Change-Id: I71e9602b84a6826b3899893a9f0616606c974574 --- D modules/elasticsearch/files/logrotate D modules/elasticsearch/manifests/decommission.pp M modules/elasticsearch/manifests/init.pp 3 files changed, 7 insertions(+), 46 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/09/373509/1 diff --git a/modules/elasticsearch/files/logrotate b/modules/elasticsearch/files/logrotate deleted file mode 100644 index 5a5131f..0000000 --- a/modules/elasticsearch/files/logrotate +++ /dev/null @@ -1,14 +0,0 @@ -##################################################################### -### THIS FILE IS MANAGED BY PUPPET -### puppet:///modules/elasticsearch/logrotate -##################################################################### - -/var/log/elasticsearch/*.log { - daily - copytruncate - missingok - notifempty - rotate 7 - compress - delaycompress -} diff --git a/modules/elasticsearch/manifests/decommission.pp b/modules/elasticsearch/manifests/decommission.pp deleted file mode 100644 index 255769f..0000000 --- a/modules/elasticsearch/manifests/decommission.pp +++ /dev/null @@ -1,30 +0,0 @@ -# = Class: elasticsearch -# -# This class decommissions the elasticsearch service. -# -class elasticsearch::decommission { - # Remove package - package { 'elasticsearch': - ensure => absent, - } - - # Remove configuration - file { '/etc/elasticsearch/elasticsearch.yml': - ensure => absent, - } - file { '/etc/elasticsearch/logging.yml': - ensure => absent, - } - file { '/etc/default/elasticsearch': - ensure => absent, - } - file { '/etc/logrotate.d/elasticsearch': - ensure => absent, - } - - # Stop the service - service { 'elasticsearch': - ensure => stopped, - enable => false, - } -} diff --git a/modules/elasticsearch/manifests/init.pp b/modules/elasticsearch/manifests/init.pp index fef01ae..40ef55f 100644 --- a/modules/elasticsearch/manifests/init.pp +++ b/modules/elasticsearch/manifests/init.pp @@ -255,9 +255,14 @@ require => Package['elasticsearch'], } - logrotate::conf { 'elasticsearch': + logrotate::rule { 'elasticsearch': ensure => present, - source => 'puppet:///modules/elasticsearch/logrotate', + frequency => 'daily', + copy_truncate => true, + missing_ok => true, + not_if_empty => true, + rotate => 7, + compress => true, } file { $data_dir: -- To view, visit https://gerrit.wikimedia.org/r/373509 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I71e9602b84a6826b3899893a9f0616606c974574 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Gehel <guillaume.leder...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits