--- - name: INCLUDE_VARS | Related to OS family include_vars: "OS_Family_{{ ansible_os_family }}.yml" - name: INCLUDE_VARS | Related to OS version include_vars: "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yml" - name: APT | Install PHP packages apt: pkg: "{{ item }}" state: present update_cache: yes cache_valid_time: 3600 with_flattened: - "{{ php_packages }}" - "{{ php_extra_packages }}" notify: restart php-fpm - name: INCLUDE | PHP-FPM include: fpm.yml when: php_install_fpm - name: LINEINFILE | PHP configuration lineinfile: dest: '{{ php_cli_ini }}' regexp: '^;?{{ item.key }}' line: '{{ item.key }} = {{ item.value }}' with_dict: "{{ php_ini_cli }}" - name: INCLUDE | Xdebug include: xdebug.yml - name: APT | Install and configure opcache include: opcache.yml