OLD | NEW |
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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 | 86 |
87 # https://docs.puppet.com/puppet/latest/types/file.html#file-attribute-source | 87 # https://docs.puppet.com/puppet/latest/types/file.html#file-attribute-source |
88 $default_content = $rotation['source'] ? { | 88 $default_content = $rotation['source'] ? { |
89 undef => join([ | 89 undef => join([ |
90 '/var/adblockplus/mimeo/data {', | 90 '/var/adblockplus/mimeo/data {', |
91 ' weekly', | 91 ' weekly', |
92 ' rotate 30', | 92 ' rotate 30', |
93 ' compress', | 93 ' compress', |
94 ' missingok', | 94 ' missingok', |
95 ' nodateext', | 95 ' nodateext', |
| 96 ' postrotate', |
| 97 ' /bin/systemctl restart mimeo.service', |
| 98 ' endscript', |
96 '}', | 99 '}', |
97 ], "\n"), | 100 ], "\n"), |
98 default => undef, | 101 default => undef, |
99 } | 102 } |
100 | 103 |
101 ensure_resource('logrotate::config', 'mimeo_data', merge({ | 104 ensure_resource('logrotate::config', 'mimeo_data', merge({ |
102 content => $default_content, | 105 content => $default_content, |
103 ensure => 'present', | 106 ensure => 'present', |
104 }, $rotation)) | 107 }, $rotation)) |
105 } | 108 } |
106 | 109 |
OLD | NEW |