mirror of
https://github.com/HanXHX/ansible-php.git
synced 2026-04-15 13:32:09 +07:00
Support Xdebug extension
This commit is contained in:
@@ -6,10 +6,19 @@
|
||||
- php_packages
|
||||
- php_extra_packages
|
||||
|
||||
- name: COMMAND | Get PHP extension dir
|
||||
command: php-config --extension-dir
|
||||
changed_when: false
|
||||
register: php_extension_dir
|
||||
|
||||
- name: INCLUDE | PHP-FPM
|
||||
include: fpm.yml
|
||||
when: php_install_fpm
|
||||
|
||||
- name: INCLUDE | Xdebug
|
||||
include: xdebug.yml
|
||||
when: php_install_xdebug
|
||||
|
||||
- name: SHELL | Get PHP version on apt
|
||||
shell: LANG=C apt-cache policy php5 2>&1 | awk '/Candidate:/ { print $2 }'
|
||||
register: php_apt_version
|
||||
|
||||
13
tasks/xdebug.yml
Normal file
13
tasks/xdebug.yml
Normal file
@@ -0,0 +1,13 @@
|
||||
---
|
||||
|
||||
- name: APT | Install php-xdebug
|
||||
apt: pkg=php5-xdebug state=latest update_cache=yes cache_valid_time=3600
|
||||
|
||||
- name: SHELL | Get Xdebug version
|
||||
shell: dpkg -l | awk '$2 ~ /^php5-xdebug$/ { print $3 }'
|
||||
changed_when: false
|
||||
register: xdebug_version
|
||||
|
||||
- name: TEMPLATE | Deploy module configurations
|
||||
template: src=etc/php5/mods-available/xdebug.ini.j2 dest=/etc/php5/mods-available/xdebug.ini owner=root mode=0644
|
||||
notify: restart php-fpm
|
||||
Reference in New Issue
Block a user