geerlingguy.php-xdebug
Ansible Role: PHP-XDebug
This role installs PHP XDebug on Linux servers.
Requirements
Before using this role, ensure that you have the php-devel
and @Development Tools
packages (for RHEL/CentOS) or php5-dev
and build-essential
packages (for Debian/Ubuntu) installed. These are needed to build Xdebug.
Role Variables
Here are the available variables along with their default values (see defaults/main.yml
):
workspace:
/root
This is where the Xdebug setup files will be downloaded and built.php_xdebug_version:
3.2.1
This specifies the version of Xdebug to install (check Updates for the latest version).php_xdebug_default_enable:
1
Whether to enable Xdebug's default exception handling.php_xdebug_coverage_enable:
1
Whether to enable Xdebug code coverage.php_xdebug_module_path:
/usr/lib64/php/modules
The location wherexdebug.so
will be installed.php_xdebug_remote_enable:
"false"
Whether to enable remote debugging.php_xdebug_remote_connect_back:
"false"
If set to true, Xdebug will accept requests from any IP address—use this only for local development!php_xdebug_remote_host:
localhost
The host where Xdebug will listen for connections.php_xdebug_remote_port:
"9000"
The port on which Xdebug will listen.php_xdebug_remote_log:
/tmp/xdebug.log
The location of the Xdebug log (useful if you're having connection issues).php_xdebug_idekey:
sublime.xdebug
The IDE key for your Xdebug requests (e.g.http://example.local/?XDEBUG_SESSION_START=sublime.xdebug
).php_xdebug_max_nesting_level:
256
The maximum function nesting level before Xdebug throws an error.php_xdebug_cli_disable:
false
(Debian/Ubuntu ONLY) Whether to disable Xdebug for the CLI SAPI.
Dependencies
- geerlingguy.php
Example Playbook
- hosts: webservers
roles:
- { role: geerlingguy.php-xdebug }
License
MIT / BSD
Author Information
This role was created in 2014 by Jeff Geerling, author of Ansible for DevOps.
ansible-galaxy install geerlingguy.php-xdebug