10000 fix: logrotate on u20 uses systemd timers · michelp/postgres@e162bb5 · GitHub
[go: up one dir, main page]

Skip to content

Commit e162bb5

Browse files
committed
fix: logrotate on u20 uses systemd timers
1 parent fe30863 commit e162bb5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ansible/playbook.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,10 @@
103103

104104
- name: Configure logrotation to run every hour
105105
shell:
106-
cmd: mv /etc/cron.daily/logrotate /etc/cron.hourly/
106+
cmd: |
107+
cp /usr/lib/systemd/system/logrotate.timer /etc/systemd/system/logrotate.timer
108+
sed -i -e 's/daily/hourly/' /etc/systemd/system/logrotate.timer
109+
systemctl reenable logrotate.timer
107110
become: yes
108111

109112
- name: restart crond

0 commit comments

Comments
 (0)
0