sys_fs.php_fpm
sys_fs.php_fpm
==============
This setup installs and configures PHP-FPM from the sury.org repository on Ubuntu and Debian systems.
Requirements
You need at least Ansible version 2.5 to use this setup.
Role Variables
php_fpm_packages:
- php7.3
- ...
- php7.3-zip
This is a list of PHP packages that will be installed.
php_fpm_pools:
- name: www type: unix pm: dynamic php_admin_values: memory_limit: value: '128M'
This is a list of pools that will be created. There are several optional settings for each pool. Here’s an explanation of the pool settings:
Name | Default | Description |
---|---|---|
name | www | The name of the pool. This also affects the socket name for unix type. |
type | '' | The type of socket to use: either 'tcp' or 'unix'. This is required. |
listen | 127.0.0.1:9000 | The address and port for TCP socket. |
listen_allowed_clients | '' | IP addresses allowed to connect to FPM when using TCP. Defaults to all addresses if not specified. |
pm | '' | Process management type: 'static', 'dynamic', or 'ondemand'. This is required. |
pm_max_children | 20 | Maximum child processes for static, or max for dynamic/ondemand. |
pm_start_servers | 5 | Initial number of child processes (only for dynamic). |
pm_min_spare_servers | 5 | Minimum number of idle child processes (only for dynamic). |
pm_max_spare_servers | 5 | Maximum number of idle child processes (only for dynamic). |
pm_process_idle_timeout | 10s | Time to kill inactive child processes (only for ondemand). |
pm_max_requests | 500 | How many requests a child process will handle before restarting. Set to 0 for no limit. |
php_admin_flags | [] | Local overrides for php.ini boolean values (on/off). Cannot be changed by ini_set. |
php_flags | [] | Local overrides for php.ini boolean values ('on' and 'off'). Can be changed by ini_set. |
php_admin_values | [] | Local overrides for php.ini values (not just boolean). Cannot be changed by ini_set. |
php_values | [] | Local overrides for php.ini values (not just boolean). Can be changed by ini_set. |
Example Playbook
- hosts: php
vars:
php_fpm_pools:
- name: dev
type: unix
pm: static
pm_max_children: 100
php_admin_values:
- name: memory_limit
value: '512M'
- name: 'opcache.enable'
value: 0
roles:
- sys_fs.php_fpm
License
MIT
Informazioni sul progetto
This role installs php-fpm from sury.org on Debian and Ubuntu.
Installa
ansible-galaxy install sys_fs.php_fpm
Licenza
mit
Download
394
Proprietario