ansible-role-webserver/tasks/php.yml

44 lines
680 B
YAML

---
- name: Install php
package:
state: latest
name:
- php-fpm
- php-gd
- php-imap
- php-pgsql
- php-imagick
- php-intl
- name: enable extension
notify: restart php-fpm
lineinfile:
path: /etc/php/php.ini
regexp: ';extension={{ item }}'
line: "extension={{ item }}"
with_items:
- curl
- exif
- gd
- iconv
- imap
- intl
- pgsql
- pdo_pgsql
- mysqli
- pdo_mysql
- zip
- imagick
- name: enabled and started php-fpm
systemd:
name: php-fpm
enabled: yes
state: started
- name: templates php nginx
notify: reload nginx
template:
src: "php.nginx"
dest: "/etc/nginx/snippets/php.conf"