lsr-logs-clean: Add MAILTO to cron file

Set MAILTO for the particular cron file to the email address
of the Linux system roles community so any output from the log
pruning job going to stderr is reported to them. Send stdout to
/dev/null since it is not important.

Signed-off-by: Jiri Kucera <jkucera@redhat.com>
This commit is contained in:
Jiri Kucera 2023-02-07 02:40:27 +01:00
parent e207a4cdf9
commit f49f4a7ffd

View file

@ -78,7 +78,11 @@
- name: Prune old logs at /srv/pub/alt/linuxsystemroles/logs
cron: name="linuxsystemroles-logs-clean" hour="0" minute="15" user="root"
job="/usr/local/bin/linuxsystemroles-logs-clean /srv/pub/alt/linuxsystemroles/logs"
job="/usr/local/bin/linuxsystemroles-logs-clean /srv/pub/alt/linuxsystemroles/logs >/dev/null"
cron_file=linuxsystemroles-logs-clean
- name: Set MAILTO for the previous cron job
cron: env=true name=MAILTO value="systemroles-owner@lists.fedorahosted.org"
cron_file=linuxsystemroles-logs-clean
handlers: