diff --git a/playbooks/roles/gerrit/tasks/main.yaml b/playbooks/roles/gerrit/tasks/main.yaml index db7a8c400b..41b91b4fa2 100644 --- a/playbooks/roles/gerrit/tasks/main.yaml +++ b/playbooks/roles/gerrit/tasks/main.yaml @@ -347,14 +347,12 @@ minute: 17 hour: 4 -# Gerrit rotates their own logs, but doesn't clean them out -# Delete logs older than a month -# TODO set state to absent then remove entirely after we upgrade to -# Gerrit 3.10 and set log.timeToKeep to do this rotation natively. +# Gerrit rotates logs on its own now. Clean up our old cron job that did it +# before. - name: Set up cron job to clean old gerrit logs cron: name: clear-gerrit-logs - state: present + state: absent user: gerrit2 job: 'find /home/gerrit2/review_site/logs/*.gz -mtime +30 -exec rm -f {} \;' minute: 1