| 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 # 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 ' daily', |
| 92 ' rotate 30', | 92 ' rotate 30', |
| 93 ' compress', | 93 ' compress', |
| 94 ' missingok', | 94 ' missingok', |
| 95 ' nodateext', | 95 ' nodateext', |
| 96 ' postrotate', | 96 ' postrotate', |
| 97 ' service mimeo restart', | 97 ' service mimeo restart', |
| 98 ' endscript', | 98 ' endscript', |
| 99 '}', | 99 '}', |
| 100 ], "\n"), | 100 ], "\n"), |
| 101 default => undef, | 101 default => undef, |
| 102 } | 102 } |
| 103 | 103 |
| 104 ensure_resource('logrotate::config', 'mimeo_data', merge({ | 104 ensure_resource('logrotate::config', 'mimeo_data', merge({ |
| 105 content => $default_content, | 105 content => $default_content, |
| 106 ensure => 'present', | 106 ensure => 'present', |
| 107 }, $rotation)) | 107 }, $rotation)) |
| 108 } | 108 } |
| 109 | 109 |
| OLD | NEW |