Don't modify logrotate default config file #145
Labels
No Label
bug
duplicate
enhancement
help wanted
invalid
question
security
wontfix
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: evolix/ansible-roles#145
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The tasks in
evolinux-base/tasks/logs.yml
modify/etc/logrotate.conf
which is owned by thelogrotate
package, so when the package change it's default configuration we don't get the new default configuration. And worse, not having the default config stop the logroate service as some directive may be out of sync with other configuration files in/etc/logrotate.d
.For exemple, previously
/etc/logroate.conf
contained the following snnipet:Snippet which was later moved to
/etc/logrotate.d/wtmp
and removed from/etc/logroate.conf
. In our cas the part removing it from/etc/logroate.conf
wasn't applied since we customized this file, so we end up with a duplicated snippet present in both/etc/logrotate.conf
and/etc/logrotate.d/wtmp
which blocked logrotate from running because of the duplcate entry for/var/log/wtmp
.To fix that I suggest we put our default global configuration (such as
rotate 12
) in a sperate file likezz-evolix-defaults
oraa-evolix-defaults
. ATM it's not clear to me the order in which lograte directive are interpreted¹ as we want to set default global configuration options which apply to every other local confiugration.¹ https://www.mankier.com/8/logrotate#Configuration_File