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

Side by Side Diff: modules/logrotate/manifests/init.pp

Issue 29378979: Ticket70 - Remove duplicate/unnecessary logrotate cron job (Closed)
Patch Set: Created March 8, 2017, 11:46 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « modules/adblockplus/templates/crontab.erb ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 class logrotate { 1 class logrotate {
2 exec {'ensure_logrotate_status': 2 exec {'ensure_logrotate_status':
3 command => '/etc/cron.daily/logrotate', 3 command => '/etc/cron.daily/logrotate',
4 path => ["/usr/bin/", "/bin/"], 4 path => ["/usr/bin/", "/bin/"],
5 onlyif => 'test ! -f /var/lib/logrotate/status' 5 onlyif => 'test ! -f /var/lib/logrotate/status'
6 } 6 }
7 7
8 cron {'logrotate':
9 ensure => present,
f.nicolaisen 2017/03/09 08:53:19 What about ensuring that the cronjob is absent? Is
10 require => Exec['ensure_logrotate_status'],
11 command => '/usr/sbin/logrotate /etc/logrotate.conf',
12 environment => hiera('cron::environment', []),
13 user => root,
14 hour => '0',
15 minute => '0'
16 }
17
18 $config = hiera('logrotate::config', {}) 8 $config = hiera('logrotate::config', {})
19 create_resources('logrotate::config', $config) 9 create_resources('logrotate::config', $config)
20 } 10 }
OLDNEW
« no previous file with comments | « modules/adblockplus/templates/crontab.erb ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld