-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathall.yml
268 lines (235 loc) · 9.19 KB
/
all.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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
---
###########################################################################
### System Vars
###########################################################################
system__check_memory_min_required: "{{ system_check_memory_min_required | default('true') }}"
system__memory_min_required: 2
system__locales:
- 'en_US.UTF-8'
- 'pt_BR.UTF-8'
system__locale: "{{ system_locale | default('pt_BR.UTF-8') }}"
system__language: "{{ system_language | default('pt_BR.UTF-8') }}"
system__time_zone: "{{ system_time_zone | default('America/Sao_Paulo') }}"
###########################################################################
### PHP-FPM Vars
###########################################################################
php__apt_repo: ppa:ondrej/php
php__version: "{{ php_version | default('8.0') }}"
php__config_fpm_php_ini:
- option: memory_limit
value: '1024M'
- option: upload_max_filesize
value: '2048M'
- option: post_max_size
value: '2048M'
- option: max_execution_time
value: '300'
php__config_fpm_pool_www_conf:
- option: request_terminate_timeout
value: '300'
php__config_path: "/etc/php/{{ php__version }}/fpm"
###########################################################################
### Composer Vars
###########################################################################
# 2.1.5
# 2.2.11
# 2.3.5
composer__version: "{{ composer_version | default('2.3.5') }}"
###########################################################################
### i-Educar Vars
###########################################################################
ieducar__url_repository: "{{ ieducar_url_repository | default('https://github.com/portabilis/i-educar.git') }}"
ieducar__version: "{{ ieducar_version | default('2.7.2') }}"
ieducar__run_user: "{{ ansible_user|lower if ansible_user != 'root' else 'deployer' }}"
ieducar__deployment_type: "{{ ieducar_deployment_type | default('ieducar-ce') }}"
ieducar__install_reports_package_community_edition: "{{ ieducar_install_reports_package_community_edition | default('true') }}"
ieducar__version_reports_package_community_edition: "{{ ieducar_version_reports_package_community_edition | default('2.7') }}"
ieducar__url_repository_reports_package_community_edition: "{{ ieducar__url_repository_reports_package_community_edition | default('https://github.com/portabilis/i-educar-reports-package.git') }}"
ieducar__base_path: "{{ ieducar_base_path | default('/var/www/ieducar') }}"
ieducar__postgresql_users:
- {
name: "{{ ieducar_db_username | default('ieducar') }}",
password: "{{ ieducar_db_password | default('ieducar') }}",
encrypted: yes,
expires: 'infinity',
state: 'present',
role_attr_flags: Superuser,
db: "{{ ieducar_db_database | default('ieducar') }}"
}
ieducar__postgresql_databases:
- {
name: "{{ ieducar_db_database | default('ieducar') }}",
lc_collate: 'pt_BR.UTF-8',
lc_ctype: 'pt_BR.UTF-8',
encoding: 'UTF-8',
template: 'template0',
owner: "{{ ieducar_db_username | default('ieducar') }}",
extension: [], # check that you have installed then needed extension module before
state: 'present'
}
#
# Accepted values in ieducar__conf_nginx
#
# ieducar-with-domain-and-ssl.conf
# ieducar-with-domain-without-ssl.conf
# ieducar-without-domain-and-without-ssl.conf
ieducar__conf_nginx: "{{ ieducar_conf_nginx | default('ieducar-without-domain-and-without-ssl.conf') }}"
ieducar__with_domain: "{{ ieducar_with_domain | default('false') }}"
ieducar__name_domain: "{{ ieducar_name_domain | default('_') }}"
###########################################################################
### PostgreSQL Vars
###########################################################################
postgresql__version: "{{ postgresql_version | default(14) }}"
postgresql__gpg_url: https://www.postgresql.org/media/keys/ACCC4CF8.asc
postgresql__apt_repo: "deb http://apt.postgresql.org/pub/repos/apt/ {{ ansible_distribution_release }}-pgdg main"
postgresql__extensions: []
postgresql__psycopg2: python3-psycopg2
postgresql__recreate_cluster: "{{ postgresql_recreate_cluster | default('true') }}"
postgresql__encoding: "{{ postgresql_encoding | default('UTF-8') }}"
postgresql__locale: "{{ postgresql_locale | default('pt_BR.UTF-8') }}"
postgresql__user: "postgres"
postgresql__group: "postgres"
postgresql__global_conf_options:
- option: listen_addresses
value: '*'
- option: log_min_duration_statement
value: 1000
# Check doc: https://www.pgbouncer.org/config.html
# Check: https://pgtune.leopard.in.ua/#/
- option: max_connections
value: 250
- option: shared_buffers
value: 256MB
- option: effective_cache_size
value: 768MB
- option: maintenance_work_mem
value: 64MB
- option: checkpoint_completion_target
value: 0.9
- option: wal_buffers
value: 7864kB
- option: default_statistics_target
value: 100
- option: random_page_cost
value: 1.1
- option: effective_io_concurrency
value: 200
- option: work_mem
value: 524kB
- option: min_wal_size
value: 1GB
- option: max_wal_size
value: 4GB
postgresql__global_conf_options_2gram_2cpv:
- option: listen_addresses
value: '*'
- option: log_min_duration_statement
value: 1000
# Check doc: https://www.pgbouncer.org/config.html
# Check: https://pgtune.leopard.in.ua/#/
- option: max_connections
value: 250
- option: shared_buffers
value: 512MB
- option: effective_cache_size
value: 1536MB
- option: maintenance_work_mem
value: 128MB
- option: checkpoint_completion_target
value: 0.9
- option: wal_buffers
value: 16MB
- option: default_statistics_target
value: 100
- option: random_page_cost
value: 1.1
- option: effective_io_concurrency
value: 200
- option: work_mem
value: 2097kB
- option: min_wal_size
value: 1GB
- option: max_wal_size
value: 4GB
- option: max_worker_processes
value: 2
- option: max_parallel_workers_per_gather
value: 1
- option: max_parallel_workers
value: 2
- option: max_parallel_maintenance_workers
value: 1
postgresql__pg_hba_entries:
- { type: local, database: all, user: postgres, address: '', auth_method: peer }
- { type: local, database: all, user: all, address: '', auth_method: peer }
- { type: host, database: all, user: all, address: '127.0.0.1/32', auth_method: md5 }
- { type: host, database: all, user: all, address: all, auth_method: md5 }
- { type: host, database: all, user: all, address: '::1/128', auth_method: md5 }
# starting version 10 there is replication role
- { type: local, database: replication, user: all, address: '', auth_method: peer }
- { type: host, database: replication, user: all, address: '127.0.0.1/32', auth_method: md5 }
- { type: host, database: replication, user: all, address: '::1/128', auth_method: md5 }
postgresql__users:
- {
name: "postgres",
password: "postgres",
encrypted: yes,
expires: 'infinity',
state: 'present',
role_attr_flags: Superuser, Create role, Create DB, Replication, Bypass RLS,
db: postgres
}
- {
name: "test",
password: "supersecure",
encrypted: yes,
expires: 'infinity',
state: 'present',
db: test
}
postgresql__databases:
- {
name: test,
lc_collate: 'pt_BR.UTF-8',
lc_ctype: 'pt_BR.UTF-8',
encoding: 'UTF-8',
template: 'template0',
owner: test,
extension: [], # check that you have installed then needed extension module before
state: 'present'
}
postgresql__bin_path: "/usr/lib/postgresql/{{ postgresql_version }}/bin"
postgresql__data_work_dir: "/var/lib/postgresql/{{ postgresql_version }}/main"
postgresql__install_base_path: "/etc/postgresql/{{ postgresql_version }}/main"
###########################################################################
### NGINX Vars
###########################################################################
nginx__config_path: "{{ nginx_config_path | default('/etc/nginx') }}"
nginx__deploy_path: "{{ nginx_deploy_path | default('/var/www/html') }}"
nginx__configs:
- option: worker_connections
value: 1024
- option: client_body_buffer_size
value: 64k
- option: client_max_body_size
value: 100m
- option: client_body_in_single_buffer
value: on
- option: client_header_buffer_size
value: 1m
- option: large_client_header_buffers
value: 4 8k
###########################################################################
### LetsEncrypt Vars
###########################################################################
#
# See for evolution: https://graspingtech.com/ansible-lets-encrypt
#
letsencrypt__ssl: "{{ letsencrypt_ssl | default('false') }}"
letsencrypt__base_path: /etc/letsencrypt
letsencrypt__webroot_path: "/var/www/html | default('/usr/share/nginx/html')"
letsencrypt__cert_name: /etc/ssl
letsencrypt__email: "{{ letsencrypt__email | default('ieducar@ieducar.example.com') }}"
# sudo certbot certonly --webroot -w /var/www/html
# --non-interactive --agree-tos --cert-name "$DIRETORIO_CERTIFICADO"
# -d "$DOMINIO" -m "$EMAIL_LETSENCRYPT" --redirect