2022-06-09 15:15:49 +02:00
|
|
|
---
|
2023-01-16 15:22:30 +01:00
|
|
|
- name: "PHP | Kopiere angepasste Konfigurationsdateien"
|
|
|
|
ansible.builtin.template:
|
2022-06-09 15:15:49 +02:00
|
|
|
src: "{{ item }}.j2"
|
|
|
|
dest: "/etc/php/{{ php_version.stdout }}/mods-available/{{ item }}"
|
2023-01-16 15:22:30 +01:00
|
|
|
mode: 0644
|
2022-06-09 15:15:49 +02:00
|
|
|
loop:
|
|
|
|
- sao.ini
|
|
|
|
- sao-fpm.ini
|
|
|
|
|
2023-01-16 15:22:30 +01:00
|
|
|
- name: "PHP | Verlinke Apache Konfiguration"
|
|
|
|
ansible.builtin.file:
|
2022-06-09 15:15:49 +02:00
|
|
|
src: "/etc/php/{{ php_version.stdout }}/mods-available/sao.ini"
|
|
|
|
dest: "/etc/php/{{ php_version.stdout }}/apache2/conf.d/30-sao.ini"
|
|
|
|
state: link
|
|
|
|
when: "'libapache2-mod-php{{ php_version.stdout }}' in ansible_facts.packages"
|
|
|
|
notify: reload apache2
|
|
|
|
|
2023-01-16 15:22:30 +01:00
|
|
|
- name: "PHP | Verlinke cli Konfiguration"
|
|
|
|
ansible.builtin.file:
|
2022-06-09 15:15:49 +02:00
|
|
|
src: "/etc/php/{{ php_version.stdout }}/mods-available/sao.ini"
|
|
|
|
dest: "/etc/php/{{ php_version.stdout }}/cli/conf.d/30-sao.ini"
|
|
|
|
state: link
|
|
|
|
|
2023-01-16 15:22:30 +01:00
|
|
|
- name: "PHP | Erstelle Log-Verzeichnis"
|
|
|
|
ansible.builtin.file:
|
2022-08-18 08:40:39 +02:00
|
|
|
path: "{{ php_fpm_log_dir }}"
|
|
|
|
state: directory
|
2023-01-16 15:22:30 +01:00
|
|
|
mode: 0644
|
2022-08-18 08:40:39 +02:00
|
|
|
|
2023-01-16 15:22:30 +01:00
|
|
|
- name: "PHP | Verlinke FPM-Konfiguration"
|
|
|
|
ansible.builtin.file:
|
2022-06-09 15:15:49 +02:00
|
|
|
src: "/etc/php/{{ php_version.stdout }}/mods-available/sao-fpm.ini"
|
|
|
|
dest: "/etc/php/{{ php_version.stdout }}/fpm/conf.d/30-sao-fpm.ini"
|
|
|
|
state: link
|
|
|
|
when: "'php-fpm' in ansible_facts.packages"
|
|
|
|
notify: reload php-fpm
|
2022-08-18 08:40:39 +02:00
|
|
|
|
2023-01-16 15:22:30 +01:00
|
|
|
- name: "PHP | Kopiere Template für PHP-FPM systemd socket"
|
|
|
|
ansible.builtin.copy:
|
2022-08-18 08:40:39 +02:00
|
|
|
src: systemd/php-fpm@.socket
|
|
|
|
dest: /etc/systemd/system/php-fpm@.socket
|
2023-01-16 15:22:30 +01:00
|
|
|
mode: 0644
|
2022-08-18 08:40:39 +02:00
|
|
|
notify:
|
|
|
|
- stop php-fpm-socket
|
|
|
|
- stop php-fpm-service
|
|
|
|
- start php-fpm-socket
|
|
|
|
|
2023-01-16 15:22:30 +01:00
|
|
|
- name: "PHP | Kopiere Template für PHP-FPM systemd service"
|
|
|
|
ansible.builtin.template:
|
2022-08-18 08:40:39 +02:00
|
|
|
src: systemd/php-fpm@.service.j2
|
|
|
|
dest: /etc/systemd/system/php-fpm@.service
|
2023-01-16 15:22:30 +01:00
|
|
|
mode: 0644
|
2022-08-18 08:40:39 +02:00
|
|
|
notify:
|
|
|
|
- stop php-fpm-socket
|
|
|
|
- stop php-fpm-service
|
|
|
|
- start php-fpm-socket
|