Add logrotate configuration for chill logs
This commit introduces log rotation for chill-related logs by adding a template file and the corresponding task in the playbook. It ensures proper log management by rotating logs daily, keeping a specified number of backups, and compressing old logs.
This commit is contained in:
parent
c572d68eb4
commit
de738f39c1
@ -37,6 +37,14 @@
|
|||||||
group: 33
|
group: 33
|
||||||
mode: '0774'
|
mode: '0774'
|
||||||
|
|
||||||
|
- name: Configure logrotate for chill
|
||||||
|
ansible.builtin.template:
|
||||||
|
dest: /etc/logrotate/logrotate.d/chill
|
||||||
|
src: logrotate/chill
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: '0644'
|
||||||
|
|
||||||
- name: Install traefik
|
- name: Install traefik
|
||||||
ansible.builtin.include_tasks: traefik.yml
|
ansible.builtin.include_tasks: traefik.yml
|
||||||
|
|
||||||
|
15
templates/logrotate/chill
Normal file
15
templates/logrotate/chill
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
/var/log/chill/default-*.log {
|
||||||
|
rotate 90
|
||||||
|
daily
|
||||||
|
compress
|
||||||
|
missingok
|
||||||
|
notifempty
|
||||||
|
}
|
||||||
|
|
||||||
|
/var/log/apt/private-*.log {
|
||||||
|
rotate 180
|
||||||
|
daily
|
||||||
|
compress
|
||||||
|
missingok
|
||||||
|
notifempty
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user