mirror of
https://github.com/geerlingguy/ansible-role-php-versions.git
synced 2024-11-22 10:25:40 +01:00
Merge pull request #64 from wells/feature/php-8
Add support for PHP 8.0
This commit is contained in:
commit
6a9b4b66ad
8
.github/workflows/ci.yml
vendored
8
.github/workflows/ci.yml
vendored
@ -51,6 +51,14 @@ jobs:
|
||||
- distro: debian10
|
||||
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.
|
||||
- distro: centos8
|
||||
playbook: 7.4.yml
|
||||
|
24
molecule/default/8.0.yml
Normal file
24
molecule/default/8.0.yml
Normal file
@ -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 }}-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.
|
||||
set_fact: "{{ item.key }}={{ lookup('vars', item.value) }}"
|
||||
when:
|
||||
|
@ -11,6 +11,10 @@
|
||||
set_fact: php_enablerepo="remi,remi-php74"
|
||||
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
|
||||
- block:
|
||||
|
||||
|
@ -42,3 +42,4 @@ php_versions_debian:
|
||||
- php7.2-common
|
||||
- php7.3-common
|
||||
- php7.4-common
|
||||
- php8.0-common
|
||||
|
Loading…
Reference in New Issue
Block a user