3 Commits

Author SHA1 Message Date
Emilien Mantel
3690ee2b15 Manages PHP 7.4 on Debian 2019-12-26 11:55:33 +01:00
Emilien Mantel
ec1175af21 [WIP] Improve FPM management
- store configuration in local facts
- better socket generator
- php_admin_value/php_value
2019-12-26 11:38:06 +01:00
Emilien Mantel
1eea41cd39 [WIP] Some improvements 2019-12-24 18:34:37 +01:00
7 changed files with 6 additions and 8 deletions

1
.gitignore vendored
View File

@@ -3,4 +3,3 @@
*.retry
*.log
/filter_plugins/*.pyc
/filter_plugins/__pycache__

View File

@@ -29,7 +29,7 @@ FreeBSD limitations
-------------------
- It doesn't split ini file for FPM/CLI. It's hardcoded as `/usr/local/etc/php.ini`.
- It can't manage multiple PHP versions at the time (like legacy Debian versions)
- It can't manage multiple PHP versions at the time (like old Debian versions)
- You must explicitely set xdebug package name (use `pkg search xdebug` to find the good one)
Role Variables
@@ -39,7 +39,7 @@ You should look at [default vars](defaults/main.yml).
### Writable vars
- `php_version`: 7.3, 7.4... depending OS (see above)
- `php_version`: 7.0, 7.1, 7.2, 7.3
- `php_install_fpm`: boolean, install and manage php-fpm (default is true)
- `php_install_xdebug`: boolean, install [Xdebug](http://xdebug.org)
- `php_extra_packages`: additional php packages to install (default is an empty list).
@@ -56,6 +56,7 @@ Note:
- Put specific configuration in `php_ini_fpm`/`php_ini_cli`.
- You can override with `php_ini_fpm`/`php_ini_cli`, but it breaks idempotence.
#### OpCache settings
See [Opcache doc](https://secure.php.net/manual/en/opcache.configuration.php)

View File

@@ -5,7 +5,6 @@ php_install_fpm: true
php_install_xdebug: false
php_extra_packages: []
php_xdebug_package: null
php_autoremove_default_pool: false
# php.ini config
php_ini:

Binary file not shown.

View File

@@ -14,7 +14,7 @@
- name: LINEINFILE | PHP configuration
lineinfile:
dest: '{{ php_fpm_ini }}'
dest: '{{ php_cli_ini }}'
regexp: '^;?{{ item.key }}'
line: '{{ item.key }} = {{ item.value }}'
create: yes
@@ -32,5 +32,5 @@
file:
path: "{{ php_fpm_pool_dir }}/www.conf"
state: absent
when: '"www" not in (ansible_local.hanxhx_php.fpm_pool | map(attribute="name") | list) and php_autoremove_default_pool'
when: '"www" not in (ansible_local.hanxhx_php.fpm_pool | map(attribute="name") | list)'
notify: restart php-fpm

View File

@@ -132,7 +132,7 @@ pm.process_idle_timeout = {{ item.pm_process_idle_timeout | default('10s') }};
; This can be useful to work around memory leaks in 3rd party libraries. For
; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
; Default Value: 0
pm.max_requests = {{ item.pm_max_requests | default('0') }}
;pm.max_requests = 500
; The URI to view the FPM status page. If this value is not set, no URI will be
; recognized as a status page. It shows the following informations:

View File

@@ -6,7 +6,6 @@
php_extra_packages:
- '{{ php_package_prefix }}pgsql'
php_install_xdebug: true
php_autoremove_default_pool: true
php_ini_fpm:
display_errors: 'Off'
php_ini_cli: