4 Commits

Author SHA1 Message Date
Emilien Mantel
4feb3be7d5 Upgrade README.php 2019-12-26 18:10:56 +01:00
Emilien Mantel
c0922f8430 Option: autoremove default pool 2019-12-26 16:42:16 +01:00
Emilien Mantel
ade8aaad9e Remove useless files 2019-12-26 15:38:54 +01:00
Emilien M
a19adf5150 Improvements (#13)
- Store configuration in local facts
- Better socket generator
- php_admin_value/php_value
- Manages PHP 7.4 on Debian
2019-12-26 14:13:00 +01:00
6 changed files with 6 additions and 4 deletions

1
.gitignore vendored
View File

@@ -3,3 +3,4 @@
*.retry *.retry
*.log *.log
/filter_plugins/*.pyc /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 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 old Debian versions) - It can't manage multiple PHP versions at the time (like legacy Debian versions)
- You must explicitely set xdebug package name (use `pkg search xdebug` to find the good one) - You must explicitely set xdebug package name (use `pkg search xdebug` to find the good one)
Role Variables Role Variables
@@ -39,7 +39,7 @@ You should look at [default vars](defaults/main.yml).
### Writable vars ### Writable vars
- `php_version`: 7.0, 7.1, 7.2, 7.3 - `php_version`: 7.3, 7.4... depending OS (see above)
- `php_install_fpm`: boolean, install and manage php-fpm (default is true) - `php_install_fpm`: boolean, install and manage php-fpm (default is true)
- `php_install_xdebug`: boolean, install [Xdebug](http://xdebug.org) - `php_install_xdebug`: boolean, install [Xdebug](http://xdebug.org)
- `php_extra_packages`: additional php packages to install (default is an empty list). - `php_extra_packages`: additional php packages to install (default is an empty list).
@@ -56,7 +56,6 @@ Note:
- Put specific configuration in `php_ini_fpm`/`php_ini_cli`. - Put specific configuration in `php_ini_fpm`/`php_ini_cli`.
- You can override with `php_ini_fpm`/`php_ini_cli`, but it breaks idempotence. - You can override with `php_ini_fpm`/`php_ini_cli`, but it breaks idempotence.
#### OpCache settings #### OpCache settings
See [Opcache doc](https://secure.php.net/manual/en/opcache.configuration.php) See [Opcache doc](https://secure.php.net/manual/en/opcache.configuration.php)

View File

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

View File

@@ -32,5 +32,5 @@
file: file:
path: "{{ php_fpm_pool_dir }}/www.conf" path: "{{ php_fpm_pool_dir }}/www.conf"
state: absent state: absent
when: '"www" not in (ansible_local.hanxhx_php.fpm_pool | map(attribute="name") | list)' when: '"www" not in (ansible_local.hanxhx_php.fpm_pool | map(attribute="name") | list) and php_autoremove_default_pool'
notify: restart php-fpm notify: restart php-fpm

View File

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