Optimize ini configuration

freebsd
Emilien Mantel 2017-11-10 12:19:39 +01:00
parent 6d4a7e1a08
commit 3d7c68e700
4 changed files with 19 additions and 22 deletions

View File

@ -7,14 +7,11 @@ php_extra_packages: []
# php.ini config
php_ini:
- key: 'date.timezone'
value: 'Europe/Paris'
- key: 'expose_php'
value: 'Off'
- key: 'memory_limit'
value: '256M'
php_ini_fpm: []
php_ini_cli: []
'date.timezone': 'Europe/Paris'
'expose_php': 'Off'
'memory_limit': '256M'
php_ini_fpm: {}
php_ini_cli: {}
# OpCache settings
php_opcache_enable: "1"

View File

@ -4,13 +4,11 @@
apt: pkg={{ php_fpm_service }} state=present
- name: LINEINFILE | PHP configuration
lineinfile: >
dest='{{ php_etc_dir }}/fpm/php.ini'
regexp='^;?{{ item.key }}'
line='{{ item.key }} = {{ item.value }}'
with_flattened:
- "{{ php_ini }}"
- "{{ php_ini_fpm }}"
lineinfile:
dest: '{{ php_etc_dir }}/fpm/php.ini'
regexp: '^;?{{ item.key }}'
line: '{{ item.key }} = {{ item.value }}'
with_dict: "{{ php_ini | combine(php_ini_fpm) }}"
notify: restart php-fpm
- name: TEMPLATE | Deploy pool configuration

View File

@ -26,13 +26,11 @@
when: php_install_fpm
- name: LINEINFILE | PHP configuration
lineinfile: >
dest='{{ php_etc_dir }}/cli/php.ini'
regexp='^;?{{ item.key }}'
line='{{ item.key }} = {{ item.value }}'
with_flattened:
- "{{ php_ini }}"
- "{{ php_ini_cli }}"
lineinfile:
dest: '{{ php_etc_dir }}/cli/php.ini'
regexp: '^;?{{ item.key }}'
line: '{{ item.key }} = {{ item.value }}'
with_dict: "{{ php_ini_cli }}"
- name: INCLUDE | Xdebug
include: xdebug.yml

View File

@ -6,6 +6,10 @@
php_extra_packages:
- '{{ php_apt_prefix }}recode'
php_install_xdebug: true
php_ini_fpm:
display_errors: 'Off'
php_ini_cli:
error_reporting: 'E_ALL'
pre_tasks: