-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathvagrant.xdebug.yml
33 lines (33 loc) · 966 Bytes
/
vagrant.xdebug.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
- hosts: app
become: yes
tasks:
- name: Install xdebug extension
dnf:
state: present
name: php-pecl-xdebug3
when: xdebug_enable | bool
- name: Reconfigure xdebug
lineinfile:
path: /etc/php.d/15-xdebug.ini
regexp: "{{ item.regexp }}"
line: "{{ item.value }}"
with_items:
# - value: "xdebug.max_nesting_level = 512"
# regexp: "xdebug.max_nesting_level ="
- value: "xdebug.remote_enable = {{ remote_enabled }}"
regexp: "xdebug.remote_enable ="
- value: "xdebug.remote_connect_back = 1"
regexp: "xdebug.remote_connect_back ="
when: xdebug_enable | bool
- name: Remove xdebug extension
dnf:
state: absent
name: php-pecl-xdebug3
when: not xdebug_enable | bool
- name: Restart php-fpm
service:
name: php-fpm
state: restarted
vars:
remote_enabled: 1
xdebug_enable: True