php: variable service name for jessie and stretch

This commit is contained in:
Jérémy Lecour 2018-06-13 09:37:55 +02:00 committed by Jérémy Lecour
parent 17d0c9c6bf
commit 767ce95b5c
4 changed files with 16 additions and 8 deletions

View file

@ -1,4 +1,10 @@
---
- name: restart php5-fpm
service:
name: php5-fpm
state: restarted
- name: restart php-fpm
service:
name: php-fpm

View file

@ -15,7 +15,7 @@
- { option: "log_errors", value: "On" }
- { option: "html_errors", value: "Off" }
- { option: "allow_url_fopen", value: "Off" }
notify: restart php-fpm
notify: "restart {{ php_fpm_service_name }}"
- name: Disable PHP functions for FPM
ini_file:
@ -23,7 +23,7 @@
section: PHP
option: disable_functions
value: "exec,shell-exec,system,passthru,putenv,popen"
notify: restart php-fpm
notify: "restart {{ php_fpm_service_name }}"
- name: Custom php.ini for FPM
copy:
@ -31,7 +31,7 @@
content: |
; Put customized values here.
force: no
notify: restart php-fpm
notify: "restart {{ php_fpm_service_name }}"
- name: Set default PHP FPM values
ini_file:
@ -50,7 +50,7 @@
- { option: "pm.status_path", value: "/fpm_status" }
- { option: "request_terminate_timeout", value: "60s" }
- { option: "chroot", value: "/var/www/html" }
notify: restart php-fpm
notify: "restart {{ php_fpm_service_name }}"
when: ansible_distribution_major_version | version_compare('9', '>=')
- name: Custom PHP FPM values
@ -61,7 +61,7 @@
; default_charset = "ISO-8859-1"
mode: "0644"
force: no
notify: restart php-fpm
notify: "restart {{ php_fpm_service_name }}"
- name: "Set custom values for PHP to enable Symfony"
ini_file:
@ -72,5 +72,5 @@
mode: "0644"
with_items:
- { option: "date.timezone", value: "Europe/Paris" }
notify: restart php-fpm
notify: "restart {{ php_fpm_service_name }}"
when: php_symfony_requirements

View file

@ -1,6 +1,6 @@
---
- name: "Set config files paths (jessie)"
- name: "Set variables (jessie)"
set_fact:
php_cli_defaults_ini_file: /etc/php5/cli/conf.d/z-evolinux-defaults.ini
php_cli_custom_ini_file: /etc/php5/cli/conf.d/zzz-evolinux-custom.ini
@ -10,6 +10,7 @@
php_fpm_custom_ini_file: /etc/php5/fpm/conf.d/zzz-evolinux-custom.ini
php_fpm_defaults_conf_file: /etc/php5/fpm/pool.d/z-evolinux-defaults.conf
php_fpm_custom_conf_file: /etc/php5/fpm/pool.d/zzz-evolinux-custom.conf
php_fpm_service_name: php5-fpm
# Packages

View file

@ -1,6 +1,6 @@
---
- name: "Set config files paths (Debian 9 or later)"
- name: "Set variables (Debian 9 or later)"
set_fact:
php_cli_defaults_ini_file: /etc/php/7.0/cli/conf.d/z-evolinux-defaults.ini
php_cli_custom_ini_file: /etc/php/7.0/cli/conf.d/zzz-evolinux-custom.ini
@ -10,6 +10,7 @@
php_fpm_custom_ini_file: /etc/php/7.0/fpm/conf.d/zzz-evolinux-custom.ini
php_fpm_defaults_conf_file: /etc/php/7.0/fpm/pool.d/z-evolinux-defaults.conf
php_fpm_custom_conf_file: /etc/php/7.0/fpm/pool.d/zzz-evolinux-custom.conf
php_fpm_service_name: php5-fpm
# Packages