Travis should load php version with group

pull/5/head
Emilien Mantel 2016-01-22 17:17:38 +01:00
parent 9711cd5d15
commit 9b55e91711
5 changed files with 12 additions and 8 deletions

View File

@ -1,5 +1,5 @@
FROM williamyeh/ansible:debian8-onbuild
RUN apt-get update
CMD ["sh", "tests/test.sh", "5.6"]
CMD ["sh", "tests/test.sh", "php-5.6"]

View File

@ -1,5 +1,5 @@
FROM williamyeh/ansible:debian8-onbuild
RUN apt-get update && ansible-galaxy install HanXHX.dotdeb
CMD ["sh", "tests/test.sh", "7.0"]
CMD ["sh", "tests/test.sh", "php-7.0"]

View File

@ -1 +1,7 @@
localhost
[php-5.6]
localhost
[php-7.0]
localhost

View File

@ -5,14 +5,14 @@
DIR=$( dirname $0 )
INVENTORY_FILE="$DIR/inventory"
PLAYBOOK="$DIR/test.yml"
ANSIBLE_ARG=""
ANSIBLE_ARG="localhost"
set -ev
# Only for travis
if [ -n "$1" ]
then
ANSIBLE_ARG="--extra-vars 'php_version=$1'"
ANSIBLE_ARG="--limit $1"
fi

View File

@ -1,13 +1,11 @@
---
# On Debian Jessie, we need Dotdeb for PHP 7.0
- hosts: all
- hosts: php-7.0
roles:
- role: HanXHX.dotdeb
when: >
ansible_distribution_major_version | version_compare(8, 'eq') and
php_version is defined and
php_version | version_compare('7.0', 'ge')
ansible_distribution_major_version | version_compare(8, 'eq')
- hosts: all
vars: