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 config
php_ini: php_ini:
- key: 'date.timezone' 'date.timezone': 'Europe/Paris'
value: 'Europe/Paris' 'expose_php': 'Off'
- key: 'expose_php' 'memory_limit': '256M'
value: 'Off' php_ini_fpm: {}
- key: 'memory_limit' php_ini_cli: {}
value: '256M'
php_ini_fpm: []
php_ini_cli: []
# OpCache settings # OpCache settings
php_opcache_enable: "1" php_opcache_enable: "1"

View File

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

View File

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

View File

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