🐛 Fix multiple PHP versions install

With Sury packages...
This commit is contained in:
Emilien Mantel
2022-02-22 13:41:02 +01:00
parent 28caf6d9c9
commit 4aef107c1a
5 changed files with 34 additions and 2 deletions

View File

@@ -167,3 +167,21 @@
ansible.builtin.uri:
url: "http://localhost{{ php_fpm_poold.0.status_path }}"
when: php_fpm_poold.0.status_path is defined
- block:
- name: SHELL | Check if we installed multiple PHP versions
ansible.builtin.shell: set -o pipefail && (dpkg -l | grep 'php[[:digit:]].*common' | wc -l)
args:
executable: /bin/bash
failed_when: false
changed_when: false
register: check_multiple_php
- name: FAIL | If we have multiple PHP version
ansible.builtin.fail:
msg: "Multiple PHP versions detected"
when: check_multiple_php.stdout != '1'
when: ansible_os_family == 'Debian'