1
0
Fork 0
forked from infra/ansible

fix logrotate to match file with date

This commit is contained in:
seddik alaouiismaili 2025-02-15 22:27:38 +01:00 committed by kevin
commit 69e11538ed
2 changed files with 6 additions and 2 deletions

View file

@ -1,4 +1,8 @@
/var/log/httpd/*log {
/var/log/httpd/*log
{% if ansible_hostname.startswith("kojipkgs") %}
/var/log/httpd/*.log.????-??-??
{% endif %}
{
daily
rotate 7
missingok

View file

@ -83,7 +83,7 @@
- apachestatus
- name: Setup logrotate to our needs
ansible.builtin.copy: src="{{ files }}/httpd/httpd.logrotate" dest=/etc/logrotate.d/httpd
ansible.builtin.template: src="{{ files }}/httpd/httpd.logrotate.j2" dest=/etc/logrotate.d/httpd
tags:
- config
- apache