--- - name: "PHPFPM | Create user" ansible.builtin.user: name: "{{ phpmyadmin_user }}" shell: /bin/false create_home: false password_lock: true - name: "PHPFPM | Add www-data to user group" ansible.builtin.user: name: www-data groups: "{{ phpmyadmin_user }}" append: true - name: "PHPFPM | Create log file" ansible.builtin.file: path: "{{ php_fpm_log_dir }}/{{ phpmyadmin_user }}.log" state: touch mode: "0644" owner: "{{ phpmyadmin_user }}" group: "{{ phpmyadmin_user }}" access_time: preserve modification_time: preserve - name: "PHPFPM | Create pool" ansible.builtin.template: src: fpmpool.j2 dest: "{{ php_fpm_pool_dir }}/{{ phpmyadmin_user }}.cfg" mode: "0644" notify: - stop php-fpm-socket - stop php-fpm-service - start php-fpm-socket - name: "PHPFPM | Create override directory" ansible.builtin.file: path: "/etc/systemd/system/php-fpm@{{ phpmyadmin_user }}.service.d" state: directory mode: "0755" - name: "PHPFPM | Copy override file" ansible.builtin.template: src: override.conf.j2 dest: "/etc/systemd/system/php-fpm@{{ phpmyadmin_user }}.service.d/override.conf" mode: "0644" notify: - stop php-fpm-socket - stop php-fpm-service - start php-fpm-socket - start php-fpm-service