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-php71' ANSIBLE_VERSION='ansible>=2.6,<2.7'
|
||||||
- PLATFORM='docker-debian-stretch-php72' 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-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-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'
|
||||||
- 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-php71' ANSIBLE_VERSION='ansible>=2.7,<2.8'
|
||||||
- PLATFORM='docker-debian-stretch-php72' 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-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-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'
|
||||||
- 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
|
dist: trusty
|
||||||
|
|
||||||
language: python
|
language: python
|
||||||
|
python: 2.7
|
||||||
|
|
||||||
services:
|
services:
|
||||||
- docker
|
- docker
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ Managed OS / Versions
|
|||||||
| OS | PHP 7.0 | PHP 7.1 | PHP 7.2 | PHP 7.3 |
|
| 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 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 Xenial (16.04) | :heavy_check_mark: | :x: | :x: | :x: |
|
||||||
| Ubuntu Bionic (18.04) | :x: | :x: | :heavy_check_mark: | :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: |
|
| 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-php71", :box => "debian/stretch64", :vars => { "php_version": '7.1' }},
|
||||||
{ :name => "debian-stretch-php72", :box => "debian/stretch64", :vars => { "php_version": '7.2' }},
|
{ :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-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-xenial-php70", :box => "ubuntu/xenial64", :vars => { }},
|
||||||
{ :name => "ubuntu-bionic-php72", :box => "ubuntu/bionic64", :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-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-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-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-xenial-php70", :docker => "hanxhx/vagrant-ansible:ubuntu16.04", :vars => { }},
|
||||||
{ :name => "docker-ubuntu-bionic-php72", :docker => "hanxhx/vagrant-ansible:ubuntu18.04", :vars => { }},
|
{ :name => "docker-ubuntu-bionic-php72", :docker => "hanxhx/vagrant-ansible:ubuntu18.04", :vars => { }},
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ galaxy_info:
|
|||||||
- name: Debian
|
- name: Debian
|
||||||
versions:
|
versions:
|
||||||
- stretch
|
- stretch
|
||||||
|
- buster
|
||||||
- name: Ubuntu
|
- name: Ubuntu
|
||||||
versions:
|
versions:
|
||||||
- xenial
|
- xenial
|
||||||
|
|||||||
@@ -27,3 +27,10 @@
|
|||||||
dest: '{{ php_fpm_pool_dir }}/{{ item.pool_name }}.conf'
|
dest: '{{ php_fpm_pool_dir }}/{{ item.pool_name }}.conf'
|
||||||
loop: "{{ php_fpm_poold }}"
|
loop: "{{ php_fpm_poold }}"
|
||||||
notify: restart php-fpm
|
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
|
- name: INCLUDE_VARS | Related to OS family
|
||||||
include_vars: "OS_Family_{{ ansible_os_family }}.yml"
|
include_vars: "OS_Family_{{ ansible_os_family }}.yml"
|
||||||
|
|
||||||
@@ -27,8 +32,8 @@
|
|||||||
notify: restart php-fpm
|
notify: restart php-fpm
|
||||||
when: ansible_os_family == 'FreeBSD'
|
when: ansible_os_family == 'FreeBSD'
|
||||||
|
|
||||||
- name: INCLUDE | PHP-FPM
|
- name: IMPORT_TASKS | PHP-FPM
|
||||||
include: fpm.yml
|
import_tasks: fpm.yml
|
||||||
|
|
||||||
- name: LINEINFILE | PHP CLI configuration
|
- name: LINEINFILE | PHP CLI configuration
|
||||||
lineinfile:
|
lineinfile:
|
||||||
@@ -37,11 +42,11 @@
|
|||||||
line: '{{ item.key }} = {{ item.value }}'
|
line: '{{ item.key }} = {{ item.value }}'
|
||||||
loop: "{{ php_ini | combine(php_ini_cli) | dict2items }}"
|
loop: "{{ php_ini | combine(php_ini_cli) | dict2items }}"
|
||||||
|
|
||||||
- name: INCLUDE | Xdebug
|
- name: IMPORT_TASKS | Xdebug
|
||||||
include: xdebug.yml
|
import_tasks: xdebug.yml
|
||||||
|
|
||||||
- name: APT | Install and configure opcache
|
- name: APT | Install and configure opcache
|
||||||
include: opcache.yml
|
import_tasks: opcache.yml
|
||||||
|
|
||||||
- name: SERVICE | Ensure PHP-FPM is started
|
- name: SERVICE | Ensure PHP-FPM is started
|
||||||
service:
|
service:
|
||||||
|
|||||||
@@ -4,6 +4,6 @@
|
|||||||
apt_key:
|
apt_key:
|
||||||
url: 'https://packages.sury.org/php/apt.gpg'
|
url: 'https://packages.sury.org/php/apt.gpg'
|
||||||
|
|
||||||
- name: APT | Add Sury repository
|
- name: APT_REPOSITORY | Add Sury repository
|
||||||
apt_repository:
|
apt_repository:
|
||||||
repo: 'deb https://packages.sury.org/php/ {{ ansible_distribution_release }} main'
|
repo: 'deb https://packages.sury.org/php/ {{ ansible_distribution_release }} main'
|
||||||
|
|||||||
@@ -17,8 +17,8 @@
|
|||||||
- lsb-release
|
- lsb-release
|
||||||
- nginx
|
- nginx
|
||||||
|
|
||||||
- name: INCLUDE | Sury
|
- name: INCLUDE_TASKS | Sury
|
||||||
include: Debian/sury.yml
|
include_tasks: Debian/sury.yml
|
||||||
when: >
|
when:
|
||||||
ansible_distribution_major_version is version(9, 'eq') and
|
(ansible_distribution_major_version is version('9', 'eq')) and
|
||||||
php_version is version('7.1', 'ge')
|
(php_version is version('7.1', 'ge'))
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
php_ini_cli:
|
php_ini_cli:
|
||||||
error_reporting: 'E_ALL'
|
error_reporting: 'E_ALL'
|
||||||
php_fpm_poold:
|
php_fpm_poold:
|
||||||
- pool_name: 'www'
|
- pool_name: 'test_ansible'
|
||||||
listen: '{{ php_default_fpm_sock }}'
|
listen: '{{ php_default_fpm_sock }}'
|
||||||
pm: 'dynamic'
|
pm: 'dynamic'
|
||||||
pm_max_children: 250
|
pm_max_children: 250
|
||||||
@@ -24,8 +24,8 @@
|
|||||||
|
|
||||||
pre_tasks:
|
pre_tasks:
|
||||||
|
|
||||||
- name: INCLUDE | Pre tasks related to OS
|
- name: INCLUDE_TASKS | Pre tasks related to OS
|
||||||
include: "includes/pre_{{ ansible_os_family }}.yml"
|
include_tasks: "includes/pre_{{ ansible_os_family }}.yml"
|
||||||
|
|
||||||
tasks:
|
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