Compare commits

2 Commits

Author SHA1 Message Date
4cce5f1af7 typo 2025-09-19 16:08:15 +02:00
26eec53f99 now with one logrorate conf file per phpversion instead of per site 2025-09-04 11:18:48 +02:00
2 changed files with 9 additions and 5 deletions

View File

@@ -100,4 +100,4 @@
- name: configure logrotate
template:
src: logrotate.conf.jj
dest: "/etc/logrotate.d/php-fpm_{{ php_pool_name }}_{{ php_fpm_pool_user }}.conf"
dest: "/etc/logrotate.d/php-fpm-{{php_version }}.conf"

View File

@@ -1,13 +1,17 @@
#{{ ansible_managed }}
{{ php_fpm_log_dir }}/php_fpm_{{ php_pool_name }}*.log {
{{ php_fpm_log_dir }}/php_fpm*{{ php_version_nodot }}*.log {
daily
rotate 15
missingok
notifempty
sharedscripts
postrotate
/bin/systemctl reload php{{ php_version }}-fpm
endscript
postrotate
if [ -x /usr/lib/php/php{{ php_version }}-fpm-reopenlogs ]; then
/usr/lib/php/php{{ php_version }}-fpm-reopenlogs;
else
/bin/systemctl reload {{ php_service_name }}
fi
endscript
}