Merge pull request #64 from wells/feature/php-8
Add support for PHP 8.0
This commit is contained in:
commit
6a9b4b66ad
|
@ -51,6 +51,14 @@ jobs:
|
||||||
- distro: debian10
|
- distro: debian10
|
||||||
playbook: converge.yml
|
playbook: converge.yml
|
||||||
|
|
||||||
|
# PHP 8.0.
|
||||||
|
- distro: centos8
|
||||||
|
playbook: 8.0.yml
|
||||||
|
- distro: ubuntu1804
|
||||||
|
playbook: 8.0.yml
|
||||||
|
- distro: debian10
|
||||||
|
playbook: 8.0.yml
|
||||||
|
|
||||||
# PHP 7.4.
|
# PHP 7.4.
|
||||||
- distro: centos8
|
- distro: centos8
|
||||||
playbook: 7.4.yml
|
playbook: 7.4.yml
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
---
|
||||||
|
- name: Converge
|
||||||
|
hosts: all
|
||||||
|
become: true
|
||||||
|
|
||||||
|
vars:
|
||||||
|
php_enable_webserver: false
|
||||||
|
php_version: '8.0'
|
||||||
|
|
||||||
|
pre_tasks:
|
||||||
|
- name: Update apt cache.
|
||||||
|
apt: update_cache=true cache_valid_time=600
|
||||||
|
when: ansible_os_family == 'Debian'
|
||||||
|
|
||||||
|
roles:
|
||||||
|
- role: geerlingguy.repo-remi
|
||||||
|
when: ansible_os_family == 'RedHat'
|
||||||
|
- role: geerlingguy.php-versions
|
||||||
|
- role: geerlingguy.php
|
||||||
|
|
||||||
|
post_tasks:
|
||||||
|
- name: Confirm PHP version is correct.
|
||||||
|
shell: php -v | grep -F '{{ php_version }}'
|
||||||
|
changed_when: false
|
|
@ -5,6 +5,13 @@
|
||||||
- "{{ role_path }}/vars/{{ ansible_os_family }}.yml"
|
- "{{ role_path }}/vars/{{ ansible_os_family }}.yml"
|
||||||
- "{{ role_path }}/vars/{{ ansible_os_family }}-php{{ php_version }}.yml"
|
- "{{ role_path }}/vars/{{ ansible_os_family }}-php{{ php_version }}.yml"
|
||||||
|
|
||||||
|
- name: Remove missing JSON extension for PHP 8.0 (included by default)
|
||||||
|
set_fact:
|
||||||
|
__php_packages: "{{ __php_packages | reject('search','php' + php_version + '-json') | list }}"
|
||||||
|
when:
|
||||||
|
- __php_packages is defined
|
||||||
|
- php_version is version('8.0', '>=')
|
||||||
|
|
||||||
- name: Define PHP variables.
|
- name: Define PHP variables.
|
||||||
set_fact: "{{ item.key }}={{ lookup('vars', item.value) }}"
|
set_fact: "{{ item.key }}={{ lookup('vars', item.value) }}"
|
||||||
when:
|
when:
|
||||||
|
|
|
@ -11,6 +11,10 @@
|
||||||
set_fact: php_enablerepo="remi,remi-php74"
|
set_fact: php_enablerepo="remi,remi-php74"
|
||||||
when: php_version == "7.4"
|
when: php_version == "7.4"
|
||||||
|
|
||||||
|
- name: Enable remi repo for PHP 8.0.
|
||||||
|
set_fact: php_enablerepo="remi,remi-php80"
|
||||||
|
when: php_version == "8.0"
|
||||||
|
|
||||||
# See: https://github.com/ansible/ansible/issues/64852
|
# See: https://github.com/ansible/ansible/issues/64852
|
||||||
- block:
|
- block:
|
||||||
|
|
||||||
|
|
|
@ -42,3 +42,4 @@ php_versions_debian:
|
||||||
- php7.2-common
|
- php7.2-common
|
||||||
- php7.3-common
|
- php7.3-common
|
||||||
- php7.4-common
|
- php7.4-common
|
||||||
|
- php8.0-common
|
||||||
|
|
Loading…
Reference in New Issue