Load default PHP version per OS release
parent
8758a9b7dc
commit
f38aa400b3
|
@ -6,18 +6,18 @@
|
||||||
Vagrant.configure("2") do |config|
|
Vagrant.configure("2") do |config|
|
||||||
|
|
||||||
vms_debian = [
|
vms_debian = [
|
||||||
{ :name => "debian-jessie-php56", :box => "debian/jessie64", :vars => { "php_version": '5.6' }},
|
{ :name => "debian-jessie-php56", :box => "debian/jessie64", :vars => { }},
|
||||||
{ :name => "debian-jessie-php70", :box => "debian/jessie64", :vars => { "php_version": '7.0' }},
|
{ :name => "debian-jessie-php70", :box => "debian/jessie64", :vars => { "php_version": '7.0' }},
|
||||||
{ :name => "debian-jessie-php71", :box => "debian/jessie64", :vars => { "php_version": '7.1' }},
|
{ :name => "debian-jessie-php71", :box => "debian/jessie64", :vars => { "php_version": '7.1' }},
|
||||||
{ :name => "debian-stretch-php70", :box => "debian/stretch64", :vars => { "php_version": '7.0' }},
|
{ :name => "debian-stretch-php70", :box => "debian/stretch64", :vars => { }},
|
||||||
{ :name => "debian-stretch-php71", :box => "debian/stretch64", :vars => { "php_version": '7.1' }}
|
{ :name => "debian-stretch-php71", :box => "debian/stretch64", :vars => { "php_version": '7.1' }}
|
||||||
]
|
]
|
||||||
|
|
||||||
conts = [
|
conts = [
|
||||||
{ :name => "docker-debian-jessie-php56", :docker => "hanxhx/vagrant-ansible:debian8", :vars => { "php_version": '5.6' }},
|
{ :name => "docker-debian-jessie-php56", :docker => "hanxhx/vagrant-ansible:debian8", :vars => { }},
|
||||||
{ :name => "docker-debian-jessie-php70", :docker => "hanxhx/vagrant-ansible:debian8", :vars => { "php_version": '7.0' }},
|
{ :name => "docker-debian-jessie-php70", :docker => "hanxhx/vagrant-ansible:debian8", :vars => { "php_version": '7.0' }},
|
||||||
{ :name => "docker-debian-jessie-php71", :docker => "hanxhx/vagrant-ansible:debian8", :vars => { "php_version": '7.1' }},
|
{ :name => "docker-debian-jessie-php71", :docker => "hanxhx/vagrant-ansible:debian8", :vars => { "php_version": '7.1' }},
|
||||||
{ :name => "docker-debian-stretch-php70", :docker => "hanxhx/vagrant-ansible:debian9", :vars => { "php_version": '7.0' }},
|
{ :name => "docker-debian-stretch-php70", :docker => "hanxhx/vagrant-ansible:debian9", :vars => { }},
|
||||||
{ :name => "docker-debian-stretch-php71", :docker => "hanxhx/vagrant-ansible:debian9", :vars => { "php_version": '7.1' }}
|
{ :name => "docker-debian-stretch-php71", :docker => "hanxhx/vagrant-ansible:debian9", :vars => { "php_version": '7.1' }}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
|
|
||||||
php_version: '5.6'
|
php_version: '{{ php_default_version }}'
|
||||||
php_install_fpm: true
|
php_install_fpm: true
|
||||||
php_install_xdebug: false
|
php_install_xdebug: false
|
||||||
php_extra_packages: []
|
php_extra_packages: []
|
||||||
|
@ -100,3 +100,5 @@ php_fpm_poold:
|
||||||
pm_min_spare_servers: 10
|
pm_min_spare_servers: 10
|
||||||
pm_max_spare_servers: 20
|
pm_max_spare_servers: 20
|
||||||
|
|
||||||
|
# Hack
|
||||||
|
php_default_version: 'NONE'
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
---
|
---
|
||||||
|
|
||||||
|
- name: INCLUDE_VARS | Related to OS
|
||||||
|
include_vars: "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yml"
|
||||||
|
|
||||||
- name: ASSERT | Check variables
|
- name: ASSERT | Check variables
|
||||||
assert:
|
assert:
|
||||||
that: "php_version in php_managed_versions"
|
that: "php_version in php_managed_versions"
|
||||||
|
|
|
@ -58,7 +58,7 @@
|
||||||
post_tasks:
|
post_tasks:
|
||||||
|
|
||||||
- name: SHELL | Test php-cli
|
- name: SHELL | Test php-cli
|
||||||
shell: php -i | grep '^PHP Version' | head -n 1
|
shell: php -i | grep '^PHP Version => {{ php_version }}' | head -n 1
|
||||||
changed_when: false
|
changed_when: false
|
||||||
register: p
|
register: p
|
||||||
failed_when: p.stdout == ''
|
failed_when: p.stdout == ''
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
php_default_version: '5.6'
|
|
@ -0,0 +1 @@
|
||||||
|
php_default_version: '7.0'
|
Loading…
Reference in New Issue