Add support for PHP 7.1 using sury repository.

See the documentation: https://wiki.evolix.org/HowtoPHP#php-7.1-avec-deb.sury.org
This commit is contained in:
Benoît S. 2017-09-20 11:29:54 +02:00
parent c430fa3485
commit fa55761714
4 changed files with 32 additions and 0 deletions

View File

@ -1,5 +1,6 @@
---
php_sury_enable: False
php_fpm_enable: False
php_apache_enable: False
php_symfony_requirements: False

View File

@ -3,3 +3,7 @@
service:
name: php-fpm
state: restarted
- name: apt update
apt:
update_cache: yes

View File

@ -8,6 +8,9 @@
- include: php_jessie.yml
when: ansible_distribution_release == "jessie"
- include: php_stretch_sury.yml
when: ansible_distribution_major_version | version_compare('9', '>=') and php_sury_enable
- include: php_stretch.yml
when: ansible_distribution_major_version | version_compare('9', '>=')

View File

@ -0,0 +1,24 @@
---
- name: Setup deb.sury.org repository - Add GPG key
get_url:
url: https://packages.sury.org/php/apt.gpg
dest: /etc/apt/trusted.gpg.d/php71-sury.gpg
mode: "0644"
- name: Setup deb.sury.org repository - Install apt-transport-https
apt:
state: present
name: apt-transport-https
- name: Setup deb.sury.org repository - Add source list
copy:
dest: /etc/apt/sources.list.d/php71-sury.list
force: no
mode: "0600"
content: |
deb https://packages.sury.org/php/ stretch main
notify: apt update
- name: Intermediate flush of handlers
meta: flush_handlers