2021-06-12 19:39:41 +02:00
|
|
|
---
|
|
|
|
- name: "Sammle Package Fakten"
|
|
|
|
package_facts:
|
|
|
|
manager: apt
|
|
|
|
|
|
|
|
- name: "Installiere Pakete"
|
|
|
|
apt:
|
|
|
|
pkg:
|
2022-01-14 23:32:15 +01:00
|
|
|
- php
|
2021-06-12 19:39:41 +02:00
|
|
|
- php-apcu
|
|
|
|
- php-fpm
|
|
|
|
- php-zip
|
|
|
|
|
2022-01-14 23:32:15 +01:00
|
|
|
- name: "Ermmittle PHP-Version"
|
|
|
|
shell:
|
|
|
|
cmd: php -v | grep -Po '(?<=PHP )([0-9.]{3})'
|
|
|
|
register: php_version
|
|
|
|
changed_when: false
|
|
|
|
|
|
|
|
- name: "Kopiere angepasste Konfiguration"
|
2021-06-12 19:39:41 +02:00
|
|
|
template:
|
2022-01-14 23:32:15 +01:00
|
|
|
src: sao.ini.j2
|
|
|
|
dest: "/etc/php/{{ php_version.stdout }}/mods-available/sao.ini"
|
|
|
|
|
|
|
|
- name: "Verlinke cli Konfiguration"
|
|
|
|
file:
|
|
|
|
src: "/etc/php/{{ php_version.stdout }}/mods-available/sao.ini"
|
|
|
|
dest: "/etc/php/{{ php_version.stdout }}/cli/conf.d/30-sao.ini"
|
|
|
|
state: link
|
|
|
|
|
|
|
|
- name: "Verlinke Apache Konfiguration"
|
|
|
|
file:
|
|
|
|
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"
|
2022-01-22 18:43:11 +01:00
|
|
|
notify: reload apache2
|
|
|
|
|
|
|
|
- name: "Verlinke FPM-Konfiguration"
|
|
|
|
file:
|
|
|
|
src: "/etc/php/{{ php_version.stdout }}/mods-available/sao.ini"
|
|
|
|
dest: "/etc/php/{{ php_version.stdout }}/fpm/conf.d/30-sao.ini"
|
|
|
|
state: link
|
|
|
|
when: "'php-fpm' in ansible_facts.packages"
|
|
|
|
notify: reload php-fpm
|