---

- name: Xdebug | Install
  become: yes
  apt: name=php-xdebug state=latest

- name: Xdebug | enable
  become: yes
  file:
    src: /etc/php/7.1/mods-available/xdebug.ini
    dest: /etc/php/7.1/fpm/conf.d/20-xdebug.ini
    state: link

- name: Xdebug | Setup
  become: yes
  lineinfile: >
    dest=/etc/php7.1/fpm/conf.d/20-xdebug.ini
    line={{ item }}
  with_items:
    - "xdebug.var_display_max_depth=32"
    - "xdebug.cli_color=2"
    - "xdebug.var_display_max_data=-1"
    - "xdebug.idekey='vagrant'"
    - "xdebug.remote_enable=1"
    - "xdebug.remote_connect_back=1"
  notify: restart php-fpm

---

- name: Xdebug | Install
  become: yes
  apt: name=php-xdebug state=latest

- name: Xdebug | enable
  become: yes
  file:
    src: /etc/php/7.1/mods-available/xdebug.ini
    dest: /etc/php/7.1/fpm/conf.d/20-xdebug.ini
    state: link

- name: Xdebug | Setup
  become: yes
  lineinfile: >
    dest=/etc/php/7.1/fpm/conf.d/20-xdebug.ini
    line={{ item }}
  with_items:
    - "xdebug.var_display_max_depth=32"
    - "xdebug.cli_color=2"
    - "xdebug.var_display_max_data=-1"
    - "xdebug.idekey='vagrant'"
    - "xdebug.remote_enable=1"
    - "xdebug.remote_connect_back=1"
  notify: restart php-fpm

Fix path issue in other task
Fix path issue in other task
