mirror of
https://github.com/HanXHX/ansible-php.git
synced 2026-02-28 09:42:09 +07:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3690ee2b15 | ||
|
|
ec1175af21 | ||
|
|
1eea41cd39 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -3,4 +3,3 @@
|
||||
*.retry
|
||||
*.log
|
||||
/filter_plugins/*.pyc
|
||||
/filter_plugins/__pycache__
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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:
|
||||
|
||||
BIN
filter_plugins/__pycache__/php.cpython-37.pyc
Normal file
BIN
filter_plugins/__pycache__/php.cpython-37.pyc
Normal file
Binary file not shown.
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user