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

Delta Between Two Patch Sets: modules/adblockplus/manifests/web/mimeo.pp

Issue 29525555: #622 - Use mimeo module on abb website (Closed)
Left Patch Set: For comment 7 Created Aug. 24, 2017, 7:16 p.m.
Right Patch Set: For comment 10 Created Aug. 24, 2017, 8:01 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « modules/adblockplus/files/mimeo.py ('k') | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 # == Class: adblockplus::web::mimeo 1 # == Class: adblockplus::web::mimeo
2 # 2 #
3 # Class adblockplus::web::mimeo registers the information received in a 3 # Class adblockplus::web::mimeo registers the information received in a
4 # http/s petition with an specified format in an specific output. 4 # http/s petition with an specified format in an specific output.
5 # 5 #
6 # === Parameters: 6 # === Parameters:
7 # 7 #
8 # [*format*] 8 # [*format*]
9 # A string containing the desired format for logging. 9 # A string containing the desired format for logging.
10 # 10 #
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 subscribe => File['/usr/local/bin/mimeo.py'], 77 subscribe => File['/usr/local/bin/mimeo.py'],
78 } 78 }
79 79
80 exec {'reload-mimeo-daemon': 80 exec {'reload-mimeo-daemon':
81 notify => Service['mimeo'], 81 notify => Service['mimeo'],
82 command => 'systemctl daemon-reload', 82 command => 'systemctl daemon-reload',
83 subscribe => File['/etc/systemd/system/mimeo.service'], 83 subscribe => File['/etc/systemd/system/mimeo.service'],
84 refreshonly => true, 84 refreshonly => true,
85 } 85 }
86 86
87 ensure_resource('logrotate::config', 'mimeo_data', merge({ 87 # https://docs.puppet.com/puppet/latest/types/file.html#file-attribute-source
88 content => join([ 88 $default_content = $rotation['source'] ? {
mathias 2017/08/24 19:30:09 Not that easy, if one specifies $source the $conte
89 undef => join([
89 '/var/adblockplus/mimeo/data {', 90 '/var/adblockplus/mimeo/data {',
90 ' weekly', 91 ' weekly',
91 ' rotate 30', 92 ' rotate 30',
92 ' compress', 93 ' compress',
93 ' missingok', 94 ' missingok',
94 ' nodateext', 95 ' nodateext',
95 '}', 96 '}',
96 ], "\n"), 97 ], "\n"),
98 default => undef,
99 }
100
101 ensure_resource('logrotate::config', 'mimeo_data', merge({
102 content => $default_content,
97 ensure => 'present', 103 ensure => 'present',
98 }, $rotation)) 104 }, $rotation))
99 } 105 }
100 106
LEFTRIGHT

Powered by Google App Engine
This is Rietveld