-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.yml
72 lines (62 loc) · 1.44 KB
/
setup.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
- hosts: all
become: true
vars:
packages:
- git
- zlib-devel
- curl-devel
- mysql-devel
php_packages:
- php70
- php70-devel
- php70-cli
- php70-common
- php70-mbstring
- php70-gd
- php70-gmp
- php70-mcrypt
- php70-xml
- php70-imap
- php70-intl
- php70-mysqlnd
- php70-pdo
- php70-opcache
php_ini_replacements:
- regexp: 'expose_php *= *On'
replace: 'expose_php = Off'
- regexp: 'post_max_size *= *8M'
replace: 'post_max_size = 16M'
tasks:
- name: set timezone to Asia/Tokyo
timezone:
name: Asia/Tokyo
- name: install packages
yum: name={{ item }} state=installed
with_items: "{{ packages }}"
- name: install php packages
yum: name={{ item }} state=installed
with_items: "{{ php_packages }}"
- name: edit php.ini
replace:
dest: /etc/php.ini
backup: yes
regexp: '{{ item.regexp}}'
replace: '{{ item.replace }}'
with_items: "{{ php_ini_replacements }}"
- include: tasks/php-wpcli.yml
- include: tasks/php-composer.yml
- name: copy httpd.conf
copy:
src: etc/httpd.conf
dest: /etc/httpd/conf/httpd.conf
notify: httpd restart
- name: enable httpd service
service:
name: httpd
enabled: yes
state: started
handlers:
- name: httpd restart
service:
name: httpd
state: restarted