35 lines
567 B
YAML
35 lines
567 B
YAML
|
---
|
||
|
- 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"
|