Fixes #27: Default to PHP 7.2, fully support PHP 7.3.

This commit is contained in:
Jeff Geerling 2018-12-06 15:29:10 -06:00
parent 0dae6744e8
commit 84a560d447
11 changed files with 11 additions and 82 deletions

2
.gitignore vendored
View File

@ -1,3 +1 @@
*.retry
*/__pycache__
*.pyc

View File

@ -6,7 +6,7 @@ env:
global:
- ROLE_NAME: php-versions
matrix:
# Default PHP version (7.1).
# Default PHP version (7.2).
- MOLECULE_DISTRO: centos7
- MOLECULE_DISTRO: ubuntu1804
- MOLECULE_DISTRO: ubuntu1604
@ -23,21 +23,11 @@ env:
- MOLECULE_DISTRO: debian9
MOLECULE_PLAYBOOK: playbook-7.3.yml
# PHP 7.2.
# PHP 7.1.
- MOLECULE_DISTRO: centos7
MOLECULE_PLAYBOOK: playbook-7.2.yml
MOLECULE_PLAYBOOK: playbook-7.1.yml
- MOLECULE_DISTRO: ubuntu1804
MOLECULE_PLAYBOOK: playbook-7.2.yml
- MOLECULE_DISTRO: ubuntu1604
MOLECULE_PLAYBOOK: playbook-7.2.yml
- MOLECULE_DISTRO: debian9
MOLECULE_PLAYBOOK: playbook-7.2.yml
# PHP 5.6.
- MOLECULE_DISTRO: centos7
MOLECULE_PLAYBOOK: playbook-5.6.yml
- MOLECULE_DISTRO: ubuntu1804
MOLECULE_PLAYBOOK: playbook-5.6.yml
MOLECULE_PLAYBOOK: playbook-7.1.yml
install:
# Install test dependencies.

View File

@ -12,9 +12,9 @@ N/A
Available variables are listed below, along with default values (see `defaults/main.yml`):
php_version: '7.1'
php_version: '7.7'
The PHP version to be installed. Any [currently-supported PHP major version](http://php.net/supported-versions.php) is a valid option (e.g. `5.6`, `7.0`, `7.1`, etc.
The PHP version to be installed. Any [currently-supported PHP major version](http://php.net/supported-versions.php) is a valid option (e.g. `5.6`, `7.1`, `7.2`, `7.3`, etc.).
php_versions_install_recommends: false
@ -30,7 +30,7 @@ The PHP version to be installed. Any [currently-supported PHP major version](htt
- hosts: webservers
vars:
php_version: '7.1'
php_version: '7.2'
roles:
- role: geerlingguy.repo-remi

View File

@ -1,6 +1,6 @@
---
# The PHP version to be installed.
php_version: '7.1'
php_version: '7.2'
# For Debian OSes only.
php_versions_install_recommends: false

View File

@ -5,7 +5,7 @@ galaxy_info:
author: geerlingguy
description: Allows different PHP versions to be installed.
company: "Midwestern Mac, LLC"
license: "license (BSD, MIT)"
license: "MIT"
issue_tracker_url: https://github.com/geerlingguy/drupal-vm/issues
min_ansible_version: 2.4
platforms:
@ -17,9 +17,6 @@ galaxy_info:
- all
- name: Ubuntu
versions:
- precise
- raring
- saucy
- trusty
- xenial
- bionic

View File

@ -5,7 +5,7 @@
vars:
php_enable_webserver: false
php_version: '5.6'
php_version: '7.1'
pre_tasks:
- name: Update apt cache.

View File

@ -1,24 +0,0 @@
---
- name: Converge
hosts: all
become: true
vars:
php_enable_webserver: false
php_version: '7.2'
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

View File

@ -5,7 +5,7 @@
vars:
php_enable_webserver: false
php_version: '7.1'
php_version: '7.2'
pre_tasks:
- name: Update apt cache.

View File

@ -1,14 +0,0 @@
import os
import testinfra.utils.ansible_runner
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
def test_hosts_file(host):
f = host.file('/etc/hosts')
assert f.exists
assert f.user == 'root'
assert f.group == 'root'

View File

@ -1,17 +0,0 @@
---
__php_packages:
- "php{{ php_version }}"
- "php{{ php_version }}-apcu"
- "php{{ php_version }}-cli"
- "php{{ php_version }}-common"
- "php{{ php_version }}-curl"
- "php{{ php_version }}-dev"
- "php{{ php_version }}-fpm"
- "php{{ php_version }}-gd"
- "php{{ php_version }}-imap"
- "php{{ php_version }}-json"
- "php{{ php_version }}-mbstring"
- "php{{ php_version }}-opcache"
- "php{{ php_version }}-sqlite3"
- "php{{ php_version }}-xml"
- "php{{ php_version }}-yaml"

View File

@ -33,7 +33,6 @@ __php_packages:
- "php{{ php_version }}-imap"
- "php{{ php_version }}-json"
- "php{{ php_version }}-mbstring"
- "php{{ php_version }}-mcrypt"
- "php{{ php_version }}-opcache"
- "php{{ php_version }}-sqlite3"
- "php{{ php_version }}-xml"