Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: modules/adblockplus/manifests/web/mimeo.pp

Issue 29525555: #622 - Use mimeo module on abb website (Closed)
Patch Set: For comment 10 Created Aug. 24, 2017, 8:01 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « modules/adblockplus/files/mimeo.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: modules/adblockplus/manifests/web/mimeo.pp
===================================================================
--- a/modules/adblockplus/manifests/web/mimeo.pp
+++ b/modules/adblockplus/manifests/web/mimeo.pp
@@ -18,10 +18,14 @@
# A string (like format parameter) representing the response sent to the
# client.
#
+# [*rotation*]
+# Overwrite the default log rotation configuration
+#
class adblockplus::web::mimeo (
$format = '',
$port = 8000,
$response = '',
+ $rotation = {},
){
include adblockplus
@@ -79,5 +83,24 @@
subscribe => File['/etc/systemd/system/mimeo.service'],
refreshonly => true,
}
+
+ # https://docs.puppet.com/puppet/latest/types/file.html#file-attribute-source
+ $default_content = $rotation['source'] ? {
+ undef => join([
+ '/var/adblockplus/mimeo/data {',
+ ' weekly',
+ ' rotate 30',
+ ' compress',
+ ' missingok',
+ ' nodateext',
+ '}',
+ ], "\n"),
+ default => undef,
+ }
+
+ ensure_resource('logrotate::config', 'mimeo_data', merge({
+ content => $default_content,
+ ensure => 'present',
+ }, $rotation))
}
« no previous file with comments | « modules/adblockplus/files/mimeo.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld