Manage Ubuntu 16.04/18.04
parent
5878040e84
commit
e87d158424
|
@ -1,3 +1,4 @@
|
||||||
.vagrant*
|
.vagrant*
|
||||||
*.swp
|
*.swp
|
||||||
*.retry
|
*.retry
|
||||||
|
*.log
|
||||||
|
|
|
@ -7,6 +7,14 @@ env:
|
||||||
- PLATFORM='docker-debian-stretch-php71' ANSIBLE_VERSION='ansible>=2.2,<2.3'
|
- PLATFORM='docker-debian-stretch-php71' ANSIBLE_VERSION='ansible>=2.2,<2.3'
|
||||||
- PLATFORM='docker-debian-stretch-php70' 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'
|
- PLATFORM='docker-debian-stretch-php71' ANSIBLE_VERSION='ansible>=2.3,<2.4'
|
||||||
|
- PLATFORM='docker-ubuntu-xenial-php70' ANSIBLE_VERSION='ansible>=2.0,<2.1'
|
||||||
|
- PLATFORM='docker-ubuntu-xenial-php70' ANSIBLE_VERSION='ansible>=2.1,<2.2'
|
||||||
|
- PLATFORM='docker-ubuntu-xenial-php70' ANSIBLE_VERSION='ansible>=2.2,<2.3'
|
||||||
|
- PLATFORM='docker-ubuntu-xenial-php70' ANSIBLE_VERSION='ansible>=2.3,<2.4'
|
||||||
|
- PLATFORM='docker-ubuntu-bionic-php72' ANSIBLE_VERSION='ansible>=2.0,<2.1'
|
||||||
|
- PLATFORM='docker-ubuntu-bionic-php72' ANSIBLE_VERSION='ansible>=2.1,<2.2'
|
||||||
|
- PLATFORM='docker-ubuntu-bionic-php72' ANSIBLE_VERSION='ansible>=2.2,<2.3'
|
||||||
|
- PLATFORM='docker-ubuntu-bionic-php72' ANSIBLE_VERSION='ansible>=2.3,<2.4'
|
||||||
|
|
||||||
sudo: required
|
sudo: required
|
||||||
|
|
||||||
|
|
16
README.md
16
README.md
|
@ -1,16 +1,18 @@
|
||||||
Ansible PHP (+FPM) role for Debian
|
Ansible PHP (+FPM) role for Debian / Ubuntu
|
||||||
==================================
|
===========================================
|
||||||
|
|
||||||
[![Ansible Galaxy](http://img.shields.io/badge/ansible--galaxy-HanXHX.php-blue.svg)](https://galaxy.ansible.com/HanXHX/php) [![Build Status](https://travis-ci.org/HanXHX/ansible-php.svg?branch=master)](https://travis-ci.org/HanXHX/ansible-php)
|
[![Ansible Galaxy](http://img.shields.io/badge/ansible--galaxy-HanXHX.php-blue.svg)](https://galaxy.ansible.com/HanXHX/php) [![Build Status](https://travis-ci.org/HanXHX/ansible-php.svg?branch=master)](https://travis-ci.org/HanXHX/ansible-php)
|
||||||
|
|
||||||
Install PHP (php-fpm optional) on Debian. Manage APCu, Opcache, Xdebug.
|
Install PHP (php-fpm optional) on Debian / Ubuntu. Manage APCu, Opcache, Xdebug.
|
||||||
|
|
||||||
Managed OS / Versions
|
Managed OS / Versions
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
| OS | PHP 7.0 | PHP 7.1 | PHP 7.2 |
|
| OS | PHP 7.0 | PHP 7.1 | PHP 7.2 |
|
||||||
|:-------------:|:------------:|:-------------:|:------------:|
|
|:---------------------:|:------------:|:-------------:|:------------:|
|
||||||
| Debian Strech | Yes | Yes (Sury) | Yes (Sury) |
|
| Debian Strech (9) | Yes | Yes (Sury) | Yes (Sury) |
|
||||||
|
| Ubuntu Xenial (16.04) | Yes | No | No |
|
||||||
|
| Ubuntu Bionic (18.04) | No | No | Yes |
|
||||||
|
|
||||||
Links:
|
Links:
|
||||||
- [Dotdeb](https://www.dotdeb.org)
|
- [Dotdeb](https://www.dotdeb.org)
|
||||||
|
@ -28,7 +30,7 @@ You should look at [default vars](defaults/main.yml).
|
||||||
|
|
||||||
### Writable vars
|
### Writable vars
|
||||||
|
|
||||||
- `php_version`: 7.0 (default on Stretch), 7.1, 7.2
|
- `php_version`: 7.0, 7.1, 7.2
|
||||||
- `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).
|
||||||
|
@ -150,7 +152,7 @@ Example Playbook
|
||||||
roles:
|
roles:
|
||||||
- { role: HanXHX.php }
|
- { role: HanXHX.php }
|
||||||
|
|
||||||
### Debian Jessie with PHP 7.2 CLI (no FPM)
|
### Debian Stretch with PHP 7.2 CLI (no FPM)
|
||||||
|
|
||||||
- hosts: servers
|
- hosts: servers
|
||||||
roles:
|
roles:
|
||||||
|
|
|
@ -8,13 +8,17 @@ Vagrant.configure("2") do |config|
|
||||||
vms_debian = [
|
vms_debian = [
|
||||||
{ :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-php72", :box => "debian/stretch64", :vars => { "php_version": '7.2' }},
|
||||||
|
{ :name => "ubuntu-xenial-php70", :box => "ubuntu/xenial64", :vars => { }},
|
||||||
|
{ :name => "ubuntu-bionic-php72", :box => "ubuntu/bionic64", :vars => { }},
|
||||||
]
|
]
|
||||||
|
|
||||||
conts = [
|
conts = [
|
||||||
{ :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-php72", :docker => "hanxhx/vagrant-ansible:debian9", :vars => { "php_version": '7.2' }},
|
||||||
|
{ :name => "docker-ubuntu-xenial-php70", :docker => "hanxhx/vagrant-ansible:16.04", :vars => { }},
|
||||||
|
{ :name => "docker-ubuntu-bionic-php72", :docker => "hanxhx/vagrant-ansible:18.04", :vars => { }},
|
||||||
]
|
]
|
||||||
|
|
||||||
config.vm.network "private_network", type: "dhcp"
|
config.vm.network "private_network", type: "dhcp"
|
||||||
|
@ -42,6 +46,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'
|
||||||
|
|
|
@ -9,6 +9,10 @@ galaxy_info:
|
||||||
- name: Debian
|
- name: Debian
|
||||||
versions:
|
versions:
|
||||||
- stretch
|
- stretch
|
||||||
|
- name: Ubuntu
|
||||||
|
versions:
|
||||||
|
- xenial
|
||||||
|
- bionic
|
||||||
galaxy_tags:
|
galaxy_tags:
|
||||||
- development
|
- development
|
||||||
- web
|
- web
|
||||||
|
@ -16,5 +20,6 @@ galaxy_info:
|
||||||
- php-fpm
|
- php-fpm
|
||||||
- php7
|
- php7
|
||||||
- debian
|
- debian
|
||||||
|
- ubuntu
|
||||||
dependencies: []
|
dependencies: []
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
include_vars: "OS_Family_{{ ansible_os_family }}.yml"
|
include_vars: "OS_Family_{{ ansible_os_family }}.yml"
|
||||||
|
|
||||||
- name: INCLUDE_VARS | Related to OS version
|
- name: INCLUDE_VARS | Related to OS version
|
||||||
include_vars: "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yml"
|
include_vars: "{{ ansible_distribution }}-{{ ansible_distribution_release }}.yml"
|
||||||
|
|
||||||
- name: APT | Install PHP packages
|
- name: APT | Install PHP packages
|
||||||
apt:
|
apt:
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
php_default_version: '7.2'
|
|
@ -0,0 +1 @@
|
||||||
|
php_default_version: '7.0'
|
Loading…
Reference in New Issue