ansible-roles/php/tasks/main_jessie.yml
Ludovic Poujol 585a8d04ac php: Change the default pool names to something more explicit (and same for the variables names)
Because it's more than just pure configuration, but a fpm pool 
definition, I've changed the following variables in Ansible :
- php_fpm_defaults_conf_file to replaced by php_fpm_default_pool_file
- php_fpm_custom_conf_file to php_fpm_default_pool_custom_file.

On the FPM side, I've also changed the files names of the pool to make 
them more explicit. No more z and zzz. It's the www pool, so let's put 
www in the file name for coherence : 
- z-evolinux-defaults.conf changes to www-evolinux-defaults.conf 
- zzz-evolinux-custom.conf changes to www-evolinux-zcustom.conf
2019-11-12 12:28:08 +01:00

82 lines
2 KiB
YAML

---
- 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
php_apache_defaults_ini_file: /etc/php5/apache2/conf.d/z-evolinux-defaults.ini
php_apache_custom_ini_file: /etc/php5/apache2/conf.d/zzz-evolinux-custom.ini
php_fpm_defaults_ini_file: /etc/php5/fpm/conf.d/z-evolinux-defaults.ini
php_fpm_custom_ini_file: /etc/php5/fpm/conf.d/zzz-evolinux-custom.ini
php_fpm_default_pool_file: /etc/php5/fpm/pool.d/www-evolinux-defaults.conf
php_fpm_default_pool_custom_file: /etc/php5/fpm/pool.d/www-evolinux-zcustom.conf
php_fpm_default_pool_socket: /var/run/php/php5-fpm.sock
php_fpm_service_name: php5-fpm
# Packages
- name: "Install PHP packages (jessie)"
apt:
name: '{{ item }}'
state: present
with_items:
- php5-cli
- php5-gd
- php5-imap
- php5-ldap
- php5-mcrypt
- "{{ php_modules_mysqlnd | bool | ternary('php5-mysqlnd','php5-mysql') }}"
- php5-pgsql
- php-gettext
- php5-intl
- php5-curl
- php5-ssh2
- libphp-phpmailer
- name: "Install mod_php packages (jessie)"
apt:
name: '{{ item }}'
state: present
with_items:
- libapache2-mod-php5
- php5
when: php_apache_enable
- name: "Install PHP FPM packages (jessie)"
apt:
name: '{{ item }}'
state: present
with_items:
- php5-fpm
- php5
when: php_fpm_enable
# Configuration
- name: Enforce permissions on PHP directory
file:
dest: /etc/php5
mode: "0755"
- include: config_cli.yml
- name: Enforce permissions on PHP cli directory
file:
dest: /etc/php5/cli
mode: "0755"
- include: config_fpm.yml
when: php_fpm_enable
- name: Enforce permissions on PHP fpm directory
file:
dest: /etc/php5/fpm
mode: "0755"
when: php_fpm_enable
- include: config_apache.yml
when: php_apache_enable
- name: Enforce permissions on PHP apache2 directory
file:
dest: /etc/php5/apache2
mode: "0755"
when: php_apache_enable