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 FROM williamyeh/ansible:debian8-onbuild
RUN apt-get update 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 FROM williamyeh/ansible:debian8-onbuild
RUN apt-get update && ansible-galaxy install HanXHX.dotdeb 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 localhost
[php-5.6]
localhost
[php-7.0]
localhost

View File

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

View File

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