mirror of
https://github.com/geerlingguy/ansible-role-php-versions.git
synced 2024-11-25 10:55:10 +01:00
commit
afc9e00744
34
.travis.yml
34
.travis.yml
@ -2,11 +2,33 @@
|
||||
services: docker
|
||||
|
||||
env:
|
||||
- distro: centos7
|
||||
- distro: centos6
|
||||
- distro: debian8
|
||||
- distro: ubuntu1604
|
||||
- distro: ubuntu1404
|
||||
global:
|
||||
php_version: "7.1"
|
||||
|
||||
matrix:
|
||||
# Default - PHP 7.1
|
||||
- distro: centos7
|
||||
- distro: centos6
|
||||
- distro: debian8
|
||||
- distro: ubuntu1604
|
||||
- distro: ubuntu1404
|
||||
|
||||
# PHP 7.2
|
||||
- distro: centos7
|
||||
playbook: test-7.2.yml
|
||||
php_version: "7.2"
|
||||
- distro: centos6
|
||||
playbook: test-7.2.yml
|
||||
php_version: "7.2"
|
||||
- distro: debian8
|
||||
playbook: test-7.2.yml
|
||||
php_version: "7.2"
|
||||
- distro: ubuntu1604
|
||||
playbook: test-7.2.yml
|
||||
php_version: "7.2"
|
||||
- distro: ubuntu1404
|
||||
playbook: test-7.2.yml
|
||||
php_version: "7.2"
|
||||
|
||||
script:
|
||||
# Configure test script so we can run extra tests after playbook is run.
|
||||
@ -21,7 +43,7 @@ script:
|
||||
- ${PWD}/tests/test.sh
|
||||
|
||||
# Run script to test PHP version.
|
||||
- 'docker exec ${container_id} env TERM=xterm php -v | grep "7.1."'
|
||||
- 'docker exec ${container_id} env TERM=xterm php -v | grep -F "${php_version}."'
|
||||
|
||||
notifications:
|
||||
webhooks: https://galaxy.ansible.com/api/v1/notifications/
|
||||
|
@ -1,6 +1,9 @@
|
||||
---
|
||||
- name: Include OS-specific variables.
|
||||
include_vars: "{{ ansible_os_family }}.yml"
|
||||
include_vars: "{{ item }}"
|
||||
with_fileglob:
|
||||
- "../vars/{{ ansible_os_family }}.yml"
|
||||
- "../vars/{{ ansible_os_family }}-php{{ php_version }}.yml"
|
||||
|
||||
- name: Define PHP variables.
|
||||
set_fact: "{{ item.key }}={{ hostvars[inventory_hostname][item.value] }}"
|
||||
|
@ -49,3 +49,4 @@
|
||||
- php5.6-common
|
||||
- php7.0-common
|
||||
- php7.1-common
|
||||
- php7.2-common
|
||||
|
@ -10,3 +10,7 @@
|
||||
- name: Enable remi repo for PHP 7.1.
|
||||
set_fact: php_enablerepo="remi,remi-php71"
|
||||
when: php_version == "7.1"
|
||||
|
||||
- name: Enable remi repo for PHP 7.2.
|
||||
set_fact: php_enablerepo="remi,remi-php72"
|
||||
when: php_version == "7.2"
|
||||
|
17
tests/test-7.2.yml
Normal file
17
tests/test-7.2.yml
Normal file
@ -0,0 +1,17 @@
|
||||
---
|
||||
- hosts: all
|
||||
|
||||
vars:
|
||||
php_enable_webserver: false
|
||||
php_version: "7.2"
|
||||
|
||||
pre_tasks:
|
||||
- name: Update apt cache.
|
||||
apt: update_cache=yes cache_valid_time=600
|
||||
when: ansible_os_family == 'Debian'
|
||||
|
||||
roles:
|
||||
- role: geerlingguy.repo-remi
|
||||
when: ansible_os_family == 'RedHat'
|
||||
- role_under_test
|
||||
- geerlingguy.php
|
16
vars/Debian-php7.2.yml
Normal file
16
vars/Debian-php7.2.yml
Normal file
@ -0,0 +1,16 @@
|
||||
__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"
|
Loading…
Reference in New Issue
Block a user