Skip to content

Commit bf38e7b

Browse files
committed
Added logrotate config for pgcleanup logs
1 parent 95618f1 commit bf38e7b

2 files changed

Lines changed: 26 additions & 0 deletions

File tree

ansible/roles/usegalaxy_ca.logrotate/tasks/main.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
11
---
2+
- name: Create and ensure archive logs directory exists
3+
ansible.builtin.file:
4+
path: "{{ galaxy_log_dir }}/.old"
5+
state: directory
6+
when: "'galaxyservers' in group_names"
7+
8+
- name: Deploy pgcleanup logrotate config
9+
ansible.builtin.template:
10+
src: pgcleanup.j2
11+
dest: /etc/logrotate.d/pgcleanup
12+
when: "'galaxyservers' in group_names"
13+
214
- name: Set lower log size limit on staging
315
ansible.builtin.set_fact:
416
journal_size: "{{ journal_size_staging }}"
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{{ galaxy_log_dir }}/*.log {
2+
monthly
3+
rotate 12
4+
compress
5+
delaycompress
6+
missingok
7+
notifempty
8+
copytruncate
9+
su {{ galaxy_user_name }} {{ galaxy_user_name }}
10+
dateext
11+
dateyesterday
12+
dateformat .%Y%m
13+
olddir {{ galaxy_log_dir }}/.old
14+
}

0 commit comments

Comments
 (0)