Append zuul reboot logs instead of truncating them

Normally this isn't an issue because we run logrotate more frequently
than our weekly cron to upgrade and reboot zuul. But if you need to
manually run the playbook and are referring to the crontab entry to
determine how to run the playbook then the resulting command could
truncate a recent run. Simply append to the file in all cases to avoid
this.

Change-Id: I393741317cccaf447912b1f1517e846c32ee7677
This commit is contained in:
Clark Boylan 2022-09-04 08:32:46 -07:00
parent 17eba9db32
commit 895dfbe7a4

View File

@ -51,7 +51,7 @@
minute: 1
hour: 0
weekday: 6
job: "flock -n /var/run/zuul_reboot.lock /usr/local/bin/ansible-playbook -f 20 /home/zuul/src/opendev.org/opendev/system-config/playbooks/zuul_reboot.yaml > /var/log/ansible/zuul_reboot.log 2>&1"
job: "flock -n /var/run/zuul_reboot.lock /usr/local/bin/ansible-playbook -f 20 /home/zuul/src/opendev.org/opendev/system-config/playbooks/zuul_reboot.yaml >> /var/log/ansible/zuul_reboot.log 2>&1"
- name: Rotate Zuul restart logs
include_role: