We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 34cc677 + 979db2d commit c10fdccCopy full SHA for c10fdcc
ansible/files/logrotate-postgres
@@ -1,10 +1,9 @@
1
-/var/lib/postgresql/12/main/pg_log/postgresql.csv {
2
- daily
3
- size 50M
+/var/lib/postgresql/data/pg_log/postgresql.log {
+ size 50M
4
rotate 3
5
copytruncate
6
delaycompress
7
compress
8
notifempty
9
missingok
10
-}
+}
ansible/playbook.yml
@@ -96,6 +96,17 @@
96
src: files/logrotate-postgres
97
dest: /etc/logrotate.d/postgres
98
99
+ - name: Configure logrotation to run every hour
100
+ shell:
101
+ cmd: mv /etc/cron.daily/logrotate /etc/cron.hourly/
102
+ become: yes
103
+
104
+ - name: restart crond
105
+ systemd:
106
+ state: restarted
107
+ name: cron
108
109
110
- name: Enhance fail2ban
111
import_tasks: tasks/setup-fail2ban.yml
112
0 commit comments