ansible-role-webserver/tasks/php.yml

44 lines
711 B
YAML
Raw Permalink Normal View History

2020-07-22 01:50:30 +02:00
---
- name: Install php
package:
state: latest
name:
- php-fpm
- php-gd
- php-imap
2020-07-22 19:49:32 +02:00
- php-pgsql
2020-07-24 18:41:14 +02:00
- php-imagick
- php-intl
2020-07-22 01:50:30 +02:00
- name: enable extension
notify: restart php-fpm
lineinfile:
path: '{{ webserver_php_ini }}'
2020-07-22 01:50:30 +02:00
regexp: ';extension={{ item }}'
line: "extension={{ item }}"
with_items:
- curl
2020-07-24 18:41:14 +02:00
- exif
2020-07-22 01:50:30 +02:00
- gd
2020-07-24 18:41:14 +02:00
- iconv
2020-07-22 01:50:30 +02:00
- imap
2020-07-24 18:41:14 +02:00
- intl
2020-07-22 19:49:32 +02:00
- pgsql
- pdo_pgsql
2020-07-22 01:50:30 +02:00
- mysqli
- pdo_mysql
- zip
2020-07-24 18:41:14 +02:00
- imagick
2020-07-22 01:50:30 +02:00
- name: enabled and started php-fpm
systemd:
name: "{{ webserver_php_service }}"
2020-07-22 01:50:30 +02:00
enabled: yes
state: started
- name: templates php nginx
notify: reload nginx
template:
src: "php.nginx"
dest: "/etc/nginx/snippets/php.conf"