parent
e35f77089a
commit
7e5d2a5258
14
README.md
14
README.md
|
@ -21,7 +21,19 @@ You should look at [default vars](defaults/main.yml).
|
|||
- `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).
|
||||
- `php_ini`: manage php.ini (php-fpm), as key/value.
|
||||
|
||||
#### php.ini
|
||||
|
||||
- `php_ini`: global configuration shared beween FPM/CLI
|
||||
- `php_ini_fpm`: manage FPM php.ini (php-fpm)
|
||||
- `php_ini_cli`: manage CLI php.ini (php-fpm)
|
||||
|
||||
Note:
|
||||
|
||||
- If you want exactly same configuration for CLI/FPM. You can put all your data in `php_ini`.
|
||||
- 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 (PHP >= 5.5)
|
||||
|
||||
|
|
|
@ -12,6 +12,8 @@ php_ini:
|
|||
value: 'Off'
|
||||
- key: 'memory_limit'
|
||||
value: '256M'
|
||||
php_ini_fpm: []
|
||||
php_ini_cli: []
|
||||
|
||||
# OpCache settings (PHP >= 5.5)
|
||||
php_opcache_enable: "1"
|
||||
|
|
|
@ -5,7 +5,9 @@
|
|||
|
||||
- name: LINEINFILE | PHP configuration
|
||||
lineinfile: dest=/etc/php5/fpm/php.ini regexp='^;?{{ item.key }}' line='{{ item.key }} = {{ item.value }}'
|
||||
with_items: php_ini
|
||||
with_flattened:
|
||||
- php_ini
|
||||
- php_ini_fpm
|
||||
notify: restart php-fpm
|
||||
|
||||
- name: TEMPLATE | Deploy pool configuration
|
||||
|
|
|
@ -15,6 +15,12 @@
|
|||
include: fpm.yml
|
||||
when: php_install_fpm
|
||||
|
||||
- name: LINEINFILE | PHP configuration
|
||||
lineinfile: dest=/etc/php5/cli/php.ini regexp='^;?{{ item.key }}' line='{{ item.key }} = {{ item.value }}'
|
||||
with_flattened:
|
||||
- php_ini
|
||||
- php_ini_cli
|
||||
|
||||
- name: INCLUDE | Xdebug
|
||||
include: xdebug.yml
|
||||
when: php_install_xdebug
|
||||
|
|
Loading…
Reference in New Issue