Files
deploy_home/ansible/roles/podman/templates/zomboid/logrotate.j2
T
Bastian de BylandClaude Opus 5 81451247b6 fix: drop the redundant daily from the Zomboid logrotate config
logrotate warns that size overrides daily, and it is right: with both set the
time directive does nothing. The daily timer is when the config gets checked;
100M is when it rotates. Saying so in a comment rather than in a directive
that has no effect.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-25 23:48:28 -04:00

26 lines
915 B
Django/Jinja

# {{ ansible_managed }}
#
# Project Zomboid's own log files. These are separate from the container's
# stdout, which podman rotates itself via the k8s-file driver's max_size.
#
# copytruncate is mandatory here: the server holds these fds open for the whole
# life of the process, so a rename would leave it writing into an unlinked
# inode and the file would appear to simply stop growing.
#
# The Discord bot tails server-console.txt from a byte offset and resets that
# offset when the file shrinks, so a truncate under it is safe.
{{ zomboid_path }}/data/server-console.txt
{{ zomboid_path }}/data/Logs/*.txt
{
# size, not a time directive: logrotate's daily timer is when this is
# *checked*, 100M is when it actually rotates. Specifying both makes
# logrotate warn that size overrides daily.
copytruncate
size 100M
rotate 3
compress
delaycompress
missingok
notifempty
}