Travis should load php version with group
parent
9711cd5d15
commit
9b55e91711
|
@ -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"]
|
||||
|
||||
|
|
|
@ -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"]
|
||||
|
||||
|
|
|
@ -1 +1,7 @@
|
|||
localhost
|
||||
|
||||
[php-5.6]
|
||||
localhost
|
||||
|
||||
[php-7.0]
|
||||
localhost
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue