Prepare mirrorlist log files for processing
The mirrorlist log files are copied every hour to be fetched by the MM backend system for further processing. Once each day, yesterday's file is moved to limit the size of the log file. This also includes a daily call to tmpwatch to delete log files older than 14 days. Signed-off-by: Adrian Reber <adrian@lisas.de>
This commit is contained in:
parent
07b94cf414
commit
1adf2091de
1 changed files with 21 additions and 0 deletions
|
@ -92,3 +92,24 @@
|
|||
copy: src=logrotate-syslog dest=/etc/logrotate.d/syslog
|
||||
tags:
|
||||
- mirrorlist2
|
||||
|
||||
# Copy the mirrorlist log file every hour to be ready to be processed
|
||||
- name: mirrorlist copy cron
|
||||
cron: name="copy-mirrorlist" minute="50" hour="*/2" user="mirrormanager"
|
||||
job="cp /var/log/mirrormanager/mirrorlist.log /var/log/mirrormanager/mirrorlist.log.`date +\%Y-\%m-\%d`"
|
||||
cron_file=copy-mirrorlist
|
||||
- mirrorlist2
|
||||
|
||||
# At the start of the day the mirrorlist log file is moved
|
||||
- name: mirrorlist move cron
|
||||
cron: name="move-mirrorlist" minute="1" hour="0" user="mirrormanager"
|
||||
job="mv /var/log/mirrormanager/mirrorlist.log /var/log/mirrormanager/mirrorlist.log.`date +\%Y-\%m-\%d --date='yesterday'`"
|
||||
cron_file=move-mirrorlist
|
||||
- mirrorlist2
|
||||
|
||||
# Cleanup old mirrorlist logfile
|
||||
- name: mirrorlist clean cron
|
||||
cron: name="clean-mirrorlist" minute="13" hour="13" user="mirrormanager"
|
||||
job="/usr/sbin/tmpwatch --mtime 14d /var/log/mirrormanager"
|
||||
cron_file=clean-mirrorlist
|
||||
- mirrorlist2
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue