Commit 32fa6798 authored by HgO's avatar HgO
Browse files

split install default vs extra php modules

parent 3df687e7
Pipeline #407 passed with stage
in 1 minute and 31 seconds
......@@ -9,13 +9,6 @@
name: php_fpm
vars:
php_version: "7.4"
php_modules:
- php-opcache
- php-curl
- php-gd
- php-xml
- php-mbstring
- php-zip
# Dokuwiki handles php session name by itself
php_fpm_session_name: ""
tags: ['php_fpm']
......
......@@ -8,15 +8,9 @@
import_role:
name: php_fpm
vars:
php_modules:
- php-opcache
- php-curl
- php-gd
- php-xml
- php-mbstring
- php-zip
- php-yaml
- php-sqlite3
php_extra_modules:
- yaml
- sqlite3
# Grav handles php session name by itself
php_fpm_session_name: ""
tags: ['php_fpm']
......
......@@ -9,7 +9,17 @@
name: php_fpm
vars:
php_version: "{{ nextcloud_php_version }}"
php_modules: "{{ nextcloud_php_modules }}"
php_extra_modules:
- bcmath
- bz2
- fileinfo
- gmp
- imagick
- intl
- json
- pgsql
- redis
tags: ['php_fpm']
- name: Installation l'application web
......
......@@ -6,20 +6,3 @@ postgres_packages:
- libpq-dev
- python3-psycopg2
- acl
nextcloud_php_modules:
- php-opcache
- php-curl
- php-bcmath
- php-bz2
- php-fileinfo
- php-gd
- php-gmp
- php-imagick
- php-intl
- php-json
- php-mbstring
- php-pgsql
- php-redis
- php-xml
- php-zip
php_version: ""
php_config_dir: "/etc/php/{{ php_version }}"
php_modules: []
php_extra_modules: []
php_fpm_config_dir: "{{ php_config_dir }}/fpm"
php_fpm_pool_dir: "{{ php_fpm_config_dir }}/pool.d"
......
......@@ -29,16 +29,40 @@
set_fact:
php_version: "{{ _php_version.stdout }}"
- name: Installation des modules PHP
- name: Installation des modules PHP par défaut
package:
name: "{{ php_modules | map('regex_replace', '^php', 'php' + php_version) | list }}"
name: "{{ php_module }}"
state: present
loop:
- cli
- curl
- gd
- mbstring
- opcache
- xml
- zip
loop_control:
loop_var: module_name
label: "{{ php_module }}"
vars:
php_module: "{{ php_executable }}-{{ module_name }}"
- name: Installation des modules PHP additionnels
package:
name: "{{ php_module }}"
state: present
loop: "{{ php_extra_modules }}"
loop_control:
loop_var: module_name
label: "{{ php_module }}"
vars:
php_module: "{{ php_executable }}-{{ module_name }}"
- name: Installation de imagemagick
package:
name: imagemagick
state: present
when: "'php-imagick' in php_modules"
when: "'imagick' in php_extra_modules"
- name: Copie de la configuration OPCache
template:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment