Ema has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/291752

Change subject: update-ocsp-all: write output to logfile
......................................................................

update-ocsp-all: write output to logfile

Use a logfile (and rotate it) instead of cronspamming.

Bug: T132835
Bug: T132324
Change-Id: Id4a73844d6218a0e257191690feec898f48db371
---
A modules/sslcert/files/update-ocsp-all-logrotate
M modules/sslcert/manifests/ocsp/init.pp
2 files changed, 13 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/52/291752/1

diff --git a/modules/sslcert/files/update-ocsp-all-logrotate 
b/modules/sslcert/files/update-ocsp-all-logrotate
new file mode 100644
index 0000000..5807eb9
--- /dev/null
+++ b/modules/sslcert/files/update-ocsp-all-logrotate
@@ -0,0 +1,6 @@
+/var/log/update-ocsp-all.log {
+    rotate 7
+    daily
+    compress
+    missingok
+}
diff --git a/modules/sslcert/manifests/ocsp/init.pp 
b/modules/sslcert/manifests/ocsp/init.pp
index aada7e4..1412f92 100644
--- a/modules/sslcert/manifests/ocsp/init.pp
+++ b/modules/sslcert/manifests/ocsp/init.pp
@@ -50,7 +50,7 @@
     }
 
     cron { 'update-ocsp-all':
-        command => '/usr/local/sbin/update-ocsp-all',
+        command => '/usr/local/sbin/update-ocsp-all >> 
/var/log/update-ocsp-all.log 2>&1',
         minute  => fqdn_rand(60, '1adf3dd699e51805'),
         hour    => '*',
         require => [
@@ -58,4 +58,10 @@
             File['/etc/update-ocsp.d'],
         ],
     }
+
+    # Rotate /var/log/update-ocsp-all.log
+    logrotate::conf { 'update-ocsp-all':
+        ensure => present,
+        source => 'puppet:///modules/sslcert/update-ocsp-all-logrotate',
+    }
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/291752
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id4a73844d6218a0e257191690feec898f48db371
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ema <e...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to