Simplify tests (don't need dotdeb role + force php_version)
parent
fd3d404c31
commit
e257e8bde7
|
@ -6,10 +6,10 @@
|
||||||
Vagrant.configure("2") do |config|
|
Vagrant.configure("2") do |config|
|
||||||
|
|
||||||
vms = [
|
vms = [
|
||||||
[ "jessie-php-5.6", "debian/contrib-jessie64", "192.168.33.88", "php-5.6" ],
|
[ "jessie-php-5.6", "debian/contrib-jessie64", "192.168.33.88", "5.6" ],
|
||||||
[ "jessie-php-7.0", "debian/contrib-jessie64", "192.168.33.89", "php-7.0" ],
|
[ "jessie-php-7.0", "debian/contrib-jessie64", "192.168.33.89", "7.0" ],
|
||||||
[ "stretch-php-5.6", "sharlak/debian_stretch_64", "192.168.33.90", "php-5.6" ],
|
[ "stretch-php-5.6", "sharlak/debian_stretch_64", "192.168.33.90", "5.6" ],
|
||||||
[ "stretch-php-7.0", "sharlak/debian_stretch_64", "192.168.33.91", "php-7.0" ]
|
[ "stretch-php-7.0", "sharlak/debian_stretch_64", "192.168.33.91", "7.0" ]
|
||||||
]
|
]
|
||||||
|
|
||||||
config.vm.provider "virtualbox" do |v|
|
config.vm.provider "virtualbox" do |v|
|
||||||
|
@ -24,9 +24,11 @@ Vagrant.configure("2") do |config|
|
||||||
|
|
||||||
m.vm.provision "ansible" do |ansible|
|
m.vm.provision "ansible" do |ansible|
|
||||||
ansible.playbook = "tests/test.yml"
|
ansible.playbook = "tests/test.yml"
|
||||||
ansible.groups = { vm[3] => [ vm[0] ] }
|
|
||||||
ansible.verbose = 'vv'
|
ansible.verbose = 'vv'
|
||||||
ansible.sudo = true
|
ansible.sudo = true
|
||||||
|
ansible.extra_vars = {
|
||||||
|
php_version: vm[3]
|
||||||
|
}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -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
|
||||||
CMD ["sh", "tests/test.sh", "php-5.6"]
|
CMD ["sh", "tests/test.sh", "5.6"]
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
CMD ["sh", "tests/test.sh", "php-7.0"]
|
CMD ["sh", "tests/test.sh", "7.0"]
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ set -ev
|
||||||
# Only for travis
|
# Only for travis
|
||||||
if [ -n "$1" ]
|
if [ -n "$1" ]
|
||||||
then
|
then
|
||||||
ANSIBLE_ARG="--limit $1"
|
ANSIBLE_ARG="-e 'php_version: $1'"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,5 @@
|
||||||
---
|
---
|
||||||
|
|
||||||
# On Debian Jessie, we need Dotdeb for PHP 7.0
|
|
||||||
- hosts: php-7.0
|
|
||||||
roles:
|
|
||||||
- role: HanXHX.dotdeb
|
|
||||||
when: >
|
|
||||||
ansible_distribution_major_version | version_compare(8, 'eq')
|
|
||||||
|
|
||||||
- hosts: all
|
- hosts: all
|
||||||
vars:
|
vars:
|
||||||
vhost: 'test.local'
|
vhost: 'test.local'
|
||||||
|
@ -14,6 +7,11 @@
|
||||||
- '{{ php_apt_prefix }}recode'
|
- '{{ php_apt_prefix }}recode'
|
||||||
php_install_xdebug: true
|
php_install_xdebug: true
|
||||||
pre_tasks:
|
pre_tasks:
|
||||||
|
- name: APT | Add Dotdeb repository for Jessie + PHP7
|
||||||
|
apt_repository: repo='deb http://packages.dotdeb.org jessie all' state=present
|
||||||
|
when: >
|
||||||
|
ansible_distribution_major_version | version_compare(8, 'eq') and
|
||||||
|
php_version | version_compare('7.0', 'ge')
|
||||||
- name: APT | Install nginx
|
- name: APT | Install nginx
|
||||||
apt: pkg=nginx state=present update_cache=yes cache_valid_time=3600
|
apt: pkg=nginx state=present update_cache=yes cache_valid_time=3600
|
||||||
- name: SHELL | Get nginx version
|
- name: SHELL | Get nginx version
|
||||||
|
|
Loading…
Reference in New Issue