--- - name: "PHPFPM | Create logfile" ansible.builtin.file: path: "{{ php_fpm_log_dir }}/{{ dmarcsrg_user }}.log" state: touch mode: "0644" owner: "{{ dmarcsrg_user }}" group: "{{ dmarcsrg_user }}" - name: "PHPFPM | Copy configuration" ansible.builtin.template: src: fpmpool.j2 dest: "/etc/php/{{ php_version.stdout }}/fpm/pool.d/{{ dmarcsrg_user }}.cfg" mode: "0644" notify: - stop php-fpm-socket - stop php-fpm-service - start php-fpm-socket - name: "PHPFPM | Create systemd override directory" ansible.builtin.file: path: "/etc/systemd/system/php-fpm@{{ dmarcsrg_user }}.service.d" state: directory mode: "0755" - name: "PHPFPM | Copy systemd override configuration" ansible.builtin.template: src: systemd/override.conf.j2 dest: "/etc/systemd/system/php-fpm@{{ dmarcsrg_user }}.service.d/override.conf" mode: "0644" notify: - stop php-fpm-socket - stop php-fpm-service - start php-fpm-socket - name: "PHPFPM | Enable systemd socket" ansible.builtin.systemd: name: "php-fpm@{{ dmarcsrg_user }}.socket" enabled: true state: started daemon_reload: true - name: "PHPFPM | Enable systemd service" ansible.builtin.systemd: name: "php-fpm@{{ dmarcsrg_user }}.service" enabled: true daemon-reload: true