handle php logrotate
This commit is contained in:
@@ -33,3 +33,19 @@
|
||||
- php_remove_default_pool | bool
|
||||
notify:
|
||||
- restart php-fpm services
|
||||
|
||||
- name: php | check if logrotate is installed
|
||||
package_facts:
|
||||
manager: "auto"
|
||||
|
||||
- name: php | create logrotate configuration for php-fpm logs
|
||||
template:
|
||||
src: php-fpm.logrotate.j2
|
||||
dest: "/etc/logrotate.d/php-fpm"
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0644'
|
||||
when:
|
||||
- php_logrotate_enabled | default(true) | bool
|
||||
- "'logrotate' in ansible_facts.packages"
|
||||
- php_pools is defined and php_pools | length > 0
|
||||
|
||||
Reference in New Issue
Block a user