Fixes #191: Add tests for Debian 8.

This commit is contained in:
Jeff Geerling 2017-05-14 23:10:58 -05:00
parent cfe3aaea27
commit ee9a148c08
2 changed files with 35 additions and 0 deletions

View File

@ -9,6 +9,9 @@ env:
- distro: fedora24
playbook: test.yml
php_version: 5.6
- distro: debian8
playbook: test.yml
php_version: 7.0
- distro: ubuntu1604
playbook: test.yml
php_version: 7.0
@ -49,5 +52,9 @@ script:
# Ensure PHP configurations have taken effect.
- docker exec --tty ${container_id} env TERM=xterm php -i | grep 'memory_limit.*192'
# Check the status of PHP-FPM (but don't fail if not found).
- docker exec --tty ${container_id} env TERM=xterm systemctl status php${php_version}-fpm status || true
- docker exec --tty ${container_id} env TERM=xterm systemctl status php-fpm status || true
notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/

View File

@ -3,6 +3,7 @@
vars:
php_enable_webserver: false
php_enable_php_fpm: true
php_memory_limit: "192M"
php_enablerepo: "remi,remi-php70"
php_install_recommends: no
@ -13,6 +14,7 @@
when: ansible_os_family == 'Debian'
changed_when: false
# Ubuntu-specific tasks.
- include_vars: test-vars-ubuntu1204.yml
when: ansible_distribution == 'Ubuntu' and ansible_distribution_version == '12.04'
@ -24,6 +26,32 @@
apt_repository: repo='ppa:ondrej/php'
when: ansible_distribution == 'Ubuntu' and ansible_distribution_version == '12.04'
# Debian-specific tasks.
- name: Add dependencies for PHP versions (Debian).
apt:
name: "{{ item }}"
with_items:
- apt-transport-https
- ca-certificates
when: ansible_distribution == "Debian"
- name: Add Ondrej Sury's apt key (Debian).
apt_key:
url: https://packages.sury.org/php/apt.gpg
state: present
when: ansible_distribution == "Debian"
- name: Add Ondrej Sury's repo (Debian).
apt_repository:
repo: "deb https://packages.sury.org/php/ {{ ansible_distribution_release }} main"
state: present
register: php_ondrej_debian_repo
when: ansible_distribution == "Debian"
- name: Update apt caches after repo is added (Debian).
apt: update_cache=yes
when: php_ondrej_debian_repo.changed and (ansible_distribution == "Debian")
roles:
- role: geerlingguy.repo-remi
when: ansible_os_family == 'RedHat' and ansible_distribution != 'Fedora'