mirror of
https://github.com/HanXHX/ansible-php.git
synced 2026-02-28 09:42:09 +07:00
Compare commits
25 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4feb3be7d5 | ||
|
|
c0922f8430 | ||
|
|
ade8aaad9e | ||
|
|
a19adf5150 | ||
|
|
9738ae9614 | ||
|
|
73fa4dc212 | ||
|
|
75f09eaf59 | ||
|
|
5abe99568a | ||
|
|
8b2c92a047 | ||
|
|
0171ae8e20 | ||
|
|
95892782ea | ||
|
|
f5b9eb78b7 | ||
|
|
5ef6d09ac6 | ||
|
|
e45df940cd | ||
|
|
6c3aa5443a | ||
|
|
847941ebc6 | ||
|
|
feff5576d2 | ||
|
|
04547b496f | ||
|
|
9f048ae918 | ||
|
|
6a85f02fc1 | ||
|
|
4611a5a795 | ||
|
|
9e59ba5b47 | ||
|
|
9aa0f76c03 | ||
|
|
e87d158424 | ||
|
|
5878040e84 |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,3 +1,6 @@
|
|||||||
.vagrant*
|
.vagrant*
|
||||||
*.swp
|
*.swp
|
||||||
*.retry
|
*.retry
|
||||||
|
*.log
|
||||||
|
/filter_plugins/*.pyc
|
||||||
|
/filter_plugins/__pycache__
|
||||||
|
|||||||
33
.travis.yml
33
.travis.yml
@@ -1,30 +1,23 @@
|
|||||||
env:
|
env:
|
||||||
- PLATFORM='docker-debian-jessie-php56' ANSIBLE_VERSION='ansible>=2.0,<2.1'
|
- PLATFORM='docker-debian-stretch-php70' ANSIBLE_VERSION='ansible>=2.6,<2.7'
|
||||||
- PLATFORM='docker-debian-jessie-php70' ANSIBLE_VERSION='ansible>=2.0,<2.1'
|
- PLATFORM='docker-debian-buster-php73' ANSIBLE_VERSION='ansible>=2.6,<2.7'
|
||||||
- PLATFORM='docker-debian-jessie-php71' ANSIBLE_VERSION='ansible>=2.0,<2.1'
|
- PLATFORM='docker-ubuntu-xenial-php70' ANSIBLE_VERSION='ansible>=2.6,<2.7'
|
||||||
- PLATFORM='docker-debian-stretch-php70' ANSIBLE_VERSION='ansible>=2.0,<2.1'
|
- PLATFORM='docker-ubuntu-bionic-php72' ANSIBLE_VERSION='ansible>=2.6,<2.7'
|
||||||
- PLATFORM='docker-debian-stretch-php71' ANSIBLE_VERSION='ansible>=2.0,<2.1'
|
- PLATFORM='docker-ubuntu-bionic-php72' ANSIBLE_VERSION='ansible>=2.6,<2.7'
|
||||||
- PLATFORM='docker-debian-jessie-php56' ANSIBLE_VERSION='ansible>=2.1,<2.2'
|
- PLATFORM='docker-debian-stretch-php70' ANSIBLE_VERSION='ansible>=2.7,<2.8'
|
||||||
- PLATFORM='docker-debian-jessie-php70' ANSIBLE_VERSION='ansible>=2.1,<2.2'
|
- PLATFORM='docker-debian-stretch-php74' ANSIBLE_VERSION='ansible>=2.7,<2.8'
|
||||||
- PLATFORM='docker-debian-jessie-php71' ANSIBLE_VERSION='ansible>=2.1,<2.2'
|
- PLATFORM='docker-debian-buster-php73' ANSIBLE_VERSION='ansible>=2.7,<2.8'
|
||||||
- PLATFORM='docker-debian-stretch-php70' ANSIBLE_VERSION='ansible>=2.1,<2.2'
|
- PLATFORM='docker-debian-buster-php74' ANSIBLE_VERSION='ansible>=2.7,<2.8'
|
||||||
- PLATFORM='docker-debian-stretch-php71' ANSIBLE_VERSION='ansible>=2.1,<2.2'
|
- PLATFORM='docker-ubuntu-xenial-php70' ANSIBLE_VERSION='ansible>=2.7,<2.8'
|
||||||
- PLATFORM='docker-debian-jessie-php56' ANSIBLE_VERSION='ansible>=2.2,<2.3'
|
- PLATFORM='docker-ubuntu-bionic-php72' ANSIBLE_VERSION='ansible>=2.7,<2.8'
|
||||||
- PLATFORM='docker-debian-jessie-php70' ANSIBLE_VERSION='ansible>=2.2,<2.3'
|
- PLATFORM='docker-ubuntu-bionic-php72' ANSIBLE_VERSION='ansible>=2.7,<2.8'
|
||||||
- PLATFORM='docker-debian-jessie-php71' ANSIBLE_VERSION='ansible>=2.2,<2.3'
|
|
||||||
- PLATFORM='docker-debian-stretch-php70' ANSIBLE_VERSION='ansible>=2.2,<2.3'
|
|
||||||
- PLATFORM='docker-debian-stretch-php71' ANSIBLE_VERSION='ansible>=2.2,<2.3'
|
|
||||||
- PLATFORM='docker-debian-jessie-php56' ANSIBLE_VERSION='ansible>=2.3,<2.4'
|
|
||||||
- PLATFORM='docker-debian-jessie-php70' ANSIBLE_VERSION='ansible>=2.3,<2.4'
|
|
||||||
- PLATFORM='docker-debian-jessie-php71' ANSIBLE_VERSION='ansible>=2.3,<2.4'
|
|
||||||
- PLATFORM='docker-debian-stretch-php70' ANSIBLE_VERSION='ansible>=2.3,<2.4'
|
|
||||||
- PLATFORM='docker-debian-stretch-php71' ANSIBLE_VERSION='ansible>=2.3,<2.4'
|
|
||||||
|
|
||||||
sudo: required
|
sudo: required
|
||||||
|
|
||||||
dist: trusty
|
dist: trusty
|
||||||
|
|
||||||
language: python
|
language: python
|
||||||
|
python: 2.7
|
||||||
|
|
||||||
services:
|
services:
|
||||||
- docker
|
- docker
|
||||||
|
|||||||
40
README.md
40
README.md
@@ -1,20 +1,23 @@
|
|||||||
Ansible PHP (+FPM) role for Debian
|
Ansible PHP (+FPM) role for Debian / Ubuntu / FreeBSD
|
||||||
==================================
|
=====================================================
|
||||||
|
|
||||||
[](https://galaxy.ansible.com/HanXHX/php) [](https://travis-ci.org/HanXHX/ansible-php)
|
[](https://galaxy.ansible.com/HanXHX/php) [](https://travis-ci.org/HanXHX/ansible-php)
|
||||||
|
|
||||||
Install PHP (php-fpm optional) on Debian. Manage APCu, Opcache, Xdebug.
|
Install PHP on Debian / Ubuntu / FreeBSD. Manage PHP-FPM, APCu, Opcache and Xdebug.
|
||||||
|
|
||||||
Managed OS / Versions
|
Managed OS / Versions
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
| OS | PHP 5.6 | PHP 7.0 | PHP 7.1 | PHP 7.2 |
|
| OS | PHP 7.0 | PHP 7.1 | PHP 7.2 | PHP 7.3 | PHP 7.4 |
|
||||||
|:-------------:|:---------:|:-------------------------:|:---------------------:|:------------:|
|
|:---------------------:|:-------------------:|:--------------------------:|:--------------------------:|:-------------------------:|:--------------------------:
|
||||||
| Debian Jessie | Yes | Yes (from Dotdeb or Sury) | Yes (Dotdeb or Sury) | Yes (Sury) |
|
| Debian Stretch (9) | :heavy_check_mark: | :heavy_check_mark: (Sury) | :heavy_check_mark: (Sury) | :heavy_check_mark: (Sury) | :heavy_check_mark: (Sury) |
|
||||||
| Debian Strech | No | Yes | Yes (Sury) | Yes (Sury) |
|
| Debian Buster (10) | :x: | :x: | :x: | :heavy_check_mark: | :heavy_check_mark: (Sury) |
|
||||||
|
| Ubuntu Xenial (16.04) | :heavy_check_mark: | :x: | :x: | :x: | :x: |
|
||||||
|
| Ubuntu Bionic (18.04) | :x: | :x: | :heavy_check_mark: | :x: | :x: |
|
||||||
|
| FreeBSD 11 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | Need tests... |
|
||||||
|
| FreeBSD 12 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | Need tests... |
|
||||||
|
|
||||||
Links:
|
Links:
|
||||||
- [Dotdeb](https://www.dotdeb.org)
|
|
||||||
- [Sury](https://deb.sury.org/)
|
- [Sury](https://deb.sury.org/)
|
||||||
|
|
||||||
Requirements
|
Requirements
|
||||||
@@ -22,6 +25,13 @@ Requirements
|
|||||||
|
|
||||||
If you need PHP-FPM, you must install a webserver with FastCGI support. You can use my [nginx role](https://github.com/HanXHX/ansible-nginx).
|
If you need PHP-FPM, you must install a webserver with FastCGI support. You can use my [nginx role](https://github.com/HanXHX/ansible-nginx).
|
||||||
|
|
||||||
|
FreeBSD limitations
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
- It doesn't split ini file for FPM/CLI. It's hardcoded as `/usr/local/etc/php.ini`.
|
||||||
|
- It can't manage multiple PHP versions at the time (like legacy Debian versions)
|
||||||
|
- You must explicitely set xdebug package name (use `pkg search xdebug` to find the good one)
|
||||||
|
|
||||||
Role Variables
|
Role Variables
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
@@ -29,7 +39,7 @@ You should look at [default vars](defaults/main.yml).
|
|||||||
|
|
||||||
### Writable vars
|
### Writable vars
|
||||||
|
|
||||||
- `php_version`: 5.6 (default), 7.0, 7.1
|
- `php_version`: 7.3, 7.4... depending OS (see above)
|
||||||
- `php_install_fpm`: boolean, install and manage php-fpm (default is true)
|
- `php_install_fpm`: boolean, install and manage php-fpm (default is true)
|
||||||
- `php_install_xdebug`: boolean, install [Xdebug](http://xdebug.org)
|
- `php_install_xdebug`: boolean, install [Xdebug](http://xdebug.org)
|
||||||
- `php_extra_packages`: additional php packages to install (default is an empty list).
|
- `php_extra_packages`: additional php packages to install (default is an empty list).
|
||||||
@@ -46,7 +56,6 @@ Note:
|
|||||||
- Put specific configuration in `php_ini_fpm`/`php_ini_cli`.
|
- Put specific configuration in `php_ini_fpm`/`php_ini_cli`.
|
||||||
- You can override with `php_ini_fpm`/`php_ini_cli`, but it breaks idempotence.
|
- You can override with `php_ini_fpm`/`php_ini_cli`, but it breaks idempotence.
|
||||||
|
|
||||||
|
|
||||||
#### OpCache settings
|
#### OpCache settings
|
||||||
|
|
||||||
See [Opcache doc](https://secure.php.net/manual/en/opcache.configuration.php)
|
See [Opcache doc](https://secure.php.net/manual/en/opcache.configuration.php)
|
||||||
@@ -151,12 +160,12 @@ Example Playbook
|
|||||||
roles:
|
roles:
|
||||||
- { role: HanXHX.php }
|
- { role: HanXHX.php }
|
||||||
|
|
||||||
### Debian Jessie with PHP 7.0 CLI (no FPM)
|
### Debian Stretch with PHP 7.2 CLI (no FPM)
|
||||||
|
|
||||||
- hosts: jessie-servers
|
- hosts: servers
|
||||||
roles:
|
roles:
|
||||||
- { role: HanXHX.dotdeb }
|
- { role: HanXHX.sury }
|
||||||
- { role: HanXHX.php, php_version: '7.0', php_install_fpm: false }
|
- { role: HanXHX.php, php_version: '7.2', php_install_fpm: false }
|
||||||
|
|
||||||
License
|
License
|
||||||
-------
|
-------
|
||||||
@@ -169,7 +178,7 @@ Donation
|
|||||||
If this code helped you, or if you’ve used them for your projects, feel free to buy me some :beers:
|
If this code helped you, or if you’ve used them for your projects, feel free to buy me some :beers:
|
||||||
|
|
||||||
- Bitcoin: `1BQwhBeszzWbUTyK4aUyq3SRg7rBSHcEQn`
|
- Bitcoin: `1BQwhBeszzWbUTyK4aUyq3SRg7rBSHcEQn`
|
||||||
- Ethereum: `63abe6b2648fd892816d87a31e3d9d4365a737b5`
|
- Ethereum: `0x63abe6b2648fd892816d87a31e3d9d4365a737b5`
|
||||||
- Litecoin: `LeNDw34zQLX84VvhCGADNvHMEgb5QyFXyD`
|
- Litecoin: `LeNDw34zQLX84VvhCGADNvHMEgb5QyFXyD`
|
||||||
- Monero: `45wbf7VdQAZS5EWUrPhen7Wo4hy7Pa7c7ZBdaWQSRowtd3CZ5vpVw5nTPphTuqVQrnYZC72FXDYyfP31uJmfSQ6qRXFy3bQ`
|
- Monero: `45wbf7VdQAZS5EWUrPhen7Wo4hy7Pa7c7ZBdaWQSRowtd3CZ5vpVw5nTPphTuqVQrnYZC72FXDYyfP31uJmfSQ6qRXFy3bQ`
|
||||||
|
|
||||||
@@ -179,4 +188,3 @@ Author Information
|
|||||||
------------------
|
------------------
|
||||||
|
|
||||||
- Twitter: [@hanxhx_](https://twitter.com/hanxhx_)
|
- Twitter: [@hanxhx_](https://twitter.com/hanxhx_)
|
||||||
- All issues, pull-requests are welcome :)
|
|
||||||
|
|||||||
52
Vagrantfile
vendored
52
Vagrantfile
vendored
@@ -6,19 +6,32 @@
|
|||||||
Vagrant.configure("2") do |config|
|
Vagrant.configure("2") do |config|
|
||||||
|
|
||||||
vms_debian = [
|
vms_debian = [
|
||||||
{ :name => "debian-jessie-php56", :box => "debian/jessie64", :vars => { }},
|
|
||||||
{ :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-stretch-php70", :box => "debian/stretch64", :vars => { }},
|
{ :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' }},
|
||||||
|
{ :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-php74", :box => "debian/stretch64", :vars => { "php_version": '7.4' }},
|
||||||
|
{ :name => "debian-buster-php73", :box => "debian/buster64", :vars => { }},
|
||||||
|
{ :name => "debian-buster-php74", :box => "debian/buster64", :vars => { "php_version": '7.4' }},
|
||||||
|
{ :name => "ubuntu-xenial-php70", :box => "ubuntu/xenial64", :vars => { }},
|
||||||
|
{ :name => "ubuntu-bionic-php72", :box => "ubuntu/bionic64", :vars => { }},
|
||||||
|
]
|
||||||
|
|
||||||
|
vms_freebsd = [
|
||||||
|
{ :name => "freebsd-11", :box => "freebsd/FreeBSD-11.1-STABLE", :vars => {} },
|
||||||
|
{ :name => "freebsd-12", :box => "freebsd/FreeBSD-12.0-CURRENT", :vars => {} }
|
||||||
]
|
]
|
||||||
|
|
||||||
conts = [
|
conts = [
|
||||||
{ :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-php71", :docker => "hanxhx/vagrant-ansible:debian8", :vars => { "php_version": '7.1' }},
|
|
||||||
{ :name => "docker-debian-stretch-php70", :docker => "hanxhx/vagrant-ansible:debian9", :vars => { }},
|
{ :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' }},
|
||||||
|
{ :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-php74", :docker => "hanxhx/vagrant-ansible:debian9", :vars => { "php_version": '7.4' }},
|
||||||
|
{ :name => "docker-debian-buster-php73", :docker => "hanxhx/vagrant-ansible:debian10", :vars => { }},
|
||||||
|
{ :name => "docker-debian-buster-php74", :docker => "hanxhx/vagrant-ansible:debian10", :vars => { "php_version": '7.4' }},
|
||||||
|
{ :name => "docker-ubuntu-xenial-php70", :docker => "hanxhx/vagrant-ansible:ubuntu16.04", :vars => { }},
|
||||||
|
{ :name => "docker-ubuntu-bionic-php72", :docker => "hanxhx/vagrant-ansible:ubuntu18.04", :vars => { }},
|
||||||
]
|
]
|
||||||
|
|
||||||
config.vm.network "private_network", type: "dhcp"
|
config.vm.network "private_network", type: "dhcp"
|
||||||
@@ -30,6 +43,7 @@ Vagrant.configure("2") do |config|
|
|||||||
d.remains_running = true
|
d.remains_running = true
|
||||||
d.has_ssh = true
|
d.has_ssh = true
|
||||||
end
|
end
|
||||||
|
m.vm.provision "shell", inline: "apt-get update && apt-get install -y python python-apt"
|
||||||
m.vm.provision "ansible" do |ansible|
|
m.vm.provision "ansible" do |ansible|
|
||||||
ansible.playbook = "tests/test.yml"
|
ansible.playbook = "tests/test.yml"
|
||||||
ansible.verbose = 'vv'
|
ansible.verbose = 'vv'
|
||||||
@@ -46,6 +60,7 @@ Vagrant.configure("2") do |config|
|
|||||||
v.cpus = 1
|
v.cpus = 1
|
||||||
v.memory = 256
|
v.memory = 256
|
||||||
end
|
end
|
||||||
|
m.vm.provision "shell", inline: "apt-get update && apt-get install -y ifupdown python"
|
||||||
m.vm.provision "ansible" do |ansible|
|
m.vm.provision "ansible" do |ansible|
|
||||||
ansible.playbook = "tests/test.yml"
|
ansible.playbook = "tests/test.yml"
|
||||||
ansible.verbose = 'vv'
|
ansible.verbose = 'vv'
|
||||||
@@ -54,4 +69,25 @@ Vagrant.configure("2") do |config|
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
vms_freebsd.each do |opts|
|
||||||
|
config.vm.synced_folder ".", "/vagrant", disabled: true
|
||||||
|
config.vm.base_mac = "080027D14C66"
|
||||||
|
config.vm.define opts[:name] do |m|
|
||||||
|
m.vm.box = opts[:box]
|
||||||
|
m.vm.provider "virtualbox" do |v, override|
|
||||||
|
override.ssh.shell = "csh"
|
||||||
|
v.cpus = 2
|
||||||
|
v.memory = 512
|
||||||
|
end
|
||||||
|
m.vm.provision "shell", inline: "pkg install -y python bash"
|
||||||
|
m.vm.provision "ansible" do |ansible|
|
||||||
|
ansible.playbook = "tests/test.yml"
|
||||||
|
ansible.verbose = 'vv'
|
||||||
|
ansible.become = true
|
||||||
|
ansible.extra_vars = opts[:vars].merge({ "ansible_python_interpreter": '/usr/local/bin/python' })
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ 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: []
|
||||||
|
php_xdebug_package: null
|
||||||
|
php_autoremove_default_pool: false
|
||||||
|
|
||||||
# php.ini config
|
# php.ini config
|
||||||
php_ini:
|
php_ini:
|
||||||
@@ -89,10 +91,10 @@ php_xdebug_var_display_max_depth: '3'
|
|||||||
|
|
||||||
# PHP-FPM
|
# PHP-FPM
|
||||||
php_fpm_poold:
|
php_fpm_poold:
|
||||||
- pool_name: 'www'
|
- name: 'www'
|
||||||
listen: '{{ php_default_fpm_sock }}'
|
listen: '{{ php_default_fpm_sock }}'
|
||||||
pm: 'dynamic'
|
pm: 'dynamic'
|
||||||
pm_max_children: 250
|
pm_max_children: 100
|
||||||
pm_start_servers: 10
|
pm_start_servers: 10
|
||||||
pm_min_spare_servers: 10
|
pm_min_spare_servers: 10
|
||||||
pm_max_spare_servers: 20
|
pm_max_spare_servers: 20
|
||||||
|
|||||||
10
filter_plugins/php.py
Normal file
10
filter_plugins/php.py
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
def php_socket(php_version, pool_name):
|
||||||
|
return '/run/php/php%s-%s-fpm.sock' % (php_version, pool_name)
|
||||||
|
|
||||||
|
class FilterModule(object):
|
||||||
|
''' PHP module '''
|
||||||
|
|
||||||
|
def filters(self):
|
||||||
|
return {
|
||||||
|
'php_socket': php_socket,
|
||||||
|
}
|
||||||
@@ -1,5 +1,14 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
- name: restart php-fpm
|
- name: restart php-fpm
|
||||||
service: name='{{ php_fpm_service }}' state=restarted
|
service:
|
||||||
|
name: '{{ php_fpm_service }}'
|
||||||
|
state: restarted
|
||||||
when: php_install_fpm
|
when: php_install_fpm
|
||||||
|
notify: docker restart php-fpm
|
||||||
|
|
||||||
|
- name: docker restart php-fpm
|
||||||
|
command: 'service {{ php_fpm_service }} restart'
|
||||||
|
args:
|
||||||
|
warn: false
|
||||||
|
when: ansible_virtualization_type == 'docker'
|
||||||
|
|||||||
@@ -1,21 +1,32 @@
|
|||||||
---
|
---
|
||||||
galaxy_info:
|
galaxy_info:
|
||||||
author: Emilien Mantel
|
author: Emilien Mantel
|
||||||
description: Install and configure PHP 5.6/7.0/7.1 (+ FPM is wanted)
|
description: Install and configure PHP 7.0/7.1/7.2/7.3
|
||||||
company:
|
company:
|
||||||
license: GPLv2
|
license: GPLv2
|
||||||
min_ansible_version: 2.0
|
min_ansible_version: 2.6
|
||||||
platforms:
|
platforms:
|
||||||
- name: Debian
|
- name: Debian
|
||||||
versions:
|
versions:
|
||||||
- jessie
|
- stretch
|
||||||
|
- buster
|
||||||
|
- name: Ubuntu
|
||||||
|
versions:
|
||||||
|
- xenial
|
||||||
|
- bionic
|
||||||
|
- name: FreeBSD
|
||||||
|
versions:
|
||||||
|
- 11.0
|
||||||
|
- 11.1
|
||||||
|
- 12.0
|
||||||
galaxy_tags:
|
galaxy_tags:
|
||||||
- development
|
- development
|
||||||
- web
|
- web
|
||||||
- php
|
- php
|
||||||
- php5.6
|
- php-fpm
|
||||||
- php5
|
|
||||||
- php7
|
- php7
|
||||||
- debian
|
- debian
|
||||||
|
- ubuntu
|
||||||
|
- freebsd
|
||||||
dependencies: []
|
dependencies: []
|
||||||
|
|
||||||
|
|||||||
@@ -1,19 +1,36 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
- name: APT | Install PHP-FPM
|
- name: APT | Install PHP-FPM for Debian based systems
|
||||||
apt: pkg={{ php_fpm_service }} state=present
|
apt:
|
||||||
|
pkg: "{{ php_fpm_service }}"
|
||||||
|
state: "{{ 'present' if php_install_fpm else 'absent' }}"
|
||||||
|
when: ansible_os_family == 'Debian'
|
||||||
|
|
||||||
|
- name: SERVICE | Enable service on FreeBSD
|
||||||
|
service:
|
||||||
|
name: "{{ php_fpm_service }}"
|
||||||
|
enabled: "{{ 'yes' if php_install_fpm else 'no' }}"
|
||||||
|
when: ansible_os_family == 'FreeBSD'
|
||||||
|
|
||||||
- name: LINEINFILE | PHP configuration
|
- name: LINEINFILE | PHP configuration
|
||||||
lineinfile:
|
lineinfile:
|
||||||
dest: '{{ php_etc_dir }}/fpm/php.ini'
|
dest: '{{ php_cli_ini }}'
|
||||||
regexp: '^;?{{ item.key }}'
|
regexp: '^;?{{ item.key }}'
|
||||||
line: '{{ item.key }} = {{ item.value }}'
|
line: '{{ item.key }} = {{ item.value }}'
|
||||||
with_dict: "{{ php_ini | combine(php_ini_fpm) }}"
|
create: yes
|
||||||
|
loop: "{{ php_ini | combine(php_ini_fpm) | dict2items }}"
|
||||||
notify: restart php-fpm
|
notify: restart php-fpm
|
||||||
|
|
||||||
- name: TEMPLATE | Deploy pool configuration
|
- name: TEMPLATE | Deploy pool configuration
|
||||||
template: >
|
template:
|
||||||
src=etc/__php__/fpm/pool.d/pool.conf.j2
|
src: etc/__php__/fpm/pool.d/pool.conf.j2
|
||||||
dest='{{ php_etc_dir }}/fpm/pool.d/{{ item.pool_name }}.conf'
|
dest: '{{ php_fpm_pool_dir }}/{{ item.name }}.conf'
|
||||||
with_items: "{{ php_fpm_poold }}"
|
loop: "{{ ansible_local.hanxhx_php.fpm_pool }}"
|
||||||
|
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 (ansible_local.hanxhx_php.fpm_pool | map(attribute="name") | list) and php_autoremove_default_pool'
|
||||||
notify: restart php-fpm
|
notify: restart php-fpm
|
||||||
|
|||||||
118
tasks/main.yml
118
tasks/main.yml
@@ -1,39 +1,111 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
- name: INCLUDE_VARS | Related to OS
|
- name: INCLUDE_VARS | Related to OS family
|
||||||
include_vars: "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yml"
|
include_vars: "OS_Family_{{ ansible_os_family }}.yml"
|
||||||
|
|
||||||
- name: ASSERT | Check variables
|
- name: INCLUDE_VARS | Related to OS version
|
||||||
assert:
|
include_vars: "{{ item }}"
|
||||||
that: "php_version in php_managed_versions"
|
with_first_found:
|
||||||
|
- "{{ ansible_distribution }}-{{ ansible_distribution_release }}.yml"
|
||||||
|
- "{{ ansible_distribution }}-{{ ansible_distribution_version }}.yml"
|
||||||
|
- "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yml"
|
||||||
|
|
||||||
- name: INCLUDE_VARS | Related to PHP version
|
- name: SET_FACT | Transform data
|
||||||
include_vars: "php-{{ php_version }}.yml"
|
set_fact:
|
||||||
|
__php_fpm_full_pool: |
|
||||||
|
[
|
||||||
|
{% for p in php_fpm_poold %}
|
||||||
|
{
|
||||||
|
name: "{{ p.name | default(p.pool_name) }}",
|
||||||
|
listen: "{{ p.listen | default(php_version | php_socket(p.name | default(p.pool_name))) }}",
|
||||||
|
user: "{{ p.user | default(php_default_user_group) }}",
|
||||||
|
group: "{% if p.user is defined %}{{ p.group | default(p.user) }}{% else %}{{ p.group | default(php_default_user_group) }}{% endif %}",
|
||||||
|
php_value: {% if p.php_value is defined %}{{ p.php_value | to_nice_json }}{% else %}{}{% endif %},
|
||||||
|
php_admin_value: {% if p.php_admin_value is defined %}{{ p.php_admin_value | to_nice_json }}{% else %}{}{% endif %},
|
||||||
|
{% for k, v in p.items() | list %}
|
||||||
|
{% if k not in ['name', 'pool_name', 'listen', 'user', 'group', 'php_value', 'php_admin_value'] %}
|
||||||
|
{{ k }}: "{{ v }}"{% if not loop.last %},{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
}{% if not loop.last %},{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
]
|
||||||
|
|
||||||
- name: APT | Update cache
|
- name: SET_FACT | To YAML
|
||||||
apt: update_cache=yes cache_valid_time=3600
|
set_fact:
|
||||||
changed_when: false
|
php_fpm_full_pool: "{{ __php_fpm_full_pool | from_yaml }}"
|
||||||
|
|
||||||
|
- name: FILE | Creates ansible facts.d
|
||||||
|
file:
|
||||||
|
path: /etc/ansible/facts.d
|
||||||
|
state: directory
|
||||||
|
recurse: yes
|
||||||
|
|
||||||
|
- name: COPY | Manage facts
|
||||||
|
copy:
|
||||||
|
content: "{ \"fpm_pool\": {{ php_fpm_full_pool | to_nice_json }} }"
|
||||||
|
dest: /etc/ansible/facts.d/hanxhx_php.fact
|
||||||
|
register: f
|
||||||
|
|
||||||
|
- name: SETUP | Gathers new facts
|
||||||
|
setup:
|
||||||
|
when: f.changed
|
||||||
|
tags:
|
||||||
|
- skip_ansible_lint
|
||||||
|
|
||||||
- name: APT | Install PHP packages
|
- name: APT | Install PHP packages
|
||||||
apt: pkg={{ item }} state=present
|
apt:
|
||||||
with_flattened:
|
pkg: "{{ pkgs }}"
|
||||||
- "{{ php_packages }}"
|
state: present
|
||||||
- "{{ php_extra_packages }}"
|
update_cache: yes
|
||||||
|
cache_valid_time: 3600
|
||||||
|
vars:
|
||||||
|
pkgs: "{{ php_packages + php_extra_packages | flatten }}"
|
||||||
notify: restart php-fpm
|
notify: restart php-fpm
|
||||||
|
when: ansible_os_family == 'Debian'
|
||||||
|
|
||||||
- name: INCLUDE | PHP-FPM
|
- name: PKGNG | Install PHP packages
|
||||||
include: fpm.yml
|
pkgng:
|
||||||
when: php_install_fpm
|
name: "{{ php_packages + php_extra_packages | flatten | join(',') }}"
|
||||||
|
notify: restart php-fpm
|
||||||
|
when: ansible_os_family == 'FreeBSD'
|
||||||
|
|
||||||
- name: LINEINFILE | PHP configuration
|
- name: IMPORT_TASKS | PHP-FPM
|
||||||
|
import_tasks: fpm.yml
|
||||||
|
|
||||||
|
- name: LINEINFILE | PHP CLI configuration
|
||||||
lineinfile:
|
lineinfile:
|
||||||
dest: '{{ php_etc_dir }}/cli/php.ini'
|
dest: '{{ php_cli_ini }}'
|
||||||
regexp: '^;?{{ item.key }}'
|
regexp: '^;?{{ item.key }}'
|
||||||
line: '{{ item.key }} = {{ item.value }}'
|
line: '{{ item.key }} = {{ item.value }}'
|
||||||
with_dict: "{{ php_ini_cli }}"
|
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
|
||||||
|
service:
|
||||||
|
name: '{{ php_fpm_service }}'
|
||||||
|
state: started
|
||||||
|
when: php_install_fpm and ansible_virtualization_type != 'docker'
|
||||||
|
|
||||||
|
- block:
|
||||||
|
|
||||||
|
- name: COMMAND | Check if PHP-FPM is started (Docker)
|
||||||
|
command: 'service {{ php_fpm_service }} status'
|
||||||
|
args:
|
||||||
|
warn: false
|
||||||
|
register: dps
|
||||||
|
changed_when: false
|
||||||
|
failed_when: false
|
||||||
|
|
||||||
|
- name: COMMAND | Ensure PHP-FPM is started (Docker)
|
||||||
|
command: 'service {{ php_fpm_service }} start'
|
||||||
|
args:
|
||||||
|
warn: false
|
||||||
|
when: dps.stdout.find('is not running') != -1
|
||||||
|
|
||||||
|
when: php_install_fpm and ansible_virtualization_type == 'docker'
|
||||||
|
|||||||
@@ -1,20 +1,37 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
|
- block:
|
||||||
|
|
||||||
- name: APT | Install APCu
|
- name: APT | Install APCu
|
||||||
apt: pkg="{{ php_apt_prefix }}apcu" state=present
|
apt:
|
||||||
|
pkg: "php-apcu"
|
||||||
|
|
||||||
- name: APT | Install Opcache
|
- name: APT | Install Opcache
|
||||||
apt: pkg="{{ php_apt_prefix }}opcache" state=present
|
apt:
|
||||||
when: php_version | version_compare('7.0', 'ge')
|
pkg: "{{ php_package_prefix }}opcache"
|
||||||
|
|
||||||
- name: TEMPLATE | Configure APCu
|
when: ansible_os_family == 'Debian'
|
||||||
template: >
|
|
||||||
src=etc/__php__/mods-available/opcache.ini.j2
|
- block:
|
||||||
dest="{{ php_mods_dir }}/opcache.ini"
|
|
||||||
|
- name: PKGNG | Install APCu
|
||||||
|
pkgng:
|
||||||
|
name: "php{{ php_version | replace('.', '') }}-pecl-APCu"
|
||||||
|
|
||||||
|
- name: PKGNG | Install Opcache
|
||||||
|
pkgng:
|
||||||
|
name: "{{ php_package_prefix }}opcache"
|
||||||
|
|
||||||
|
when: ansible_os_family == 'FreeBSD'
|
||||||
|
|
||||||
|
- name: TEMPLATE | Configure Opcache
|
||||||
|
template:
|
||||||
|
src: "etc/__php__/mods-available/opcache.ini.j2"
|
||||||
|
dest: "{{ php_mods_dir }}/opcache.ini"
|
||||||
notify: restart php-fpm
|
notify: restart php-fpm
|
||||||
|
|
||||||
- name: TEMPLATE | Configure APCu
|
- name: TEMPLATE | Configure APCu
|
||||||
template: >
|
template:
|
||||||
src=etc/__php__/mods-available/apcu.ini.j2
|
src: "etc/__php__/mods-available/apcu.ini.j2"
|
||||||
dest={{ php_mods_dir }}/apcu.ini
|
dest: "{{ php_mods_dir }}/apcu.ini"
|
||||||
notify: restart php-fpm
|
notify: restart php-fpm
|
||||||
|
|||||||
@@ -2,17 +2,18 @@
|
|||||||
|
|
||||||
- block:
|
- block:
|
||||||
|
|
||||||
- name: APT | Install php-xdebug
|
- name: APT | Install xdebug
|
||||||
apt:
|
apt:
|
||||||
pkg: "{{ php_apt_prefix }}xdebug"
|
pkg: "{{ php_xdebug_package }}"
|
||||||
state: present
|
state: present
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
cache_valid_time: 3600
|
cache_valid_time: 3600
|
||||||
|
when: ansible_os_family == 'Debian'
|
||||||
|
|
||||||
- name: SHELL | Get Xdebug version
|
- name: PKGNG | Install xdebug
|
||||||
shell: dpkg -l | awk '$2 ~ /xdebug$/ { print $3 }'
|
pkgng:
|
||||||
changed_when: false
|
name: "{{ php_xdebug_package }}"
|
||||||
register: xdebug_version
|
when: ansible_os_family == 'FreeBSD' and php_xdebug_package is defined
|
||||||
|
|
||||||
- name: TEMPLATE | Deploy module configurations
|
- name: TEMPLATE | Deploy module configurations
|
||||||
template:
|
template:
|
||||||
@@ -26,13 +27,16 @@
|
|||||||
|
|
||||||
- block:
|
- block:
|
||||||
|
|
||||||
# We can't uninstall as simple way. We can uninstall with php7.0-xdebug (virtual package), but removing virtual package doesn't affect real package.
|
- name: APT | Uninstall xdebug
|
||||||
# On Jessie: php5-xdebug, php-xdebug (sury for PHP 5.6/7.0/7.1/7.2), php5-xdebug + php7.0-xdebug (dotdeb)
|
apt:
|
||||||
# On Stretch: php-xdebug
|
pkg: "{{ php_xdebug_package }}"
|
||||||
|
state: absent
|
||||||
|
when: ansible_os_family == 'Debian'
|
||||||
|
|
||||||
- name: COMMAND | Disable xdebug package
|
- name: PKGNG | Uninstall xdebug
|
||||||
command: phpdismod -v {{ php_version }} xdebug
|
pkgng:
|
||||||
args:
|
name: "{{ php_xdebug_package }}"
|
||||||
removes: "{{ php_etc_dir }}/cli/conf.d/20-xdebug.ini"
|
state: absent
|
||||||
|
when: ansible_os_family == 'FreeBSD'
|
||||||
|
|
||||||
when: not php_install_xdebug
|
when: not php_install_xdebug
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
; Start a new pool named '{{ item.pool_name }}'.
|
; Start a new pool named '{{ item.name }}'.
|
||||||
; the variable $pool can we used in any directive and will be replaced by the
|
; the variable $pool can we used in any directive and will be replaced by the
|
||||||
; pool name ('{{ item.pool_name }}' here)
|
; pool name ('{{ item.name }}' here)
|
||||||
[{{ item.pool_name }}]
|
[{{ item.name }}]
|
||||||
|
|
||||||
; Per pool prefix
|
; Per pool prefix
|
||||||
; It only applies on the following directives:
|
; It only applies on the following directives:
|
||||||
@@ -20,8 +20,8 @@
|
|||||||
; Unix user/group of processes
|
; Unix user/group of processes
|
||||||
; Note: The user is mandatory. If the group is not set, the default user's group
|
; Note: The user is mandatory. If the group is not set, the default user's group
|
||||||
; will be used.
|
; will be used.
|
||||||
user = {{ item.user | default('www-data') }}
|
user = {{ item.user }}
|
||||||
group = {{ item.group | default('www-data') }}
|
group = {{ item.group }}
|
||||||
|
|
||||||
; The address on which to accept FastCGI requests.
|
; The address on which to accept FastCGI requests.
|
||||||
; Valid syntaxes are:
|
; Valid syntaxes are:
|
||||||
@@ -46,8 +46,8 @@ listen = {{ item.listen }}
|
|||||||
; BSD-derived systems allow connections regardless of permissions.
|
; BSD-derived systems allow connections regardless of permissions.
|
||||||
; Default Values: user and group are set as the running user
|
; Default Values: user and group are set as the running user
|
||||||
; mode is set to 0660
|
; mode is set to 0660
|
||||||
listen.owner = {{ item.listen_owner | default('www-data') }}
|
listen.owner = {{ item.listen_owner | default(php_default_user_group) }}
|
||||||
listen.group = {{ item.listen_owner | default('www-data') }}
|
listen.group = {{ item.listen_owner | default(php_default_user_group) }}
|
||||||
;listen.mode = 0660
|
;listen.mode = 0660
|
||||||
; When POSIX Access Control Lists are supported you can set them using
|
; When POSIX Access Control Lists are supported you can set them using
|
||||||
; these options, value is a comma separated list of user/group names.
|
; these options, value is a comma separated list of user/group names.
|
||||||
@@ -95,7 +95,7 @@ listen.group = {{ item.listen_owner | default('www-data') }}
|
|||||||
; pm.process_idle_timeout - The number of seconds after which
|
; pm.process_idle_timeout - The number of seconds after which
|
||||||
; an idle process will be killed.
|
; an idle process will be killed.
|
||||||
; Note: This value is mandatory.
|
; Note: This value is mandatory.
|
||||||
pm = {{ item.pm }}
|
pm = {{ item.pm | default('dynamic') }}
|
||||||
|
|
||||||
; The number of child processes to be created when pm is set to 'static' and the
|
; The number of child processes to be created when pm is set to 'static' and the
|
||||||
; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'.
|
; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'.
|
||||||
@@ -106,27 +106,27 @@ pm = {{ item.pm }}
|
|||||||
; forget to tweak pm.* to fit your needs.
|
; forget to tweak pm.* to fit your needs.
|
||||||
; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand'
|
; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand'
|
||||||
; Note: This value is mandatory.
|
; Note: This value is mandatory.
|
||||||
pm.max_children = {{ item.pm_max_children }}
|
pm.max_children = {{ item.pm_max_children | default('250') }}
|
||||||
|
|
||||||
; The number of child processes created on startup.
|
; The number of child processes created on startup.
|
||||||
; Note: Used only when pm is set to 'dynamic'
|
; Note: Used only when pm is set to 'dynamic'
|
||||||
; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2
|
; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2
|
||||||
pm.start_servers = {{ item.pm_start_servers }}
|
pm.start_servers = {{ item.pm_start_servers | default('10') }}
|
||||||
|
|
||||||
; The desired minimum number of idle server processes.
|
; The desired minimum number of idle server processes.
|
||||||
; Note: Used only when pm is set to 'dynamic'
|
; Note: Used only when pm is set to 'dynamic'
|
||||||
; Note: Mandatory when pm is set to 'dynamic'
|
; Note: Mandatory when pm is set to 'dynamic'
|
||||||
pm.min_spare_servers = {{ item.pm_min_spare_servers }}
|
pm.min_spare_servers = {{ item.pm_min_spare_servers | default('10') }}
|
||||||
|
|
||||||
; The desired maximum number of idle server processes.
|
; The desired maximum number of idle server processes.
|
||||||
; Note: Used only when pm is set to 'dynamic'
|
; Note: Used only when pm is set to 'dynamic'
|
||||||
; Note: Mandatory when pm is set to 'dynamic'
|
; Note: Mandatory when pm is set to 'dynamic'
|
||||||
pm.max_spare_servers = {{ item.pm_max_spare_servers }}
|
pm.max_spare_servers = {{ item.pm_max_spare_servers | default('20') }}
|
||||||
|
|
||||||
; The number of seconds after which an idle process will be killed.
|
; The number of seconds after which an idle process will be killed.
|
||||||
; Note: Used only when pm is set to 'ondemand'
|
; Note: Used only when pm is set to 'ondemand'
|
||||||
; Default Value: 10s
|
; Default Value: 10s
|
||||||
;pm.process_idle_timeout = 10s;
|
pm.process_idle_timeout = {{ item.pm_process_idle_timeout | default('10s') }};
|
||||||
|
|
||||||
; The number of requests each child process should execute before respawning.
|
; The number of requests each child process should execute before respawning.
|
||||||
; This can be useful to work around memory leaks in 3rd party libraries. For
|
; This can be useful to work around memory leaks in 3rd party libraries. For
|
||||||
@@ -369,7 +369,7 @@ chdir = /
|
|||||||
; Note: on highloaded environement, this can cause some delay in the page
|
; Note: on highloaded environement, this can cause some delay in the page
|
||||||
; process time (several ms).
|
; process time (several ms).
|
||||||
; Default Value: no
|
; Default Value: no
|
||||||
;catch_workers_output = yes
|
catch_workers_output = {{ item.catch_workers_output | default('no') }}
|
||||||
|
|
||||||
; Clear environment in FPM workers
|
; Clear environment in FPM workers
|
||||||
; Prevents arbitrary environment variables from reaching FPM worker processes
|
; Prevents arbitrary environment variables from reaching FPM worker processes
|
||||||
@@ -421,5 +421,10 @@ chdir = /
|
|||||||
;php_admin_value[error_log] = /var/log/fpm-php.www.log
|
;php_admin_value[error_log] = /var/log/fpm-php.www.log
|
||||||
;php_admin_flag[log_errors] = on
|
;php_admin_flag[log_errors] = on
|
||||||
;php_admin_value[memory_limit] = 32M
|
;php_admin_value[memory_limit] = 32M
|
||||||
|
{% for k, v in item.php_value.items() | list %}
|
||||||
|
php_value[{{ k }}] = {{ v }}
|
||||||
|
{% endfor %}
|
||||||
|
{% for k, v in item.php_admin_value.items() | list %}
|
||||||
|
php_admin_value[{{ k }}] = {{ v }}
|
||||||
|
{% endfor %}
|
||||||
; vim:filetype=dosini
|
; vim:filetype=dosini
|
||||||
|
|||||||
@@ -2,9 +2,6 @@
|
|||||||
; priority=20
|
; priority=20
|
||||||
zend_extension=xdebug.so
|
zend_extension=xdebug.so
|
||||||
|
|
||||||
{% if xdebug_version.stdout|version_compare('2.3', 'gt') %}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
xdebug_auto_trace={{ php_xdebug_auto_trace }}
|
xdebug_auto_trace={{ php_xdebug_auto_trace }}
|
||||||
xdebug_cli_color={{ php_xdebug_cli_color }}
|
xdebug_cli_color={{ php_xdebug_cli_color }}
|
||||||
xdebug_collect_assignments={{ php_xdebug_collect_assignments }}
|
xdebug_collect_assignments={{ php_xdebug_collect_assignments }}
|
||||||
@@ -29,9 +26,7 @@ xdebug_overload_var_dump={{ php_xdebug_overload_var_dump }}
|
|||||||
xdebug_profiler_append={{ php_xdebug_profiler_append }}
|
xdebug_profiler_append={{ php_xdebug_profiler_append }}
|
||||||
xdebug_profiler_enable={{ php_xdebug_profiler_enable }}
|
xdebug_profiler_enable={{ php_xdebug_profiler_enable }}
|
||||||
xdebug_profiler_enable_trigger={{ php_xdebug_profiler_enable_trigger }}
|
xdebug_profiler_enable_trigger={{ php_xdebug_profiler_enable_trigger }}
|
||||||
{% if xdebug_version.stdout|version_compare('2.3', 'gt') %}
|
|
||||||
xdebug_profiler_enable_trigger_value={{ php_xdebug_profiler_enable_trigger_value }}
|
xdebug_profiler_enable_trigger_value={{ php_xdebug_profiler_enable_trigger_value }}
|
||||||
{% endif %}
|
|
||||||
xdebug_profiler_output_dir={{ php_xdebug_profiler_output_dir }}
|
xdebug_profiler_output_dir={{ php_xdebug_profiler_output_dir }}
|
||||||
xdebug_profiler_output_name={{ php_xdebug_profiler_output_name }}
|
xdebug_profiler_output_name={{ php_xdebug_profiler_output_name }}
|
||||||
xdebug_remote_autostart={{ php_xdebug_remote_autostart }}
|
xdebug_remote_autostart={{ php_xdebug_remote_autostart }}
|
||||||
@@ -48,9 +43,7 @@ xdebug_show_exception_trace={{ php_xdebug_show_exception_trace }}
|
|||||||
xdebug_show_local_vars={{ php_xdebug_show_local_vars }}
|
xdebug_show_local_vars={{ php_xdebug_show_local_vars }}
|
||||||
xdebug_show_mem_delta={{ php_xdebug_show_mem_delta }}
|
xdebug_show_mem_delta={{ php_xdebug_show_mem_delta }}
|
||||||
xdebug_trace_enable_trigger={{ php_xdebug_trace_enable_trigger }}
|
xdebug_trace_enable_trigger={{ php_xdebug_trace_enable_trigger }}
|
||||||
{% if xdebug_version.stdout|version_compare('2.3', 'gt') %}
|
|
||||||
xdebug_trace_enable_trigger_value={{ php_xdebug_trace_enable_trigger_value }}
|
xdebug_trace_enable_trigger_value={{ php_xdebug_trace_enable_trigger_value }}
|
||||||
{% endif %}
|
|
||||||
xdebug_trace_format={{ php_xdebug_trace_format }}
|
xdebug_trace_format={{ php_xdebug_trace_format }}
|
||||||
xdebug_trace_options={{ php_xdebug_trace_options }}
|
xdebug_trace_options={{ php_xdebug_trace_options }}
|
||||||
xdebug_trace_output_dir={{ php_xdebug_trace_output_dir }}
|
xdebug_trace_output_dir={{ php_xdebug_trace_output_dir }}
|
||||||
|
|||||||
9
tests/includes/Debian/sury.yml
Normal file
9
tests/includes/Debian/sury.yml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
- name: APT | Install Sury key
|
||||||
|
apt_key:
|
||||||
|
url: 'https://packages.sury.org/php/apt.gpg'
|
||||||
|
|
||||||
|
- name: APT_REPOSITORY | Add Sury repository
|
||||||
|
apt_repository:
|
||||||
|
repo: 'deb https://packages.sury.org/php/ {{ ansible_distribution_release }} main'
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
---
|
|
||||||
|
|
||||||
- name: APT | Install DotDeb key
|
|
||||||
apt_key: url='http://www.dotdeb.org/dotdeb.gpg' state=present
|
|
||||||
|
|
||||||
- name: APT | Add Dotdeb repository
|
|
||||||
apt_repository: repo='deb http://packages.dotdeb.org {{ ansible_distribution_release }} all' state=present
|
|
||||||
25
tests/includes/pre_Debian.yml
Normal file
25
tests/includes/pre_Debian.yml
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
- name: SET_FACT | Prepare test vars
|
||||||
|
set_fact:
|
||||||
|
__nginx_conf: /etc/nginx/nginx.conf
|
||||||
|
|
||||||
|
- name: APT | Install packages
|
||||||
|
apt:
|
||||||
|
pkg: "{{ p }}"
|
||||||
|
update_cache: yes
|
||||||
|
cache_valid_time: 3600
|
||||||
|
vars:
|
||||||
|
p:
|
||||||
|
- apt-transport-https
|
||||||
|
- ca-certificates
|
||||||
|
- curl
|
||||||
|
- lsb-release
|
||||||
|
- nginx
|
||||||
|
- vim
|
||||||
|
|
||||||
|
- 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'))) or
|
||||||
|
((ansible_distribution_major_version is version('10', 'eq')) and (php_version is version('7.4', 'ge')))
|
||||||
10
tests/includes/pre_FreeBSD.yml
Normal file
10
tests/includes/pre_FreeBSD.yml
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
- name: SET_FACT | Prepare test vars
|
||||||
|
set_fact:
|
||||||
|
__nginx_conf: /usr/local/etc/nginx/nginx.conf
|
||||||
|
php_xdebug_package: 'php72-pecl-xdebug-2.6.1'
|
||||||
|
|
||||||
|
- name: PKGNG | Install packages
|
||||||
|
pkgng:
|
||||||
|
name: ['curl', 'nginx']
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
---
|
|
||||||
|
|
||||||
- name: APT | Install Sury key
|
|
||||||
apt_key: url='https://packages.sury.org/php/apt.gpg' state=present
|
|
||||||
|
|
||||||
- name: APT | Add Sury repository
|
|
||||||
apt_repository: repo='deb https://packages.sury.org/php/ {{ ansible_distribution_release }} main' state=present
|
|
||||||
41
tests/templates/nginx.conf.j2
Normal file
41
tests/templates/nginx.conf.j2
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
events {
|
||||||
|
worker_connections 1024;
|
||||||
|
}
|
||||||
|
|
||||||
|
user {{ php_default_user_group }};
|
||||||
|
|
||||||
|
http {
|
||||||
|
include mime.types;
|
||||||
|
default_type application/octet-stream;
|
||||||
|
sendfile on;
|
||||||
|
keepalive_timeout 65;
|
||||||
|
|
||||||
|
server {
|
||||||
|
server_name {{ vhost }};
|
||||||
|
|
||||||
|
root /var/www;
|
||||||
|
|
||||||
|
{% if ansible_local.hanxhx_php.fpm_pool.0.status_path is defined %}
|
||||||
|
location = {{ ansible_local.hanxhx_php.fpm_pool.0.status_path }} {
|
||||||
|
include fastcgi.conf;
|
||||||
|
fastcgi_pass unix:{{ ansible_local.hanxhx_php.fpm_pool.0.listen }};
|
||||||
|
}
|
||||||
|
{% endif %}
|
||||||
|
{% if ansible_local.hanxhx_php.fpm_pool.0.ping_path is defined %}
|
||||||
|
location = {{ ansible_local.hanxhx_php.fpm_pool.0.ping_path }} {
|
||||||
|
include fastcgi.conf;
|
||||||
|
fastcgi_pass unix:{{ ansible_local.hanxhx_php.fpm_pool.0.listen }};
|
||||||
|
}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
location = /ini.php {
|
||||||
|
include fastcgi.conf;
|
||||||
|
fastcgi_pass unix:{{ ansible_local.hanxhx_php.fpm_pool.1.listen }};
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~ \.php$ {
|
||||||
|
include fastcgi.conf;
|
||||||
|
fastcgi_pass unix:{{ ansible_local.hanxhx_php.fpm_pool.0.listen }};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
server {
|
|
||||||
server_name {{ vhost }};
|
|
||||||
|
|
||||||
root /var/www;
|
|
||||||
|
|
||||||
{% if php_fpm_poold.0.status_path is defined %}
|
|
||||||
location = {{ php_fpm_poold.0.status_path }} {
|
|
||||||
include {{ nginx_include }};
|
|
||||||
fastcgi_pass unix:{{ php_default_fpm_sock }};
|
|
||||||
}
|
|
||||||
{% endif %}
|
|
||||||
{% if php_fpm_poold.0.ping_path is defined %}
|
|
||||||
location = {{ php_fpm_poold.0.ping_path }} {
|
|
||||||
include {{ nginx_include }};
|
|
||||||
fastcgi_pass unix:{{ php_default_fpm_sock }};
|
|
||||||
}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
location ~ \.php$ {
|
|
||||||
include {{ nginx_include }};
|
|
||||||
fastcgi_pass unix:{{ php_default_fpm_sock }};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
125
tests/test.yml
125
tests/test.yml
@@ -4,15 +4,16 @@
|
|||||||
vars:
|
vars:
|
||||||
vhost: 'test.local'
|
vhost: 'test.local'
|
||||||
php_extra_packages:
|
php_extra_packages:
|
||||||
- '{{ php_apt_prefix }}recode'
|
- '{{ php_package_prefix }}pgsql'
|
||||||
php_install_xdebug: true
|
php_install_xdebug: true
|
||||||
|
php_autoremove_default_pool: true
|
||||||
php_ini_fpm:
|
php_ini_fpm:
|
||||||
display_errors: 'Off'
|
display_errors: 'Off'
|
||||||
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: '/run/php/php-ansible1.sock'
|
||||||
pm: 'dynamic'
|
pm: 'dynamic'
|
||||||
pm_max_children: 250
|
pm_max_children: 250
|
||||||
pm_start_servers: 10
|
pm_start_servers: 10
|
||||||
@@ -21,57 +22,84 @@
|
|||||||
status_path: '/status'
|
status_path: '/status'
|
||||||
ping_path: '/ping'
|
ping_path: '/ping'
|
||||||
ping_response: 'ok'
|
ping_response: 'ok'
|
||||||
|
- name: 'test_ansible2'
|
||||||
|
user: 'foo'
|
||||||
|
php_value:
|
||||||
|
display_errors: 'Off'
|
||||||
|
php_admin_value:
|
||||||
|
memory_limit: '98M'
|
||||||
|
|
||||||
pre_tasks:
|
pre_tasks:
|
||||||
|
|
||||||
- name: APT | Install packages
|
- name: INCLUDE_TASKS | Pre tasks related to OS
|
||||||
apt: pkg={{ item }} update_cache=yes cache_valid_time=3600
|
include_tasks: "includes/pre_{{ ansible_os_family }}.yml"
|
||||||
with_items: ['apt-transport-https', 'curl', 'lsb-release', 'ca-certificates']
|
|
||||||
|
|
||||||
- name: INCLUDE | Dotdeb
|
- name: USER | Create PHP user
|
||||||
include: includes/dotdeb.yml
|
user:
|
||||||
when: >
|
name: 'foo'
|
||||||
ansible_distribution_major_version | version_compare(8, 'eq') and
|
system: yes
|
||||||
php_version | version_compare('7.0', 'eq')
|
create_home: no
|
||||||
|
shell: '/usr/sbin/nologin'
|
||||||
- name: INCLUDE | Sury
|
|
||||||
include: includes/sury.yml
|
|
||||||
when: >
|
|
||||||
ansible_distribution_major_version | version_compare(9, 'le') and
|
|
||||||
php_version | version_compare('7.1', 'eq')
|
|
||||||
|
|
||||||
- name: APT | Install nginx
|
|
||||||
apt: pkg=nginx state=present update_cache=yes cache_valid_time=3600
|
|
||||||
|
|
||||||
- name: SHELL | Get nginx version
|
|
||||||
shell: nginx -V 2>&1 | awk -F '/' '/nginx version/ { print $2 }'
|
|
||||||
register: nginx_version
|
|
||||||
changed_when: false
|
|
||||||
|
|
||||||
- set_fact: nginx_include="fastcgi_params"
|
|
||||||
when: nginx_version.stdout | version_compare('1.6', '<', true)
|
|
||||||
|
|
||||||
- set_fact: nginx_include="fastcgi.conf"
|
|
||||||
when: nginx_version.stdout | version_compare('1.6', '>=', true)
|
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
|
|
||||||
- name: TEMPLATE | Nginx site config
|
- name: TEMPLATE | Nginx site config
|
||||||
template:
|
template:
|
||||||
src: templates/site.j2
|
src: "templates/nginx.conf.j2"
|
||||||
dest: /etc/nginx/sites-enabled/{{ vhost }}
|
dest: "{{ __nginx_conf }}"
|
||||||
notify: reload nginx
|
notify: reload nginx
|
||||||
|
|
||||||
- name: FILE | Delete default site
|
- name: COMMAND | Fix nginx config
|
||||||
file:
|
command: "cp {{ __nginx_conf | dirname }}/fastcgi_params {{ __nginx_conf | dirname }}/fastcgi.conf"
|
||||||
path: /etc/nginx/sites-enabled/default
|
args:
|
||||||
state: absent
|
creates: "{{ __nginx_conf | dirname }}/fastcgi.conf"
|
||||||
notify: reload nginx
|
notify: reload nginx
|
||||||
|
|
||||||
|
- name: LINEINFILE | Fix nginx config (second step)
|
||||||
|
lineinfile:
|
||||||
|
regexp: '^fastcgi_param\s+SCRIPT_FILENAME'
|
||||||
|
line: "fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;"
|
||||||
|
dest: "{{ __nginx_conf | dirname }}/fastcgi.conf"
|
||||||
|
notify: reload nginx
|
||||||
|
|
||||||
|
- name: SERVICE | Ensure nginx is started
|
||||||
|
service:
|
||||||
|
name: nginx
|
||||||
|
state: started
|
||||||
|
when: ansible_virtualization_type != 'docker'
|
||||||
|
|
||||||
|
- block:
|
||||||
|
|
||||||
|
- name: COMMAND | Docker nginx status
|
||||||
|
command: service nginx status
|
||||||
|
args:
|
||||||
|
warn: false
|
||||||
|
changed_when: false
|
||||||
|
failed_when: false
|
||||||
|
register: ngs
|
||||||
|
|
||||||
|
- name: COMMAND | Docker start nginx
|
||||||
|
command: service nginx start
|
||||||
|
args:
|
||||||
|
warn: false
|
||||||
|
when: ngs.stdout.find('nginx is not running') != -1
|
||||||
|
|
||||||
|
when: ansible_virtualization_type == 'docker'
|
||||||
|
|
||||||
handlers:
|
handlers:
|
||||||
|
|
||||||
- name: reload nginx
|
- name: reload nginx
|
||||||
service: name=nginx state=reloaded
|
service:
|
||||||
|
name: nginx
|
||||||
|
state: reloaded
|
||||||
|
notify: docker reload nginx
|
||||||
|
|
||||||
|
- name: docker reload nginx
|
||||||
|
command: service nginx reload
|
||||||
|
args:
|
||||||
|
warn: false
|
||||||
|
notify: docker reload nginx
|
||||||
|
when: ansible_virtualization_type == 'docker'
|
||||||
|
|
||||||
roles:
|
roles:
|
||||||
- ../../
|
- ../../
|
||||||
@@ -85,10 +113,19 @@
|
|||||||
failed_when: p.stdout == ''
|
failed_when: p.stdout == ''
|
||||||
|
|
||||||
- name: FILE | Create /var/www
|
- name: FILE | Create /var/www
|
||||||
file: dest=/var/www state=directory
|
file:
|
||||||
|
dest: /var/www
|
||||||
|
state: directory
|
||||||
|
|
||||||
- name: COPY | Add phpinfo
|
- name: COPY | Add phpinfo
|
||||||
copy: dest=/var/www/phpinfo.php content='<?php phpinfo();'
|
copy:
|
||||||
|
dest: /var/www/phpinfo.php
|
||||||
|
content: '<?php phpinfo();'
|
||||||
|
|
||||||
|
- name: COPY | Add ini test file
|
||||||
|
copy:
|
||||||
|
dest: /var/www/ini.php
|
||||||
|
content: '<?php echo ini_get("memory_limit") . "\n";'
|
||||||
|
|
||||||
- name: SHELL | Check vhost
|
- name: SHELL | Check vhost
|
||||||
shell: "curl -v -H 'Host: {{ vhost }}' http://127.0.0.1/phpinfo.php 2> /dev/null | grep h1 | grep -o 'PHP Version {{ php_version }}' | sed -r 's/<//g'"
|
shell: "curl -v -H 'Host: {{ vhost }}' http://127.0.0.1/phpinfo.php 2> /dev/null | grep h1 | grep -o 'PHP Version {{ php_version }}' | sed -r 's/<//g'"
|
||||||
@@ -98,6 +135,14 @@
|
|||||||
register: c
|
register: c
|
||||||
failed_when: c.stdout == ''
|
failed_when: c.stdout == ''
|
||||||
|
|
||||||
|
- name: SHELL | Check custom php value
|
||||||
|
shell: "curl -H 'Host: {{ vhost }}' http://127.0.0.1/ini.php 2> /dev/null"
|
||||||
|
args:
|
||||||
|
warn: false
|
||||||
|
changed_when: false
|
||||||
|
register: c
|
||||||
|
failed_when: 'php_fpm_poold.1.php_admin_value.memory_limit not in c.stdout'
|
||||||
|
|
||||||
- name: URI | Check ping
|
- name: URI | Check ping
|
||||||
uri:
|
uri:
|
||||||
url: "http://localhost{{ php_fpm_poold.0.ping_path }}"
|
url: "http://localhost{{ php_fpm_poold.0.ping_path }}"
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
php_default_version: '5.6'
|
|
||||||
php_managed_versions:
|
|
||||||
- '5.6'
|
|
||||||
- '7.0'
|
|
||||||
- '7.1'
|
|
||||||
- '7.2'
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
php_default_version: '7.0'
|
|
||||||
php_managed_versions:
|
|
||||||
- '7.0'
|
|
||||||
- '7.1'
|
|
||||||
- '7.2'
|
|
||||||
1
vars/Debian-buster.yml
Normal file
1
vars/Debian-buster.yml
Normal file
@@ -0,0 +1 @@
|
|||||||
|
php_default_version: '7.3'
|
||||||
1
vars/Debian-stretch.yml
Normal file
1
vars/Debian-stretch.yml
Normal file
@@ -0,0 +1 @@
|
|||||||
|
php_default_version: '7.0'
|
||||||
1
vars/FreeBSD-11.yml
Normal file
1
vars/FreeBSD-11.yml
Normal file
@@ -0,0 +1 @@
|
|||||||
|
php_default_version: '7.2'
|
||||||
1
vars/FreeBSD-12.yml
Normal file
1
vars/FreeBSD-12.yml
Normal file
@@ -0,0 +1 @@
|
|||||||
|
php_default_version: '7.2'
|
||||||
23
vars/OS_Family_Debian.yml
Normal file
23
vars/OS_Family_Debian.yml
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
php_packages:
|
||||||
|
- '{{ php_package_prefix }}cli'
|
||||||
|
- '{{ php_package_prefix }}curl'
|
||||||
|
- '{{ php_package_prefix }}gd'
|
||||||
|
- '{{ php_package_prefix }}mysql'
|
||||||
|
- '{{ php_package_prefix }}intl'
|
||||||
|
|
||||||
|
php_xdebug_package: 'php-xdebug'
|
||||||
|
|
||||||
|
php_package_prefix: 'php{{ php_version }}-'
|
||||||
|
|
||||||
|
php_mods_dir: '/etc/php/{{ php_version }}/mods-available'
|
||||||
|
php_fpm_pool_dir: '/etc/php/{{ php_version }}/fpm/pool.d'
|
||||||
|
|
||||||
|
php_fpm_service: 'php{{ php_version }}-fpm'
|
||||||
|
php_default_fpm_sock: '/var/run/php/php{{ php_version }}-fpm.sock'
|
||||||
|
|
||||||
|
php_cli_ini: '/etc/php/{{ php_version }}/cli/php.ini'
|
||||||
|
php_fpm_ini: '/etc/php/{{ php_version }}/fpm/php.ini'
|
||||||
|
|
||||||
|
php_default_user_group: 'www-data'
|
||||||
20
vars/OS_Family_FreeBSD.yml
Normal file
20
vars/OS_Family_FreeBSD.yml
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
php_packages:
|
||||||
|
- '{{ php_package_prefix }}curl'
|
||||||
|
- '{{ php_package_prefix }}gd'
|
||||||
|
- '{{ php_package_prefix }}mysqli'
|
||||||
|
- '{{ php_package_prefix }}intl'
|
||||||
|
|
||||||
|
php_package_prefix: 'php{{ php_version | replace(".", "") }}-'
|
||||||
|
|
||||||
|
php_mods_dir: '/usr/local/etc/php'
|
||||||
|
php_fpm_pool_dir: '/usr/local/etc/php-fpm.d'
|
||||||
|
|
||||||
|
php_fpm_service: 'php-fpm'
|
||||||
|
php_default_fpm_sock: '/var/run/php-fpm.sock'
|
||||||
|
|
||||||
|
php_cli_ini: '/usr/local/etc/php.ini'
|
||||||
|
php_fpm_ini: '/usr/local/etc/php.ini'
|
||||||
|
|
||||||
|
php_default_user_group: 'www'
|
||||||
1
vars/Ubuntu-bionic.yml
Normal file
1
vars/Ubuntu-bionic.yml
Normal file
@@ -0,0 +1 @@
|
|||||||
|
php_default_version: '7.2'
|
||||||
1
vars/Ubuntu-xenial.yml
Normal file
1
vars/Ubuntu-xenial.yml
Normal file
@@ -0,0 +1 @@
|
|||||||
|
php_default_version: '7.0'
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
---
|
|
||||||
|
|
||||||
php_packages:
|
|
||||||
- '{{ php_apt_prefix }}cli'
|
|
||||||
- '{{ php_apt_prefix }}curl'
|
|
||||||
- '{{ php_apt_prefix }}gd'
|
|
||||||
- '{{ php_apt_prefix }}mcrypt'
|
|
||||||
- '{{ php_mysql_package }}'
|
|
||||||
- '{{ php_apt_prefix }}intl'
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
---
|
|
||||||
|
|
||||||
php_apt_prefix: 'php5-'
|
|
||||||
php_etc_dir: '/etc/php5'
|
|
||||||
php_fpm_service: 'php5-fpm'
|
|
||||||
php_default_fpm_sock: '/var/run/php5-fpm.sock'
|
|
||||||
php_mods_dir: '/etc/php5/mods-available'
|
|
||||||
php_mysql_package: 'php5-mysqlnd'
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
---
|
|
||||||
|
|
||||||
php_apt_prefix: 'php7.0-'
|
|
||||||
php_etc_dir: '/etc/php/7.0'
|
|
||||||
php_fpm_service: 'php7.0-fpm'
|
|
||||||
php_default_fpm_sock: '/var/run/php/php7.0-fpm.sock'
|
|
||||||
php_mods_dir: '/etc/php/7.0/mods-available'
|
|
||||||
php_mysql_package: 'php7.0-mysql'
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
---
|
|
||||||
|
|
||||||
php_apt_prefix: 'php7.1-'
|
|
||||||
php_etc_dir: '/etc/php/7.1'
|
|
||||||
php_fpm_service: 'php7.1-fpm'
|
|
||||||
php_default_fpm_sock: '/var/run/php/php7.1-fpm.sock'
|
|
||||||
php_mods_dir: '/etc/php/7.1/mods-available'
|
|
||||||
php_mysql_package: 'php7.1-mysql'
|
|
||||||
Reference in New Issue
Block a user