ansible-role-nextcloud/tasks/php.yml

33 lines
913 B
YAML

---
- name: "PHP | Erstelle FPM-Pool| {{ item.name }}"
ansible.builtin.template:
src: php_fpm_pool.j2
dest: "/etc/php/{{ php_version.stdout }}/fpm/pool.d/{{ item.user }}.cfg"
owner: root
group: root
mode: "0644"
notify:
- stop php-fpm-socket
- stop php-fpm-service
- start php-fpm-socket
- name: "PHP | Erstelle Log-Datei | {{ item.name }}"
ansible.builtin.file:
path: "{{ php_fpm_log_dir }}/{{ item.user }}.log"
state: touch
owner: "{{ item.user }}"
group: "{{ item.user }}"
mode: "0644"
- name: "PHP | Aktiviere systemd Socket | {{ item.name }}"
ansible.builtin.systemd:
name: "php-fpm@{{ item.user }}.socket"
enabled: true
state: started
daemon_reload: true
- name: "PHP | Aktiviere systemd Service | {{ item.name }}"
ansible.builtin.systemd:
name: "php-fpm@{{ item.user }}.service"
enabled: true
daemon-reload: true