ansible-role-webserver/tasks/php.yml

44 lines
711 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: '{{ webserver_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: "{{ webserver_php_service }}"
enabled: yes
state: started
- name: templates php nginx
notify: reload nginx
template:
src: "php.nginx"
dest: "/etc/nginx/snippets/php.conf"