From 9bb4ebe3d9f8b4fc666464ca8c03b4cd2b703fd4 Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Tue, 18 Sep 2018 16:00:43 +0200 Subject: [PATCH] MBDIALOGE-558-added logrotate --- customer/mbvd-dialogapi/common.yaml | 56 +++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/customer/mbvd-dialogapi/common.yaml b/customer/mbvd-dialogapi/common.yaml index c4c09db0..5f7230a2 100644 --- a/customer/mbvd-dialogapi/common.yaml +++ b/customer/mbvd-dialogapi/common.yaml @@ -4,11 +4,67 @@ infra::additional_classes: - infra::profile::mysql_server - infra::profile::postfix - infra::profile::cron + - infra::profile::logrotate postfix::myorigin: "pixelpark.net" infra::profile::postfix::virtual_aliases_source: 'maps/virtual-nullclient-mbvd' infra::profile::postfix::cert_servername: 'wildcard.pixelpark.net' +infra::profile::logrotate::rules: + btmp: + dateformat: '-%Y-%m-%d' + wtmp: + dateformat: '-%Y-%m-%d' + syslog: + path: + - '/var/log/cron' + - '/var/log/maillog' + - '/var/log/messages' + - '/var/log/secure' + - '/var/log/spooler' + rotate_every: 'day' + rotate: 10 + minsize: '4M' + compress: true + delaycompress: true + dateformat: '-%Y-%m-%d' + missingok: true + sharedscripts: true + postrotate: '/bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true' + passenger: + path: + - '/var/log/passenger-analytics/*.log' + missingok: true + ifempty: false + sharedscripts: true + compress: true + delaycompress: true + dialog: + path: + - '/var/www/dialogapi/log/*.log' + su_owner: 'dialogapi' + su_group: 'dialogapi' + rotate_every: 'day' + missingok: true + rotate: 20 + minsize: '4M' + dateext: true + compress: true + delaycompress: true + ifempty: false + copytruncate: true + httpd: + path: + - '/var/log/httpd/*log' + rotate: 10 + rotate_every: 'day' + missingok: true + ifempty: false + sharedscripts: true + delaycompress: true + minsize: '4M' + postrotate: '/bin/systemctl reload httpd.service > /dev/null 2>/dev/null || true' + accounts::users: deploy.hamburg: uid: 60201 -- 2.39.5