--- - name: Install required packages apt: name: - "{{ phpfpm_package }}" state: present - name: Remove default php-fpm pool file: path: "{{ phpfpm_pools_directory }}/www.conf" state: absent notify: reload php-fpm - name: Create sockets directory file: path: "{{ phpfpm_sockets_directory }}" state: directory owner: root group: root mode: "u=rwx,g=rx,o=rx" - name: Configure php-fpm lineinfile: path: "{{ phpfpm_php_ini }}" state: present regexp: "^;?{{ item.key | regex_escape() }}=" line: "{{ item.key }}={{ item.value }}" with_dict: opcache.enable: 1 opcache.enable_cli: 1 opcache.memory_consumption: 128 opcache.interned_strings_buffer: 8 opcache.max_accelerated_files: 10000 opcache.revalidate_freq: 1 opcache.save_comments: 1 notify: reload php-fpm