--- - name: Configure socket permission file: path: "{{ socket_directory }}" state: directory owner: "{{ system_user }}" group: "{{ nginx_system_user }}" mode: "u=rwx,g=rx,o=" - name: Check if src is a directory file: path: "{{ src }}" state: directory owner: "{{ system_user }}" group: "{{ nginx_system_user }}" mode: "u=rwx,g=rx,o=" - 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" notify: "reload php-fpm"