aboutsummaryrefslogtreecommitdiffhomepage
path: root/templates/logrotate-postgresql-common.j2
diff options
context:
space:
mode:
authorPaul B <paul.bonaud@capitainetrain.com>2018-08-31 11:49:09 +0200
committerPaul B <paul.bonaud@capitainetrain.com>2018-08-31 12:00:24 +0200
commitd0bc90e08c29e881c388c6803ed9c49dff1f1776 (patch)
treee5f633a7461f3d339ef89758fc7bb3f1b91563d3 /templates/logrotate-postgresql-common.j2
downloadansible-postgresql-role-1.0.0.tar.gz
ansible-postgresql-role-1.0.0.tar.zst
ansible-postgresql-role-1.0.0.zip
Initial commit open sourcing Postgresql Ansible role1.0.0
Diffstat (limited to 'templates/logrotate-postgresql-common.j2')
-rw-r--r--templates/logrotate-postgresql-common.j216
1 files changed, 16 insertions, 0 deletions
diff --git a/templates/logrotate-postgresql-common.j2 b/templates/logrotate-postgresql-common.j2
new file mode 100644
index 0000000..06245b6
--- /dev/null
+++ b/templates/logrotate-postgresql-common.j2
@@ -0,0 +1,16 @@
1{{ postgres_log_dir|default('/var/log/postgresql') }}/*.log
2{
3 daily
4 rotate 60
5 copytruncate
6 delaycompress
7 compress
8 notifempty
9 missingok
10 su root root
11{% if postgres_pgbadger_server is defined and postgres_pgbadger_server %}
12 lastaction
13 /root/scripts/pgBadger.sh
14 endscript
15{% endif -%}
16}