Add README

pull/5/head
Emilien Mantel 2015-07-24 11:45:11 +02:00
parent d94233e6f0
commit c5fe52409d
1 changed files with 64 additions and 10 deletions

View File

@ -1,38 +1,92 @@
Role Name Ansible PHP (+FPM) role for Debian
========= ==================================
A brief description of the role goes here. [![Build Status](https://travis-ci.org/HanXHX/ansible-php.svg)](https://travis-ci.org/HanXHX/ansible-php)
Install PHP (php-fpm optional) on Debian Wheezy/Jessie. Depending of your PHP version: manage APC(u) / Opcache.
Requirements Requirements
------------ ------------
Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. 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).
On Debian Wheezy, you can use many PHP version: 5.4 from Debian repository and 5.5/5.6 from [Dotdeb](https://www.dotdeb.org). With my [dotdeb role](https://github.com/HanXHX/ansible-debian-dotdeb), you can choose which version you want.
Role Variables Role Variables
-------------- --------------
A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. You should look at [default vars](defaults/main.yml).
### Writable vars
- `php_install_fpm`: boolean, install and manage php-fpm (default is true)
- `php_extra_packages`: additional php packages to install (default is an empty list).
- `php_ini`: manage php.ini (php-fpm), as key/value.
#### OpCache settings (PHP >= 5.5)
See [Opcache doc](https://secure.php.net/manual/en/opcache.configuration.php)
- `php_opcache_enable`
- `php_opcache_enable_cli`
- `php_opcache_memory_consumption`
- `php_opcache_interned_strings_buffer`
- `php_opcache_max_accelerated_files`
- `php_opcache_max_wasted_percentage`
- `php_opcache_validate_timestamps`
- `php_opcache_revalidate_freq`
- `php_opcache_max_file_size`
#### APC/APCu settings
See [apc doc](https://secure.php.net/manual/en/apc.configuration.php)
- `php_apc_enable`
- `php_apc_enable_cli`
- `php_apc_shm_size`
- `php_apc_num_files_hint`
- `php_apc_user_entries_hint`
- `php_apc_user_ttl`
- `php_apc_ttl`
- `php_apc_file_update_protection`
- `php_apc_slam_defense`
- `php_apc_stat_ctime`
### Read only vars
- `php_packages`: minimal package list to install
Dependencies Dependencies
------------ ------------
A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. None.
Example Playbook Example Playbook
---------------- ----------------
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: ### Simple Playbook
- hosts: servers - hosts: servers
roles: roles:
- { role: username.rolename, x: 42 } - { role: HanXHX.php }
### Debian Wheezy with PHP 5.5
- hosts: wheezy-servers
roles:
- { role: HanXHX.dotdeb, dotdeb_php_version: "5.5" }
- { role: HanXHX.php }
License License
------- -------
BSD GPLv2
Author Information Author Information
------------------ ------------------
An optional section for the role authors to include contact information, or a website (HTML is not allowed). - You can find many other roles in my GitHub "lab": https://github.com/HanXHX/my-ansible-playbooks
- All issues, pull-request are welcome :)