6 Commits
2.3 ... 2.4.0

Author SHA1 Message Date
Emilien M
75f09eaf59 Delete default pool if necessary (#10)
(when default pool 'www' not in pool list)
2019-04-19 14:36:35 +02:00
Emilien M
5abe99568a Support Debian Buster (#11) 2019-04-19 14:36:20 +02:00
Emilien Mantel
8b2c92a047 Force python 2.7 on travis 2019-04-19 11:28:50 +02:00
Emilien Mantel
0171ae8e20 Quick changes 2019-04-19 11:18:46 +02:00
Emilien Mantel
95892782ea Fix version compare 2019-04-19 10:59:00 +02:00
Emilien Mantel
f5b9eb78b7 Remove legacy 'include' module 2019-04-19 10:28:00 +02:00
10 changed files with 34 additions and 14 deletions

View File

@@ -3,6 +3,7 @@ env:
- PLATFORM='docker-debian-stretch-php71' ANSIBLE_VERSION='ansible>=2.6,<2.7'
- PLATFORM='docker-debian-stretch-php72' ANSIBLE_VERSION='ansible>=2.6,<2.7'
- PLATFORM='docker-debian-stretch-php73' ANSIBLE_VERSION='ansible>=2.6,<2.7'
- PLATFORM='docker-debian-buster-php73' ANSIBLE_VERSION='ansible>=2.6,<2.7'
- PLATFORM='docker-ubuntu-xenial-php70' ANSIBLE_VERSION='ansible>=2.6,<2.7'
- PLATFORM='docker-ubuntu-bionic-php72' ANSIBLE_VERSION='ansible>=2.6,<2.7'
- PLATFORM='docker-ubuntu-bionic-php72' ANSIBLE_VERSION='ansible>=2.6,<2.7'
@@ -10,6 +11,7 @@ env:
- PLATFORM='docker-debian-stretch-php71' ANSIBLE_VERSION='ansible>=2.7,<2.8'
- PLATFORM='docker-debian-stretch-php72' ANSIBLE_VERSION='ansible>=2.7,<2.8'
- PLATFORM='docker-debian-stretch-php73' ANSIBLE_VERSION='ansible>=2.7,<2.8'
- PLATFORM='docker-debian-buster-php73' ANSIBLE_VERSION='ansible>=2.7,<2.8'
- PLATFORM='docker-ubuntu-xenial-php70' ANSIBLE_VERSION='ansible>=2.7,<2.8'
- PLATFORM='docker-ubuntu-bionic-php72' ANSIBLE_VERSION='ansible>=2.7,<2.8'
- PLATFORM='docker-ubuntu-bionic-php72' ANSIBLE_VERSION='ansible>=2.7,<2.8'
@@ -19,6 +21,7 @@ sudo: required
dist: trusty
language: python
python: 2.7
services:
- docker

View File

@@ -11,6 +11,7 @@ Managed OS / Versions
| OS | PHP 7.0 | PHP 7.1 | PHP 7.2 | PHP 7.3 |
|:---------------------:|:-------------------:|:--------------------------:|:--------------------------:|:-------------------------:|
| Debian Stretch (9) | :heavy_check_mark: | :heavy_check_mark: (Sury) | :heavy_check_mark: (Sury) | :heavy_check_mark: (Sury) |
| Debian Buster (10) | :x: | :x: | :x: | :heavy_check_mark: |
| Ubuntu Xenial (16.04) | :heavy_check_mark: | :x: | :x: | :x: |
| Ubuntu Bionic (18.04) | :x: | :x: | :heavy_check_mark: | :x: |
| FreeBSD 11 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |

2
Vagrantfile vendored
View File

@@ -10,6 +10,7 @@ Vagrant.configure("2") do |config|
{ :name => "debian-stretch-php71", :box => "debian/stretch64", :vars => { "php_version": '7.1' }},
{ :name => "debian-stretch-php72", :box => "debian/stretch64", :vars => { "php_version": '7.2' }},
{ :name => "debian-stretch-php73", :box => "debian/stretch64", :vars => { "php_version": '7.3' }},
{ :name => "debian-buster-php73", :box => "debian/buster64", :vars => { }},
{ :name => "ubuntu-xenial-php70", :box => "ubuntu/xenial64", :vars => { }},
{ :name => "ubuntu-bionic-php72", :box => "ubuntu/bionic64", :vars => { }},
]
@@ -24,6 +25,7 @@ Vagrant.configure("2") do |config|
{ :name => "docker-debian-stretch-php71", :docker => "hanxhx/vagrant-ansible:debian9", :vars => { "php_version": '7.1' }},
{ :name => "docker-debian-stretch-php72", :docker => "hanxhx/vagrant-ansible:debian9", :vars => { "php_version": '7.2' }},
{ :name => "docker-debian-stretch-php73", :docker => "hanxhx/vagrant-ansible:debian9", :vars => { "php_version": '7.3' }},
{ :name => "docker-debian-buster-php73", :docker => "hanxhx/vagrant-ansible:debian10", :vars => { }},
{ :name => "docker-ubuntu-xenial-php70", :docker => "hanxhx/vagrant-ansible:ubuntu16.04", :vars => { }},
{ :name => "docker-ubuntu-bionic-php72", :docker => "hanxhx/vagrant-ansible:ubuntu18.04", :vars => { }},
]

View File

@@ -9,6 +9,7 @@ galaxy_info:
- name: Debian
versions:
- stretch
- buster
- name: Ubuntu
versions:
- xenial

View File

@@ -27,3 +27,10 @@
dest: '{{ php_fpm_pool_dir }}/{{ item.pool_name }}.conf'
loop: "{{ php_fpm_poold }}"
notify: restart php-fpm
- name: FILE | Delete default pool if necessary
file:
path: "{{ php_fpm_pool_dir }}/www.conf"
state: absent
when: '"www" not in (php_fpm_poold | map(attribute="pool_name") | list)'
notify: restart php-fpm

View File

@@ -1,5 +1,10 @@
---
- name: SET_FACT | Bypass https://github.com/ansible/ansible/issues/19874
set_fact:
ansible_distribution_release: 'buster'
when: ansible_facts.distribution_major_version == "buster/sid"
- name: INCLUDE_VARS | Related to OS family
include_vars: "OS_Family_{{ ansible_os_family }}.yml"
@@ -27,8 +32,8 @@
notify: restart php-fpm
when: ansible_os_family == 'FreeBSD'
- name: INCLUDE | PHP-FPM
include: fpm.yml
- name: IMPORT_TASKS | PHP-FPM
import_tasks: fpm.yml
- name: LINEINFILE | PHP CLI configuration
lineinfile:
@@ -37,11 +42,11 @@
line: '{{ item.key }} = {{ item.value }}'
loop: "{{ php_ini | combine(php_ini_cli) | dict2items }}"
- name: INCLUDE | Xdebug
include: xdebug.yml
- name: IMPORT_TASKS | Xdebug
import_tasks: xdebug.yml
- name: APT | Install and configure opcache
include: opcache.yml
import_tasks: opcache.yml
- name: SERVICE | Ensure PHP-FPM is started
service:

View File

@@ -4,6 +4,6 @@
apt_key:
url: 'https://packages.sury.org/php/apt.gpg'
- name: APT | Add Sury repository
- name: APT_REPOSITORY | Add Sury repository
apt_repository:
repo: 'deb https://packages.sury.org/php/ {{ ansible_distribution_release }} main'

View File

@@ -17,8 +17,8 @@
- lsb-release
- nginx
- name: INCLUDE | Sury
include: Debian/sury.yml
when: >
ansible_distribution_major_version is version(9, 'eq') and
php_version is version('7.1', 'ge')
- name: INCLUDE_TASKS | Sury
include_tasks: Debian/sury.yml
when:
(ansible_distribution_major_version is version('9', 'eq')) and
(php_version is version('7.1', 'ge'))

View File

@@ -11,7 +11,7 @@
php_ini_cli:
error_reporting: 'E_ALL'
php_fpm_poold:
- pool_name: 'www'
- pool_name: 'test_ansible'
listen: '{{ php_default_fpm_sock }}'
pm: 'dynamic'
pm_max_children: 250
@@ -24,8 +24,8 @@
pre_tasks:
- name: INCLUDE | Pre tasks related to OS
include: "includes/pre_{{ ansible_os_family }}.yml"
- name: INCLUDE_TASKS | Pre tasks related to OS
include_tasks: "includes/pre_{{ ansible_os_family }}.yml"
tasks:

1
vars/Debian-buster.yml Normal file
View File

@@ -0,0 +1 @@
php_default_version: '7.3'