Erstelle php-playbook, Passe Rolle an
This commit is contained in:
parent
fa45f23f5e
commit
700457660c
5 changed files with 30 additions and 13 deletions
|
@ -1,2 +1 @@
|
||||||
---
|
---
|
||||||
php_version: 7.3
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
---
|
---
|
||||||
|
|
||||||
- name: reload apache2
|
- name: reload apache2
|
||||||
service:
|
service:
|
||||||
name: apache2
|
name: apache2
|
||||||
|
|
|
@ -3,8 +3,8 @@ galaxy_info:
|
||||||
description: Role to install PHP
|
description: Role to install PHP
|
||||||
company: Sense.Lab e.V.
|
company: Sense.Lab e.V.
|
||||||
license: GPLv3
|
license: GPLv3
|
||||||
min_ansible_version: 2.1
|
min_ansible_version: 2.9
|
||||||
platforms:
|
platforms:
|
||||||
- name: Debian
|
- name: Debian
|
||||||
versions:
|
versions:
|
||||||
- Buster
|
- Bullseye
|
|
@ -6,13 +6,32 @@
|
||||||
- name: "Installiere Pakete"
|
- name: "Installiere Pakete"
|
||||||
apt:
|
apt:
|
||||||
pkg:
|
pkg:
|
||||||
|
- php
|
||||||
- php-apcu
|
- php-apcu
|
||||||
- php-fpm
|
- php-fpm
|
||||||
- php-zip
|
- php-zip
|
||||||
|
|
||||||
- name: "Kopiere Konfiguration"
|
- name: "Ermmittle PHP-Version"
|
||||||
|
shell:
|
||||||
|
cmd: php -v | grep -Po '(?<=PHP )([0-9.]{3})'
|
||||||
|
register: php_version
|
||||||
|
changed_when: false
|
||||||
|
|
||||||
|
- name: "Kopiere angepasste Konfiguration"
|
||||||
template:
|
template:
|
||||||
src: 30-sao.ini.j2
|
src: sao.ini.j2
|
||||||
dest: "/etc/php/{{ php_version }}/apache2/conf.d/30-sao.ini"
|
dest: "/etc/php/{{ php_version.stdout }}/mods-available/sao.ini"
|
||||||
when: "'apache2' in ansible_facts.packages"
|
|
||||||
|
- 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"
|
||||||
notify: reload apache2
|
notify: reload apache2
|
|
@ -22,7 +22,7 @@ apc.rfc1867 = 1
|
||||||
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
|
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" %}
|
{% 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
|
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 %}
|
{% elif inventory_hostname == "kameradisten.ramus" %}
|
||||||
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
|
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 %}
|
{% endif %}
|
||||||
|
|
Loading…
Reference in a new issue