Verschiebe php-Kram in extra Rolle

This commit is contained in:
phil 2021-06-12 19:39:41 +02:00
commit 51d94d1ca5
5 changed files with 72 additions and 0 deletions

2
defaults/main.yml Normal file
View file

@ -0,0 +1,2 @@
---
php_version: 7.3

6
handlers/main.yml Normal file
View file

@ -0,0 +1,6 @@
---
- name: reload apache2
service:
name: apache2
state: reloaded

10
meta/main.yml Normal file
View file

@ -0,0 +1,10 @@
galaxy_info:
author: systemausfall.org
description: Role to install PHP
company: Sense.Lab e.V.
license: GPLv3
min_ansible_version: 2.1
platforms:
- name: Debian
versions:
- Buster

18
tasks/main.yml Normal file
View file

@ -0,0 +1,18 @@
---
- name: "Sammle Package Fakten"
package_facts:
manager: apt
- name: "Installiere Pakete"
apt:
pkg:
- php-apcu
- php-fpm
- php-zip
- name: "Kopiere Konfiguration"
template:
src: 30-sao.ini.j2
dest: "/etc/php/{{ php_version }}/apache2e2/conf.d/30-sao.ini"
when: "'apache2' in ansible_facts.packages"
notify: reload apache2

36
templates/30-sao.ini.j2 Normal file
View file

@ -0,0 +1,36 @@
{% if inventory_hostname == "wwwusers-ng.sao" %}
file_uploads = on
max_execution_time=120
max_input_time=120
post_max_size=16M
upload_max_filesize=16M
SMTP=mail-postfix.sao
{% else %}
upload_max_filesize = 15M
post_max_size = 15M
memory_limit = 192M
max_execution_time = 300
{% endif %}
date.timezone = Europe/Berlin
default_charset = "UTF-8"
;Upload-Fortschritt
apc.rfc1867 = 1
{% if inventory_hostname == "webmail-horde.sao" %}
disable_functions = pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_exec,passthru,system,proc_get_status,proc_close,proc_nice,proc_terminate,proc_open,curl_ini,parse_ini_file,show_source,dl,symlink,mail,system_exec,exec,shell_exec,phpinfo
{% elif inventory_hostname == "wwwusers-ng.sao" %}
disable_functions = pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_exec,passthru,system,proc_get_status,proc_close,proc_nice,proc_terminate,proc_open,curl_ini,show_source,dl,symlink,system_exec,exec,shell_exec,phpinfo
{% else %}
disable_functions = pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_exec,passthru,system,proc_get_status,proc_close,proc_nice,proc_terminate,proc_open,curl_ini,parse_ini_file,show_source,dl,symlink,system_exec,exec,shell_exec,phpinfo
{% endif %}
error_log = /var/log/php.log
display_errors = Off
;Empfohlene Einstellungen (pcc)
allow_url_fopen = Off
assert.active = Off
mail.add_x_header = Off
session.use_strict_mode = 1