ansible-role-webserver/tasks/php.yml

35 lines
567 B
YAML
Raw Normal View History

2020-07-22 01:50:30 +02:00
---
- name: Install php
package:
state: latest
name:
- php-fpm
- php-gd
- php-imap
- name: enable extension
notify: restart php-fpm
lineinfile:
path: /etc/php/php.ini
regexp: ';extension={{ item }}'
line: "extension={{ item }}"
with_items:
- curl
- gd
- imap
- mysqli
- pdo_mysql
- zip
- 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"