Skip to content

Commit 8bdb40c

Browse files
committed
Fixed php provision (blackfire/xdebug)
1 parent f207525 commit 8bdb40c

File tree

2 files changed

+31
-10
lines changed

2 files changed

+31
-10
lines changed
Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
---
22

3-
- include: bootstrap/php-blackfire/centos.yml
4-
when: ansible_distribution == 'CentOS' and PROVISION.install.phpBlackfire
3+
- include: bootstrap/php-blackfire/debian.yml
4+
when: ansible_distribution == 'CentOS' and PROVISION.install.phpBlackfire is defined and PROVISION.install.phpBlackfire
55

6-
- include: bootstrap/php-xdebug/centos.yml
7-
when: ansible_distribution == 'CentOS' and PROVISION.install.phpXdebug
6+
- include: bootstrap/php-blackfire/redhat.yml
7+
when: ansible_os_family == 'Debian' and PROVISION.install.phpBlackfire is defined and PROVISION.install.phpBlackfire
88

9-
10-
- include: bootstrap/php-blackfire/ubuntu.yml
11-
when: ( ansible_distribution == 'Ubuntu' or ansible_distribution == 'Debian' ) and PROVISION.install.phpBlackfire
12-
13-
- include: bootstrap/php-xdebug/ubuntu.yml
14-
when: ( ansible_distribution == 'Ubuntu' or ansible_distribution == 'Debian' ) and PROVISION.install.phpXdebug
9+
- include: bootstrap/php.xdebug.yml
10+
when: PROVISION.install.phpXdebug is defined and PROVISION.install.phpXdebug
1511

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
3+
- name: Set php xdebug file [RedHat family]
4+
set_fact:
5+
php_xdebug_conf: /etc/php.d/xdebug.ini
6+
when: ansible_os_family == 'RedHat'
7+
8+
- name: Set php xdebug file [Debian family]
9+
set_fact:
10+
php_xdebug_conf: /etc/php5/mods-available/xdebug.ini
11+
when: ansible_os_family == 'Debian'
12+
13+
- name: Set php xdebug file [Ubuntu 12.04]
14+
set_fact:
15+
php_xdebug_conf: /etc/php5/conf.d/xdebug.ini
16+
when: ansible_distribution == 'Ubuntu' and ansible_distribution_version == "12.04"
17+
18+
- name: Enable xdebug
19+
replace:
20+
dest: '{{ php_xdebug_conf }}'
21+
regexp: '^[\s]*;[\s]*({{ item }}[\s]*=.*)$'
22+
replace: '\1'
23+
with_items:
24+
- 'zend_extension'
25+
- 'extension'

0 commit comments

Comments
 (0)