-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.yml
47 lines (43 loc) · 1005 Bytes
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
---
- name: Install php and its apache module
apt:
name:
- php
- php-mysqlnd
- php-mbstring
- php-gd
- php-cli
- php-pear
- php-xml
- php-gmp
- php-sqlite3
state: present
notify: restart apache
- name: Set php timezone
lineinfile:
path: "/etc/php/{{ php_version }}/apache2/php.ini"
insertbefore: ';date.timezone'
line: "date.timezone = {{ ntp_timezone }}"
notify: restart apache
- name: Enable modules
lineinfile:
path: "/etc/php/{{ php_version }}/apache2/php.ini"
regexp: "^;?extension\\s*=\\s*{{ item }}"
line: "extension={{ item }}"
loop:
- gmp
- gd
- mysqli
- gettext
- sqlite3
- pdo-mysql
- mbstring
notify: restart apache
- name: Enable short open tag
lineinfile:
path: "/etc/php/{{ php_version }}/apache2/php.ini"
regexp: '^short_open_tag\\s*='
line: "short_open_tag = On"
notify: restart apache
- name: Install composer
import_tasks: composer.yml