Mirror HanXHX/ansible-php dari GitHub.
 
 
 
Go to file
Emilien Mantel 675ef60b6d Galaxy 1.1 compat 2016-02-27 13:08:45 +01:00
.scripts Support Xdebug extension 2015-07-27 18:09:52 +02:00
defaults PHP7 Implementation 2016-01-22 15:57:29 +01:00
handlers PHP7 Implementation 2016-01-22 15:57:29 +01:00
meta Galaxy 1.1 compat 2016-02-27 13:08:45 +01:00
tasks Install Opcache only on PHP >= 7.0 2016-02-27 13:05:02 +01:00
templates/etc/__php__ PHP7 now supports APCu / Opcache 2016-02-27 12:51:30 +01:00
tests Dotdeb on php 5.6 2016-01-22 17:24:15 +01:00
vars Fix mysql package 2016-01-22 16:38:02 +01:00
.gitignore Ignore fails tries 2016-02-27 12:39:05 +01:00
.travis.yml Travis support many PHP version 2016-01-22 16:04:26 +01:00
LICENSE Initial commit 2015-07-23 10:41:27 +02:00
README.md Add Ansible Galaxy badge 2015-10-07 19:47:26 +02:00
Vagrantfile Use official debian jessie boxes 2016-02-27 12:14:34 +01:00

README.md

Ansible PHP (+FPM) role for Debian

Ansible Galaxy 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_install_xdebug: boolean, install Xdebug
  • php_extra_packages: additional php packages to install (default is an empty list).

php.ini

  • php_ini: global configuration shared beween FPM/CLI
  • php_ini_fpm: manage FPM php.ini (php-fpm)
  • php_ini_cli: manage CLI php.ini (php-fpm)

Note:

  • If you want exactly same configuration for CLI/FPM. You can put all your data in php_ini.
  • Put specific configuration in php_ini_fpm/php_ini_cli.
  • You can override with php_ini_fpm/php_ini_cli, but it breaks idempotence.

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

Xdebug settings

See Xdebug doc

  • php_xdebug_auto_trace
  • php_xdebug_cli_color
  • php_xdebug_collect_assignments
  • php_xdebug_collect_includes
  • php_xdebug_collect_params
  • php_xdebug_collect_return
  • php_xdebug_collect_vars
  • php_xdebug_coverage_enable
  • php_xdebug_default_enable
  • php_xdebug_dump_globals
  • php_xdebug_dump_once
  • php_xdebug_dump_undefined
  • php_xdebug_extended_info
  • php_xdebug_file_link_format
  • php_xdebug_force_display_errors
  • php_xdebug_force_error_reporting
  • php_xdebug_halt_level
  • php_xdebug_idekey
  • php_xdebug_manual_url
  • php_xdebug_max_nesting_level
  • php_xdebug_overload_var_dump
  • php_xdebug_profiler_append
  • php_xdebug_profiler_enable
  • php_xdebug_profiler_enable_trigger
  • php_xdebug_profiler_enable_trigger_value
  • php_xdebug_profiler_output_dir
  • php_xdebug_profiler_output_name
  • php_xdebug_remote_autostart
  • php_xdebug_remote_connect_back
  • php_xdebug_remote_cookie_expire_time
  • php_xdebug_remote_enable
  • php_xdebug_remote_handler
  • php_xdebug_remote_host
  • php_xdebug_remote_log
  • php_xdebug_remote_mode
  • php_xdebug_remote_port
  • php_xdebug_scream
  • php_xdebug_show_exception_trace
  • php_xdebug_show_local_vars
  • php_xdebug_show_mem_delta
  • php_xdebug_trace_enable_trigger
  • php_xdebug_trace_enable_trigger_value
  • php_xdebug_trace_format
  • php_xdebug_trace_options
  • php_xdebug_trace_output_dir
  • php_xdebug_trace_output_name
  • php_xdebug_var_display_max_children
  • php_xdebug_var_display_max_data
  • php_xdebug_var_display_max_depth

Read only vars

  • php_packages: minimal package list to install
  • php_extension_dir.stdout: get php extension dir (from task)
  • php_version.stdout: get php version (from task)

Dependencies

None.

Example Playbook

Simple Playbook

- hosts: servers
  roles:
     - { role: HanXHX.php }

Debian Wheezy with PHP 5.5 CLI (no FPM)

- hosts: wheezy-servers
  roles:
     - { role: HanXHX.dotdeb, dotdeb_php_version: "5.5" }
     - { role: HanXHX.php, php_install_fpm: false }

License

GPLv2

Author Information