--- - name: Configure socket permission file: path: "{{ socket_directory }}" state: directory owner: "{{ system_user }}" group: "{{ nginx_system_user }}" mode: "u=rwx,g=rx" - name: Check if src is a directory file: path: "{{ src }}" state: directory owner: "{{ system_user }}" group: "{{ system_user }}" mode: "u=rwx,g=rx" - name: Configure pool in php-fpm template: src: pool.conf dest: "{{ phpfpm_pools_directory }}/{{ pool_name }}.conf" owner: root group: root mode: "u=rw,g=r,o=r" notify: "reload php-fpm"