ansible-role-nextcloud/tasks/php.yml

36 lines
971 B
YAML
Raw Normal View History

2020-12-03 15:52:14 +01:00
---
- name: "PHP | Erstelle FPM-Pool| {{ item.name }}"
ansible.builtin.template:
2020-12-03 15:52:14 +01:00
src: php_fpm_pool.j2
dest: "/etc/php/{{ php_version.stdout }}/fpm/pool.d/{{ item.user }}.cfg"
2020-12-03 15:52:14 +01:00
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"
access_time: preserve
modification_time: preserve
- 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