mirror of
https://github.com/HanXHX/ansible-php.git
synced 2026-02-28 09:42:09 +07:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
75f09eaf59 | ||
|
|
5abe99568a | ||
|
|
8b2c92a047 | ||
|
|
0171ae8e20 | ||
|
|
95892782ea | ||
|
|
f5b9eb78b7 |
@@ -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
|
||||
|
||||
@@ -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
2
Vagrantfile
vendored
@@ -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 => { }},
|
||||
]
|
||||
|
||||
@@ -9,6 +9,7 @@ galaxy_info:
|
||||
- name: Debian
|
||||
versions:
|
||||
- stretch
|
||||
- buster
|
||||
- name: Ubuntu
|
||||
versions:
|
||||
- xenial
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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'))
|
||||
|
||||
@@ -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
1
vars/Debian-buster.yml
Normal file
@@ -0,0 +1 @@
|
||||
php_default_version: '7.3'
|
||||
Reference in New Issue
Block a user