handle php logrotate

This commit is contained in:
Ludovic Cartier
2025-09-24 15:37:04 +02:00
parent e9dae1dd0b
commit 140610f8ee
4 changed files with 47 additions and 0 deletions

View File

@@ -10,6 +10,7 @@ This Ansible role installs and configures PHP with support for multiple versions
- Create and manage PHP-FPM pools with custom configurations
- Support for multiple pools across different PHP versions
- Automatic log directory creation with proper ownership
- Automatic logrotate configuration for PHP-FPM logs
- Support for PHP-FPM
- Automatic repository setup (Sury repository for latest PHP versions)
@@ -74,6 +75,9 @@ php_pools:
# Remove default www pool
php_remove_default_pool: false
# Logrotate configuration for PHP-FPM logs
php_logrotate_enabled: true
```
## Example Playbooks
@@ -184,6 +188,8 @@ The role will manage PHP-FPM services for each installed version:
- Log directories are automatically created with proper ownership
- Pool sockets are created with specific naming: `php{version}-fpm-{pool_name}.sock`
- You can create multiple pools for the same PHP version with different configurations
- Logrotate configuration is automatically created if logrotate is installed on the system
- PHP-FPM logs are rotated daily with 31 days retention and bzip2 compression
## License