mirror of
https://github.com/HanXHX/ansible-php.git
synced 2026-04-15 13:32:09 +07:00
🐛 Fix multiple PHP versions install
With Sury packages...
This commit is contained in:
@@ -1,5 +1,14 @@
|
||||
---
|
||||
|
||||
- name: SHELL | Check if we are in multiple PHP distribution
|
||||
ansible.builtin.shell: set -o pipefail && apt-cache search php xdebug | grep 'php[[:digit:]].[[:digit:]]'
|
||||
args:
|
||||
executable: /bin/bash
|
||||
failed_when: false
|
||||
changed_when: false
|
||||
register: multiple_php
|
||||
when: ansible_os_family == 'Debian'
|
||||
|
||||
- name: INCLUDE_VARS | Related to OS family
|
||||
ansible.builtin.include_vars: "OS_Family_{{ ansible_os_family }}.yml"
|
||||
|
||||
@@ -64,6 +73,7 @@
|
||||
state: present
|
||||
update_cache: true
|
||||
cache_valid_time: 3600
|
||||
install_recommends: false
|
||||
vars:
|
||||
pkgs: "{{ php_packages + php_extra_packages | flatten }}"
|
||||
notify: restart php-fpm
|
||||
|
||||
@@ -4,11 +4,13 @@
|
||||
|
||||
- name: APT | Install APCu
|
||||
ansible.builtin.apt:
|
||||
pkg: "php-apcu"
|
||||
pkg: "{{ php_apcu_package }}"
|
||||
install_recommends: false
|
||||
|
||||
- name: APT | Install Opcache
|
||||
ansible.builtin.apt:
|
||||
pkg: "{{ php_package_prefix }}opcache"
|
||||
install_recommends: false
|
||||
|
||||
when: ansible_os_family == 'Debian'
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
state: present
|
||||
update_cache: true
|
||||
cache_valid_time: 3600
|
||||
install_recommends: false
|
||||
when: ansible_os_family == 'Debian'
|
||||
|
||||
- name: PKGNG | Install xdebug
|
||||
|
||||
Reference in New Issue
Block a user