-
Notifications
You must be signed in to change notification settings - Fork 0
/
raz-setup.yml
109 lines (109 loc) · 3.51 KB
/
raz-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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
---
- name: "Raz WordPress Setup & Optimization"
hosts: localhost
connection: local
tasks:
- name: Edit php post_max_size
ini_file:
path: /opt/bitnami/php/etc/php.ini
section: PHP
option: post_max_size
value: 2G
backup: true
become: true
- name: Edit php upload_max_filesize
ini_file:
path: /opt/bitnami/php/etc/php.ini
section: PHP
option: upload_max_filesize
value: 2G
backup: true
become: true
- name: Edit php memory_limit
ini_file:
path: /opt/bitnami/php/etc/php.ini
section: PHP
option: memory_limit
value: 256M
backup: true
become: true
- name: Edit php max_execution_time
ini_file:
path: /opt/bitnami/php/etc/php.ini
section: PHP
option: max_execution_time
value: '300'
backup: true
become: true
- name: Edit php max_input_vars
ini_file:
path: /opt/bitnami/php/etc/php.ini
section: PHP
option: max_input_vars
value: '3000'
backup: true
become: true
- name: Disable pagespeed.conf
replace:
path: /opt/bitnami/apache2/conf/httpd.conf
regexp: 'Include conf/pagespeed.conf'
replace: '#Include conf/pagespeed.conf'
backup: true
become: true
- name: Disable pagespeed_libraries.conf
replace:
path: /opt/bitnami/apache2/conf/httpd.conf
regexp: 'Include conf/pagespeed_libraries.conf'
replace: '#Include conf/pagespeed_libraries.conf'
backup: true
become: true
- name: Enable mod_expires
replace:
path: /opt/bitnami/apache2/conf/httpd.conf
regexp: '#LoadModule expires_module modules/mod_expires.so'
replace: 'LoadModule expires_module modules/mod_expires.so'
backup: true
become: true
- name: Enable mod_ext_filter
replace:
path: /opt/bitnami/apache2/conf/httpd.conf
regexp: '#LoadModule ext_filter_module modules/mod_ext_filter.so'
replace: 'LoadModule ext_filter_module modules/mod_ext_filter.so'
backup: true
become: true
- name: Enable mod_http2
replace:
path: /opt/bitnami/apache2/conf/httpd.conf
regexp: '#LoadModule http2_module modules/mod_http2.so'
replace: 'LoadModule http2_module modules/mod_http2.so'
backup: true
become: true
- name: Enable php extension imagick
replace:
path: /opt/bitnami/php/etc/php.ini
regexp: ';extension=imagick.so'
replace: 'extension=imagick.so'
backup: true
become: true
- name: Change ownership to bitnami:daemon for WordPress
shell:
cmd: "chown -R bitnami:daemon /opt/bitnami/wordpress"
warn: false
become: true
- name: Change directory permissions to 775
shell:
cmd: "find /opt/bitnami/wordpress -type d -print0 | xargs -0 chmod 775"
become: true
- name: Change file permissions to 664
shell:
cmd: "find /opt/bitnami/wordpress -type f -print0 | xargs -0 chmod 664"
become: true
- name: Flush pagespeed cache
file:
path: /opt/bitnami/apache2/var/cache/mod_pagespeed/cache.flush
state: touch
become: true
- name: Restart Bitnami
shell:
cmd: /opt/bitnami/ctlscript.sh restart
become: true