mirror of https://dev.ccchb.de/ccchb/ansible.git
roles: Add php (for debian)
This commit is contained in:
parent
1bcada7ffe
commit
fcf03aaea7
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
php_version: "7.3"
|
||||
php_config: []
|
||||
php_fpm_env: []
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
- name: restart php-fpm
|
||||
systemd:
|
||||
name: "php{{ php_version }}-fpm"
|
||||
state: restarted
|
|
@ -0,0 +1,40 @@
|
|||
---
|
||||
- name: Install php
|
||||
notify: restart php-fpm
|
||||
package:
|
||||
name:
|
||||
- php-apcu
|
||||
- php-bcmath
|
||||
- php-cgi
|
||||
- php-cli
|
||||
- php-curl
|
||||
- php-dev
|
||||
- php-fpm
|
||||
- php-gd
|
||||
- php-gmp
|
||||
- php-mbstring
|
||||
- php-mysql
|
||||
- php-imagick
|
||||
- php-intl
|
||||
- php-redis
|
||||
- php-pspell
|
||||
- php-xmlrpc
|
||||
- php-zip
|
||||
state: latest
|
||||
|
||||
- name: set php config
|
||||
notify: restart php-fpm
|
||||
lineinfile:
|
||||
path: "/etc/php/{{ php_version }}/fpm/php.ini"
|
||||
regex: "^{{item.key}}\\s+=.*"
|
||||
line: "{{ item.key }} = {{ item.value }}"
|
||||
with_items: "{{ php_config }}"
|
||||
|
||||
- name: set php-fpm config
|
||||
notify: restart php-fpm
|
||||
lineinfile:
|
||||
path: "/etc/php/{{ php_version }}/fpm/pool.d/www.conf"
|
||||
regex: '^env\[{{item.key}}\]\s+=.*'
|
||||
line: "env[{{ item.key }}] = {{ item.value }}"
|
||||
create: yes
|
||||
with_items: "{{ php_fpm_env }}"
|
Loading…
Reference in New Issue