Mirror HanXHX/ansible-php dari GitHub.
 
 
 
Go to file
Emilien Mantel a4e5720e83 Fix poold template: bad variable name 2015-07-26 21:06:25 +02:00
defaults APC/APCu better management 2015-07-23 18:10:17 +02:00
handlers Dirty commit 2015-07-23 10:40:33 +02:00
meta APC/APCu better management 2015-07-23 18:10:17 +02:00
tasks Fix loading APC/APCu 2015-07-24 09:49:16 +02:00
templates/etc/php5 Fix poold template: bad variable name 2015-07-26 21:06:25 +02:00
tests Add travis CI 2015-07-24 12:11:42 +02:00
vars Dirty commit 2015-07-23 10:40:33 +02:00
.gitignore Add gitignore 2015-07-23 16:36:06 +02:00
.travis.yml Add travis CI 2015-07-24 12:11:42 +02:00
LICENSE Initial commit 2015-07-23 10:41:27 +02:00
README.md Add README 2015-07-24 11:48:43 +02:00
Vagrantfile Vagrant + tests 2015-07-23 16:35:25 +02:00

README.md

Ansible PHP (+FPM) role for Debian

Build Status

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_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

  • 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

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