|
|
||
|---|---|---|
| defaults | ||
| handlers | ||
| meta | ||
| tasks | ||
| templates/etc/php5 | ||
| tests | ||
| vars | ||
| .gitignore | ||
| .travis.yml | ||
| LICENSE | ||
| README.md | ||
| Vagrantfile | ||
README.md
Ansible PHP (+FPM) role for Debian
Install PHP (php-fpm optional) on Debian Wheezy/Jessie. Depending of your PHP version: manage APC(u) / Opcache.
Requirements
If you need PHP-FPM, you must install a webserver with FastCGI support. You can use my nginx role. On Debian Wheezy, you can use many PHP version: 5.4 from Debian repository and 5.5/5.6 from Dotdeb. With my dotdeb role, you can choose which version you want.
Role Variables
You should look at default vars.
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
php_opcache_enablephp_opcache_enable_cliphp_opcache_memory_consumptionphp_opcache_interned_strings_bufferphp_opcache_max_accelerated_filesphp_opcache_max_wasted_percentagephp_opcache_validate_timestampsphp_opcache_revalidate_freqphp_opcache_max_file_size
APC/APCu settings
See apc doc
php_apc_enablephp_apc_enable_cliphp_apc_shm_sizephp_apc_num_files_hintphp_apc_user_entries_hintphp_apc_user_ttlphp_apc_ttlphp_apc_file_update_protectionphp_apc_slam_defensephp_apc_stat_ctime
Read only vars
php_packages: minimal package list to install
Dependencies
None.
Example Playbook
Simple Playbook
- hosts: servers
roles:
- { 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
GPLv2
Author Information
- You can find many other roles in my GitHub "lab": https://github.com/HanXHX/my-ansible-playbooks
- All issues, pull-request are welcome :)