Bladeren bron

creating domain list for letsencrypt dynamically. some other small fixes.

Thomas Buck 3 jaren geleden
bovenliggende
commit
e6bd74153d

+ 9
- 0
roles/blog/tasks/blog.yml Bestand weergeven

@@ -35,6 +35,15 @@
35 35
   notify: restart apache
36 36
   when: ansible_distribution_version == '10'
37 37
 
38
+- name: Setup PHP config
39
+  template:
40
+    src=etc_php_7.4_apache2_php.ini.j2
41
+    dest=/etc/php/7.4/apache2/php.ini
42
+    owner=root
43
+    group=root
44
+  notify: restart apache
45
+  when: ansible_distribution_version == '11'
46
+
38 47
 - name: Add custom postgres user
39 48
   postgresql_user:
40 49
     login_host=localhost

+ 1947
- 0
roles/blog/templates/etc_php_7.4_apache2_php.ini.j2
Diff onderdrukt omdat het te groot bestand
Bestand weergeven


+ 691
- 0
roles/common/files/etc_postgresql_11_main_postgresql.conf Bestand weergeven

@@ -0,0 +1,691 @@
1
+# -----------------------------
2
+# PostgreSQL configuration file
3
+# -----------------------------
4
+#
5
+# This file consists of lines of the form:
6
+#
7
+#   name = value
8
+#
9
+# (The "=" is optional.)  Whitespace may be used.  Comments are introduced with
10
+# "#" anywhere on a line.  The complete list of parameter names and allowed
11
+# values can be found in the PostgreSQL documentation.
12
+#
13
+# The commented-out settings shown in this file represent the default values.
14
+# Re-commenting a setting is NOT sufficient to revert it to the default value;
15
+# you need to reload the server.
16
+#
17
+# This file is read on server startup and when the server receives a SIGHUP
18
+# signal.  If you edit the file on a running system, you have to SIGHUP the
19
+# server for the changes to take effect, run "pg_ctl reload", or execute
20
+# "SELECT pg_reload_conf()".  Some parameters, which are marked below,
21
+# require a server shutdown and restart to take effect.
22
+#
23
+# Any parameter can also be given as a command-line option to the server, e.g.,
24
+# "postgres -c log_connections=on".  Some parameters can be changed at run time
25
+# with the "SET" SQL command.
26
+#
27
+# Memory units:  kB = kilobytes        Time units:  ms  = milliseconds
28
+#                MB = megabytes                     s   = seconds
29
+#                GB = gigabytes                     min = minutes
30
+#                TB = terabytes                     h   = hours
31
+#                                                   d   = days
32
+
33
+
34
+#------------------------------------------------------------------------------
35
+# FILE LOCATIONS
36
+#------------------------------------------------------------------------------
37
+
38
+# The default values of these variables are driven from the -D command-line
39
+# option or PGDATA environment variable, represented here as ConfigDir.
40
+
41
+data_directory = '/var/lib/postgresql/11/main'		# use data in another directory
42
+					# (change requires restart)
43
+hba_file = '/etc/postgresql/11/main/pg_hba.conf'	# host-based authentication file
44
+					# (change requires restart)
45
+ident_file = '/etc/postgresql/11/main/pg_ident.conf'	# ident configuration file
46
+					# (change requires restart)
47
+
48
+# If external_pid_file is not explicitly set, no extra PID file is written.
49
+external_pid_file = '/var/run/postgresql/11-main.pid'			# write an extra PID file
50
+					# (change requires restart)
51
+
52
+
53
+#------------------------------------------------------------------------------
54
+# CONNECTIONS AND AUTHENTICATION
55
+#------------------------------------------------------------------------------
56
+
57
+# - Connection Settings -
58
+
59
+#listen_addresses = 'localhost'		# what IP address(es) to listen on;
60
+					# comma-separated list of addresses;
61
+					# defaults to 'localhost'; use '*' for all
62
+					# (change requires restart)
63
+port = 5432				# (change requires restart)
64
+max_connections = 100			# (change requires restart)
65
+#superuser_reserved_connections = 3	# (change requires restart)
66
+unix_socket_directories = '/var/run/postgresql'	# comma-separated list of directories
67
+					# (change requires restart)
68
+#unix_socket_group = ''			# (change requires restart)
69
+#unix_socket_permissions = 0777		# begin with 0 to use octal notation
70
+					# (change requires restart)
71
+#bonjour = off				# advertise server via Bonjour
72
+					# (change requires restart)
73
+#bonjour_name = ''			# defaults to the computer name
74
+					# (change requires restart)
75
+
76
+# - TCP Keepalives -
77
+# see "man 7 tcp" for details
78
+
79
+#tcp_keepalives_idle = 0		# TCP_KEEPIDLE, in seconds;
80
+					# 0 selects the system default
81
+#tcp_keepalives_interval = 0		# TCP_KEEPINTVL, in seconds;
82
+					# 0 selects the system default
83
+#tcp_keepalives_count = 0		# TCP_KEEPCNT;
84
+					# 0 selects the system default
85
+
86
+# - Authentication -
87
+
88
+#authentication_timeout = 1min		# 1s-600s
89
+#password_encryption = md5		# md5 or scram-sha-256
90
+#db_user_namespace = off
91
+
92
+# GSSAPI using Kerberos
93
+#krb_server_keyfile = ''
94
+#krb_caseins_users = off
95
+
96
+# - SSL -
97
+
98
+#ssl = on
99
+#ssl_ca_file = ''
100
+#ssl_cert_file = '/etc/ssl/certs/ssl-cert-snakeoil.pem'
101
+#ssl_crl_file = ''
102
+#ssl_key_file = '/etc/ssl/private/ssl-cert-snakeoil.key'
103
+#ssl_ciphers = 'HIGH:MEDIUM:+3DES:!aNULL' # allowed SSL ciphers
104
+#ssl_prefer_server_ciphers = on
105
+#ssl_ecdh_curve = 'prime256v1'
106
+#ssl_dh_params_file = ''
107
+#ssl_passphrase_command = ''
108
+#ssl_passphrase_command_supports_reload = off
109
+
110
+
111
+#------------------------------------------------------------------------------
112
+# RESOURCE USAGE (except WAL)
113
+#------------------------------------------------------------------------------
114
+
115
+# - Memory -
116
+
117
+shared_buffers = 128MB			# min 128kB
118
+					# (change requires restart)
119
+#huge_pages = try			# on, off, or try
120
+					# (change requires restart)
121
+#temp_buffers = 8MB			# min 800kB
122
+#max_prepared_transactions = 0		# zero disables the feature
123
+					# (change requires restart)
124
+# Caution: it is not advisable to set max_prepared_transactions nonzero unless
125
+# you actively intend to use prepared transactions.
126
+#work_mem = 4MB				# min 64kB
127
+#maintenance_work_mem = 64MB		# min 1MB
128
+#autovacuum_work_mem = -1		# min 1MB, or -1 to use maintenance_work_mem
129
+#max_stack_depth = 2MB			# min 100kB
130
+dynamic_shared_memory_type = posix	# the default is the first option
131
+					# supported by the operating system:
132
+					#   posix
133
+					#   sysv
134
+					#   windows
135
+					#   mmap
136
+					# use none to disable dynamic shared memory
137
+					# (change requires restart)
138
+
139
+# - Disk -
140
+
141
+#temp_file_limit = -1			# limits per-process temp file space
142
+					# in kB, or -1 for no limit
143
+
144
+# - Kernel Resources -
145
+
146
+#max_files_per_process = 1000		# min 25
147
+					# (change requires restart)
148
+
149
+# - Cost-Based Vacuum Delay -
150
+
151
+#vacuum_cost_delay = 0			# 0-100 milliseconds
152
+#vacuum_cost_page_hit = 1		# 0-10000 credits
153
+#vacuum_cost_page_miss = 10		# 0-10000 credits
154
+#vacuum_cost_page_dirty = 20		# 0-10000 credits
155
+#vacuum_cost_limit = 200		# 1-10000 credits
156
+
157
+# - Background Writer -
158
+
159
+#bgwriter_delay = 200ms			# 10-10000ms between rounds
160
+#bgwriter_lru_maxpages = 100		# max buffers written/round, 0 disables
161
+#bgwriter_lru_multiplier = 2.0		# 0-10.0 multiplier on buffers scanned/round
162
+#bgwriter_flush_after = 512kB		# measured in pages, 0 disables
163
+
164
+# - Asynchronous Behavior -
165
+
166
+#effective_io_concurrency = 1		# 1-1000; 0 disables prefetching
167
+#max_worker_processes = 8		# (change requires restart)
168
+#max_parallel_maintenance_workers = 2	# taken from max_parallel_workers
169
+#max_parallel_workers_per_gather = 2	# taken from max_parallel_workers
170
+#parallel_leader_participation = on
171
+#max_parallel_workers = 8		# maximum number of max_worker_processes that
172
+					# can be used in parallel operations
173
+#old_snapshot_threshold = -1		# 1min-60d; -1 disables; 0 is immediate
174
+					# (change requires restart)
175
+#backend_flush_after = 0		# measured in pages, 0 disables
176
+
177
+
178
+#------------------------------------------------------------------------------
179
+# WRITE-AHEAD LOG
180
+#------------------------------------------------------------------------------
181
+
182
+# - Settings -
183
+
184
+#wal_level = replica			# minimal, replica, or logical
185
+					# (change requires restart)
186
+#fsync = on				# flush data to disk for crash safety
187
+					# (turning this off can cause
188
+					# unrecoverable data corruption)
189
+#synchronous_commit = on		# synchronization level;
190
+					# off, local, remote_write, remote_apply, or on
191
+#wal_sync_method = fsync		# the default is the first option
192
+					# supported by the operating system:
193
+					#   open_datasync
194
+					#   fdatasync (default on Linux and FreeBSD)
195
+					#   fsync
196
+					#   fsync_writethrough
197
+					#   open_sync
198
+#full_page_writes = on			# recover from partial page writes
199
+#wal_compression = off			# enable compression of full-page writes
200
+#wal_log_hints = off			# also do full page writes of non-critical updates
201
+					# (change requires restart)
202
+#wal_buffers = -1			# min 32kB, -1 sets based on shared_buffers
203
+					# (change requires restart)
204
+#wal_writer_delay = 200ms		# 1-10000 milliseconds
205
+#wal_writer_flush_after = 1MB		# measured in pages, 0 disables
206
+
207
+#commit_delay = 0			# range 0-100000, in microseconds
208
+#commit_siblings = 5			# range 1-1000
209
+
210
+# - Checkpoints -
211
+
212
+#checkpoint_timeout = 5min		# range 30s-1d
213
+max_wal_size = 1GB
214
+min_wal_size = 80MB
215
+#checkpoint_completion_target = 0.5	# checkpoint target duration, 0.0 - 1.0
216
+#checkpoint_flush_after = 256kB		# measured in pages, 0 disables
217
+#checkpoint_warning = 30s		# 0 disables
218
+
219
+# - Archiving -
220
+
221
+#archive_mode = off		# enables archiving; off, on, or always
222
+				# (change requires restart)
223
+#archive_command = ''		# command to use to archive a logfile segment
224
+				# placeholders: %p = path of file to archive
225
+				#               %f = file name only
226
+				# e.g. 'test ! -f /mnt/server/archivedir/%f && cp %p /mnt/server/archivedir/%f'
227
+#archive_timeout = 0		# force a logfile segment switch after this
228
+				# number of seconds; 0 disables
229
+
230
+
231
+#------------------------------------------------------------------------------
232
+# REPLICATION
233
+#------------------------------------------------------------------------------
234
+
235
+# - Sending Servers -
236
+
237
+# Set these on the master and on any standby that will send replication data.
238
+
239
+#max_wal_senders = 10		# max number of walsender processes
240
+				# (change requires restart)
241
+#wal_keep_segments = 0		# in logfile segments; 0 disables
242
+#wal_sender_timeout = 60s	# in milliseconds; 0 disables
243
+
244
+#max_replication_slots = 10	# max number of replication slots
245
+				# (change requires restart)
246
+#track_commit_timestamp = off	# collect timestamp of transaction commit
247
+				# (change requires restart)
248
+
249
+# - Master Server -
250
+
251
+# These settings are ignored on a standby server.
252
+
253
+#synchronous_standby_names = ''	# standby servers that provide sync rep
254
+				# method to choose sync standbys, number of sync standbys,
255
+				# and comma-separated list of application_name
256
+				# from standby(s); '*' = all
257
+#vacuum_defer_cleanup_age = 0	# number of xacts by which cleanup is delayed
258
+
259
+# - Standby Servers -
260
+
261
+# These settings are ignored on a master server.
262
+
263
+#hot_standby = on			# "off" disallows queries during recovery
264
+					# (change requires restart)
265
+#max_standby_archive_delay = 30s	# max delay before canceling queries
266
+					# when reading WAL from archive;
267
+					# -1 allows indefinite delay
268
+#max_standby_streaming_delay = 30s	# max delay before canceling queries
269
+					# when reading streaming WAL;
270
+					# -1 allows indefinite delay
271
+#wal_receiver_status_interval = 10s	# send replies at least this often
272
+					# 0 disables
273
+#hot_standby_feedback = off		# send info from standby to prevent
274
+					# query conflicts
275
+#wal_receiver_timeout = 60s		# time that receiver waits for
276
+					# communication from master
277
+					# in milliseconds; 0 disables
278
+#wal_retrieve_retry_interval = 5s	# time to wait before retrying to
279
+					# retrieve WAL after a failed attempt
280
+
281
+# - Subscribers -
282
+
283
+# These settings are ignored on a publisher.
284
+
285
+#max_logical_replication_workers = 4	# taken from max_worker_processes
286
+					# (change requires restart)
287
+#max_sync_workers_per_subscription = 2	# taken from max_logical_replication_workers
288
+
289
+
290
+#------------------------------------------------------------------------------
291
+# QUERY TUNING
292
+#------------------------------------------------------------------------------
293
+
294
+# - Planner Method Configuration -
295
+
296
+#enable_bitmapscan = on
297
+#enable_hashagg = on
298
+#enable_hashjoin = on
299
+#enable_indexscan = on
300
+#enable_indexonlyscan = on
301
+#enable_material = on
302
+#enable_mergejoin = on
303
+#enable_nestloop = on
304
+#enable_parallel_append = on
305
+#enable_seqscan = on
306
+#enable_sort = on
307
+#enable_tidscan = on
308
+#enable_partitionwise_join = off
309
+#enable_partitionwise_aggregate = off
310
+#enable_parallel_hash = on
311
+#enable_partition_pruning = on
312
+
313
+# - Planner Cost Constants -
314
+
315
+#seq_page_cost = 1.0			# measured on an arbitrary scale
316
+#random_page_cost = 4.0			# same scale as above
317
+#cpu_tuple_cost = 0.01			# same scale as above
318
+#cpu_index_tuple_cost = 0.005		# same scale as above
319
+#cpu_operator_cost = 0.0025		# same scale as above
320
+#parallel_tuple_cost = 0.1		# same scale as above
321
+#parallel_setup_cost = 1000.0	# same scale as above
322
+
323
+#jit_above_cost = 100000		# perform JIT compilation if available
324
+					# and query more expensive than this;
325
+					# -1 disables
326
+#jit_inline_above_cost = 500000		# inline small functions if query is
327
+					# more expensive than this; -1 disables
328
+#jit_optimize_above_cost = 500000	# use expensive JIT optimizations if
329
+					# query is more expensive than this;
330
+					# -1 disables
331
+
332
+#min_parallel_table_scan_size = 8MB
333
+#min_parallel_index_scan_size = 512kB
334
+#effective_cache_size = 4GB
335
+
336
+# - Genetic Query Optimizer -
337
+
338
+#geqo = on
339
+#geqo_threshold = 12
340
+#geqo_effort = 5			# range 1-10
341
+#geqo_pool_size = 0			# selects default based on effort
342
+#geqo_generations = 0			# selects default based on effort
343
+#geqo_selection_bias = 2.0		# range 1.5-2.0
344
+#geqo_seed = 0.0			# range 0.0-1.0
345
+
346
+# - Other Planner Options -
347
+
348
+#default_statistics_target = 100	# range 1-10000
349
+#constraint_exclusion = partition	# on, off, or partition
350
+#cursor_tuple_fraction = 0.1		# range 0.0-1.0
351
+#from_collapse_limit = 8
352
+#join_collapse_limit = 8		# 1 disables collapsing of explicit
353
+					# JOIN clauses
354
+#force_parallel_mode = off
355
+#jit = off				# allow JIT compilation
356
+
357
+
358
+#------------------------------------------------------------------------------
359
+# REPORTING AND LOGGING
360
+#------------------------------------------------------------------------------
361
+
362
+# - Where to Log -
363
+
364
+#log_destination = 'stderr'		# Valid values are combinations of
365
+					# stderr, csvlog, syslog, and eventlog,
366
+					# depending on platform.  csvlog
367
+					# requires logging_collector to be on.
368
+
369
+# This is used when logging to stderr:
370
+#logging_collector = off		# Enable capturing of stderr and csvlog
371
+					# into log files. Required to be on for
372
+					# csvlogs.
373
+					# (change requires restart)
374
+
375
+# These are only used if logging_collector is on:
376
+#log_directory = 'log'			# directory where log files are written,
377
+					# can be absolute or relative to PGDATA
378
+#log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log'	# log file name pattern,
379
+					# can include strftime() escapes
380
+#log_file_mode = 0600			# creation mode for log files,
381
+					# begin with 0 to use octal notation
382
+#log_truncate_on_rotation = off		# If on, an existing log file with the
383
+					# same name as the new log file will be
384
+					# truncated rather than appended to.
385
+					# But such truncation only occurs on
386
+					# time-driven rotation, not on restarts
387
+					# or size-driven rotation.  Default is
388
+					# off, meaning append to existing files
389
+					# in all cases.
390
+#log_rotation_age = 1d			# Automatic rotation of logfiles will
391
+					# happen after that time.  0 disables.
392
+#log_rotation_size = 10MB		# Automatic rotation of logfiles will
393
+					# happen after that much log output.
394
+					# 0 disables.
395
+
396
+# These are relevant when logging to syslog:
397
+#syslog_facility = 'LOCAL0'
398
+#syslog_ident = 'postgres'
399
+#syslog_sequence_numbers = on
400
+#syslog_split_messages = on
401
+
402
+# This is only relevant when logging to eventlog (win32):
403
+# (change requires restart)
404
+#event_source = 'PostgreSQL'
405
+
406
+# - When to Log -
407
+
408
+#log_min_messages = warning		# values in order of decreasing detail:
409
+					#   debug5
410
+					#   debug4
411
+					#   debug3
412
+					#   debug2
413
+					#   debug1
414
+					#   info
415
+					#   notice
416
+					#   warning
417
+					#   error
418
+					#   log
419
+					#   fatal
420
+					#   panic
421
+
422
+#log_min_error_statement = error	# values in order of decreasing detail:
423
+					#   debug5
424
+					#   debug4
425
+					#   debug3
426
+					#   debug2
427
+					#   debug1
428
+					#   info
429
+					#   notice
430
+					#   warning
431
+					#   error
432
+					#   log
433
+					#   fatal
434
+					#   panic (effectively off)
435
+
436
+#log_min_duration_statement = -1	# -1 is disabled, 0 logs all statements
437
+					# and their durations, > 0 logs only
438
+					# statements running at least this number
439
+					# of milliseconds
440
+
441
+
442
+# - What to Log -
443
+
444
+#debug_print_parse = off
445
+#debug_print_rewritten = off
446
+#debug_print_plan = off
447
+#debug_pretty_print = on
448
+#log_checkpoints = off
449
+#log_connections = off
450
+#log_disconnections = off
451
+#log_duration = off
452
+#log_error_verbosity = default		# terse, default, or verbose messages
453
+#log_hostname = off
454
+log_line_prefix = '%m [%p] %q%u@%d '		# special values:
455
+					#   %a = application name
456
+					#   %u = user name
457
+					#   %d = database name
458
+					#   %r = remote host and port
459
+					#   %h = remote host
460
+					#   %p = process ID
461
+					#   %t = timestamp without milliseconds
462
+					#   %m = timestamp with milliseconds
463
+					#   %n = timestamp with milliseconds (as a Unix epoch)
464
+					#   %i = command tag
465
+					#   %e = SQL state
466
+					#   %c = session ID
467
+					#   %l = session line number
468
+					#   %s = session start timestamp
469
+					#   %v = virtual transaction ID
470
+					#   %x = transaction ID (0 if none)
471
+					#   %q = stop here in non-session
472
+					#        processes
473
+					#   %% = '%'
474
+					# e.g. '<%u%%%d> '
475
+#log_lock_waits = off			# log lock waits >= deadlock_timeout
476
+#log_statement = 'none'			# none, ddl, mod, all
477
+#log_replication_commands = off
478
+#log_temp_files = -1			# log temporary files equal or larger
479
+					# than the specified size in kilobytes;
480
+					# -1 disables, 0 logs all temp files
481
+log_timezone = 'Etc/UTC'
482
+
483
+#------------------------------------------------------------------------------
484
+# PROCESS TITLE
485
+#------------------------------------------------------------------------------
486
+
487
+cluster_name = '11/main'			# added to process titles if nonempty
488
+					# (change requires restart)
489
+#update_process_title = on
490
+
491
+
492
+#------------------------------------------------------------------------------
493
+# STATISTICS
494
+#------------------------------------------------------------------------------
495
+
496
+# - Query and Index Statistics Collector -
497
+
498
+#track_activities = on
499
+#track_counts = on
500
+#track_io_timing = off
501
+#track_functions = none			# none, pl, all
502
+#track_activity_query_size = 1024	# (change requires restart)
503
+stats_temp_directory = '/var/run/postgresql/11-main.pg_stat_tmp'
504
+
505
+
506
+# - Monitoring -
507
+
508
+#log_parser_stats = off
509
+#log_planner_stats = off
510
+#log_executor_stats = off
511
+#log_statement_stats = off
512
+
513
+
514
+#------------------------------------------------------------------------------
515
+# AUTOVACUUM
516
+#------------------------------------------------------------------------------
517
+
518
+#autovacuum = on			# Enable autovacuum subprocess?  'on'
519
+					# requires track_counts to also be on.
520
+#log_autovacuum_min_duration = -1	# -1 disables, 0 logs all actions and
521
+					# their durations, > 0 logs only
522
+					# actions running at least this number
523
+					# of milliseconds.
524
+#autovacuum_max_workers = 3		# max number of autovacuum subprocesses
525
+					# (change requires restart)
526
+#autovacuum_naptime = 1min		# time between autovacuum runs
527
+#autovacuum_vacuum_threshold = 50	# min number of row updates before
528
+					# vacuum
529
+#autovacuum_analyze_threshold = 50	# min number of row updates before
530
+					# analyze
531
+#autovacuum_vacuum_scale_factor = 0.2	# fraction of table size before vacuum
532
+#autovacuum_analyze_scale_factor = 0.1	# fraction of table size before analyze
533
+#autovacuum_freeze_max_age = 200000000	# maximum XID age before forced vacuum
534
+					# (change requires restart)
535
+#autovacuum_multixact_freeze_max_age = 400000000	# maximum multixact age
536
+					# before forced vacuum
537
+					# (change requires restart)
538
+#autovacuum_vacuum_cost_delay = 20ms	# default vacuum cost delay for
539
+					# autovacuum, in milliseconds;
540
+					# -1 means use vacuum_cost_delay
541
+#autovacuum_vacuum_cost_limit = -1	# default vacuum cost limit for
542
+					# autovacuum, -1 means use
543
+					# vacuum_cost_limit
544
+
545
+
546
+#------------------------------------------------------------------------------
547
+# CLIENT CONNECTION DEFAULTS
548
+#------------------------------------------------------------------------------
549
+
550
+# - Statement Behavior -
551
+
552
+#client_min_messages = notice		# values in order of decreasing detail:
553
+					#   debug5
554
+					#   debug4
555
+					#   debug3
556
+					#   debug2
557
+					#   debug1
558
+					#   log
559
+					#   notice
560
+					#   warning
561
+					#   error
562
+#search_path = '"$user", public'	# schema names
563
+#row_security = on
564
+#default_tablespace = ''		# a tablespace name, '' uses the default
565
+#temp_tablespaces = ''			# a list of tablespace names, '' uses
566
+					# only default tablespace
567
+#check_function_bodies = on
568
+#default_transaction_isolation = 'read committed'
569
+#default_transaction_read_only = off
570
+#default_transaction_deferrable = off
571
+#session_replication_role = 'origin'
572
+#statement_timeout = 0			# in milliseconds, 0 is disabled
573
+#lock_timeout = 0			# in milliseconds, 0 is disabled
574
+#idle_in_transaction_session_timeout = 0	# in milliseconds, 0 is disabled
575
+#vacuum_freeze_min_age = 50000000
576
+#vacuum_freeze_table_age = 150000000
577
+#vacuum_multixact_freeze_min_age = 5000000
578
+#vacuum_multixact_freeze_table_age = 150000000
579
+#vacuum_cleanup_index_scale_factor = 0.1	# fraction of total number of tuples
580
+						# before index cleanup, 0 always performs
581
+						# index cleanup
582
+#bytea_output = 'hex'			# hex, escape
583
+#xmlbinary = 'base64'
584
+#xmloption = 'content'
585
+#gin_fuzzy_search_limit = 0
586
+#gin_pending_list_limit = 4MB
587
+
588
+# - Locale and Formatting -
589
+
590
+datestyle = 'iso, mdy'
591
+#intervalstyle = 'postgres'
592
+timezone = 'Etc/UTC'
593
+#timezone_abbreviations = 'Default'     # Select the set of available time zone
594
+					# abbreviations.  Currently, there are
595
+					#   Default
596
+					#   Australia (historical usage)
597
+					#   India
598
+					# You can create your own file in
599
+					# share/timezonesets/.
600
+#extra_float_digits = 0			# min -15, max 3
601
+#client_encoding = sql_ascii		# actually, defaults to database
602
+					# encoding
603
+
604
+# These settings are initialized by initdb, but they can be changed.
605
+lc_messages = 'en_US.UTF-8'			# locale for system error message
606
+					# strings
607
+lc_monetary = 'en_US.UTF-8'			# locale for monetary formatting
608
+lc_numeric = 'en_US.UTF-8'			# locale for number formatting
609
+lc_time = 'en_US.UTF-8'				# locale for time formatting
610
+
611
+# default configuration for text search
612
+default_text_search_config = 'pg_catalog.english'
613
+
614
+# - Shared Library Preloading -
615
+
616
+#shared_preload_libraries = ''	# (change requires restart)
617
+#local_preload_libraries = ''
618
+#session_preload_libraries = ''
619
+#jit_provider = 'llvmjit'		# JIT library to use
620
+
621
+# - Other Defaults -
622
+
623
+#dynamic_library_path = '$libdir'
624
+
625
+
626
+#------------------------------------------------------------------------------
627
+# LOCK MANAGEMENT
628
+#------------------------------------------------------------------------------
629
+
630
+#deadlock_timeout = 1s
631
+#max_locks_per_transaction = 64		# min 10
632
+					# (change requires restart)
633
+#max_pred_locks_per_transaction = 64	# min 10
634
+					# (change requires restart)
635
+#max_pred_locks_per_relation = -2	# negative values mean
636
+					# (max_pred_locks_per_transaction
637
+					#  / -max_pred_locks_per_relation) - 1
638
+#max_pred_locks_per_page = 2            # min 0
639
+
640
+
641
+#------------------------------------------------------------------------------
642
+# VERSION AND PLATFORM COMPATIBILITY
643
+#------------------------------------------------------------------------------
644
+
645
+# - Previous PostgreSQL Versions -
646
+
647
+#array_nulls = on
648
+#backslash_quote = safe_encoding	# on, off, or safe_encoding
649
+#default_with_oids = off
650
+#escape_string_warning = on
651
+#lo_compat_privileges = off
652
+#operator_precedence_warning = off
653
+#quote_all_identifiers = off
654
+#standard_conforming_strings = on
655
+#synchronize_seqscans = on
656
+
657
+# - Other Platforms and Clients -
658
+
659
+#transform_null_equals = off
660
+
661
+
662
+#------------------------------------------------------------------------------
663
+# ERROR HANDLING
664
+#------------------------------------------------------------------------------
665
+
666
+#exit_on_error = off			# terminate session on any error?
667
+#restart_after_crash = on		# reinitialize after backend crash?
668
+#data_sync_retry = off			# retry or panic on failure to fsync
669
+					# data?
670
+					# (change requires restart)
671
+
672
+
673
+#------------------------------------------------------------------------------
674
+# CONFIG FILE INCLUDES
675
+#------------------------------------------------------------------------------
676
+
677
+# These options allow settings to be loaded from files other than the
678
+# default postgresql.conf.  Note that these are directives, not variable
679
+# assignments, so they can usefully be given more than once.
680
+
681
+include_dir = 'conf.d'			# include files ending in '.conf' from
682
+					# a directory, e.g., 'conf.d'
683
+#include_if_exists = '...'		# include file only if it exists
684
+#include = '...'			# include file
685
+
686
+
687
+#------------------------------------------------------------------------------
688
+# CUSTOMIZED OPTIONS
689
+#------------------------------------------------------------------------------
690
+
691
+# Add settings for extensions here

+ 2
- 0
roles/common/tasks/main.yml Bestand weergeven

@@ -24,11 +24,13 @@
24 24
     packages:
25 25
     - acl
26 26
     - apache2
27
+    - apt-listchanges
27 28
     - apt-transport-https
28 29
     - apticron
29 30
     - build-essential
30 31
     - debian-goodies
31 32
     - git
33
+    - gnupg
32 34
     - htop
33 35
     - iftop
34 36
     - iotop

+ 15
- 0
roles/common/tasks/postgres.yml Bestand weergeven

@@ -25,7 +25,22 @@
25 25
     - dependencies
26 26
   when: ansible_distribution_version == '10'
27 27
 
28
+- name: Install Postgres
29
+  apt:
30
+    name: "{{ packages }}"
31
+    state: present
32
+  vars:
33
+    packages:
34
+    - postgresql
35
+    - python3-psycopg2
36
+  tags:
37
+    - dependencies
38
+  when: ansible_distribution_version == '11'
39
+
28 40
 - name: Set password for PostgreSQL admin user
29 41
   become: true
30 42
   become_user: postgres
31 43
   postgresql_user: name={{ db_admin_username }} password={{ db_admin_password }} encrypted=yes
44
+
45
+- name: Copy PostgreSQL configuration into place
46
+  copy: src=etc_postgresql_11_main_postgresql.conf dest=/etc/postgresql/11/main/postgresql.conf owner=postgres group=postgres mode=0644

+ 8
- 0
roles/common/tasks/security.yml Bestand weergeven

@@ -33,6 +33,14 @@
33 33
     - dependencies
34 34
   when: ansible_distribution_version == '10'
35 35
 
36
+- name: Install fail2ban
37
+  apt:
38
+    name: "fail2ban"
39
+    state: present
40
+  tags:
41
+    - dependencies
42
+  when: ansible_distribution_version == '11'
43
+
36 44
 - name: Copy fail2ban configuration into place
37 45
   template: src=etc_fail2ban_jail.local.j2 dest=/etc/fail2ban/jail.local
38 46
   notify: restart fail2ban

+ 1
- 1
roles/ircbouncer/tasks/znc.yml Bestand weergeven

@@ -63,7 +63,7 @@
63 63
   notify: restart znc
64 64
 
65 65
 - name: Copy expect script for znc password generation
66
-  template: src=root_znc_pw.j2 dest=/root/znc_pw mode=0777
66
+  template: src=root_znc_pw.j2 dest=/root/znc_pw mode=0755
67 67
   when: znc_config.rc != 0
68 68
 
69 69
 - name: Run script to generate znc hash and salt

+ 8
- 0
roles/jitsi/tasks/jitsi.yml Bestand weergeven

@@ -30,6 +30,8 @@
30 30
     question: jitsi-meet/cert-choice
31 31
     value: I want to use my own certificate
32 32
     vtype: select
33
+  tags:
34
+    - dependencies
33 35
 
34 36
 - name: Set Jitsi Certificate Key
35 37
   debconf:
@@ -37,6 +39,8 @@
37 39
     question: jitsi-meet/cert-path-key
38 40
     value: "/etc/letsencrypt/live/{{ domain }}/privkey.pem"
39 41
     vtype: string
42
+  tags:
43
+    - dependencies
40 44
 
41 45
 - name: Set Jitsi Certificate
42 46
   debconf:
@@ -44,6 +48,8 @@
44 48
     question: jitsi-meet/cert-path-crt
45 49
     value: "/etc/letsencrypt/live/{{ domain }}/fullchain.pem"
46 50
     vtype: string
51
+  tags:
52
+    - dependencies
47 53
 
48 54
 - name: Set Jitsi Hostname
49 55
   debconf:
@@ -55,6 +61,8 @@
55 61
     - jitsi-meet
56 62
     - jitsi-meet-prosody
57 63
     - jitsi-videobridge
64
+  tags:
65
+    - dependencies
58 66
 
59 67
 - name: Install Jitsi and dependencies from official repository
60 68
   apt:

+ 0
- 1
roles/mailserver/tasks/postfix.yml Bestand weergeven

@@ -12,7 +12,6 @@
12 12
     - postfix-pcre
13 13
     - postfix-pgsql
14 14
     - postgrey
15
-    - python-psycopg2
16 15
     - sasl2-bin
17 16
   tags:
18 17
     - dependencies

+ 22
- 0
roles/mailserver/tasks/solr.yml Bestand weergeven

@@ -11,6 +11,19 @@
11 11
     - solr-tomcat
12 12
   tags:
13 13
     - dependencies
14
+  when: ansible_distribution_version == '9'
15
+
16
+- name: Install Solr and related packages
17
+  apt:
18
+    name: "{{ packages }}"
19
+    state: present
20
+  vars:
21
+    packages:
22
+    - dovecot-solr
23
+    - solr-tomcat
24
+  tags:
25
+    - dependencies
26
+  when: ansible_distribution_version == '10'
14 27
 
15 28
 - name: Work around Debian bug and copy Solr schema file into place
16 29
   copy:
@@ -62,3 +75,12 @@
62 75
     group=tomcat
63 76
   notify: restart solr
64 77
   when: ansible_distribution_version == '10'
78
+
79
+- name: Create Solr index directory
80
+  file:
81
+    state=directory
82
+    path=/data/solr
83
+    owner=tomcat
84
+    group=tomcat
85
+  notify: restart solr
86
+  when: ansible_distribution_version == '11'

+ 16
- 0
roles/mailserver/tasks/z-push.yml Bestand weergeven

@@ -50,6 +50,22 @@
50 50
     - dependencies
51 51
   when: ansible_distribution_version == '10'
52 52
 
53
+- name: Install Z-Push
54
+  apt:
55
+    name: "{{ packages }}"
56
+    state: present
57
+  vars:
58
+    packages:
59
+    - z-push
60
+    - z-push-common
61
+    - z-push-backend-combined
62
+    - z-push-backend-imap
63
+    - z-push-backend-carddav
64
+    - z-push-backend-caldav
65
+  tags:
66
+    - dependencies
67
+  when: ansible_distribution_version == '11'
68
+
53 69
 - name: Ensure Z-Push state and log directories are in place
54 70
   file:
55 71
     state=directory

+ 8
- 0
roles/monitoring/tasks/monit.yml Bestand weergeven

@@ -181,6 +181,14 @@
181 181
   notify: restart monit
182 182
   when: ansible_distribution_version == '10'
183 183
 
184
+- name: Copy monit service config files into place
185
+  copy: src=etc_monit_conf.d_{{ item }} dest=/etc/monit/conf.d/{{ item }}
186
+  with_items:
187
+    - pgsql_deb10
188
+    - tomcat_deb10
189
+  notify: restart monit
190
+  when: ansible_distribution_version == '11'
191
+
184 192
 # TODO add to fail2ban when monit_page_public == 1
185 193
 
186 194
 - name: Create the Apache monit sites config files

+ 20
- 0
roles/sslletsencrypt/defaults/main.yml Bestand weergeven

@@ -16,6 +16,26 @@ kex_algorithms: "curve25519-sha256@libssh.org,ecdh-sha2-nistp521,ecdh-sha2-nistp
16 16
 ciphers: "chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr"
17 17
 macs: "hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,umac-128@openssh.com"
18 18
 
19
+subdomains:
20
+  - "{{ server_name }}"
21
+  - "www"
22
+  - "mail"
23
+  - "autoconfig"
24
+  - "stats"
25
+  - "news"
26
+  - "cloud"
27
+  - "git"
28
+  - "matrix"
29
+  - "status"
30
+  - "social"
31
+  - "comments"
32
+  - "iot"
33
+  - "wiki"
34
+  - "jitsi"
35
+  - "kanboard"
36
+  - "chat"
37
+  - "users"
38
+
19 39
 # ntp
20 40
 ntp_servers:
21 41
   - 0.pool.ntp.org

+ 21
- 2
roles/sslletsencrypt/tasks/letsencrypt.yml Bestand weergeven

@@ -26,6 +26,14 @@
26 26
     - dependencies
27 27
   when: ansible_distribution_version == '10'
28 28
 
29
+- name: Install Certbot
30
+  apt:
31
+    name: "certbot"
32
+    state: present
33
+  tags:
34
+    - dependencies
35
+  when: ansible_distribution_version == '11'
36
+
29 37
 - name: Create directory for LetsEncrypt configuration and certificates
30 38
   file: state=directory path=/etc/letsencrypt group=root owner=root
31 39
 
@@ -69,8 +77,19 @@
69 77
 - name: Create live directory for LetsEncrypt cron job
70 78
   file: state=directory path=/etc/letsencrypt/live group=ssl-cert owner=root
71 79
 
72
-- name: Get an SSL certificate for {{ virtual_domains | json_query('[*].name') | join(' ') }} from Let's Encrypt
73
-  script: letsencrypt-gencert {{ virtual_domains | json_query('[*].name') | join(' ') }} creates=/etc/letsencrypt/live/{{ domain }}/privkey.pem
80
+- name: Copy script to generate initial certificate
81
+  template:
82
+    src=root_letsencrypt_gencert.j2
83
+    dest=/root/letsencrypt-gencert
84
+    owner=root
85
+    group=root
86
+    mode=0755
87
+
88
+- name: Get an SSL certificate for all specified domains and subdomains from Let's Encrypt
89
+  command: /root/letsencrypt-gencert creates=/etc/letsencrypt/live/{{ domain }}/privkey.pem
90
+
91
+- name: Remove certificate script
92
+  file: path=/root/letsencrypt-gencert state=absent
74 93
 
75 94
 - name: Modify permissions to allow ssl-cert group access to archive
76 95
   file: path=/etc/letsencrypt/archive owner=root group=ssl-cert mode=0750 recurse=yes

+ 0
- 2
roles/sslletsencrypt/tasks/ufw.yml Bestand weergeven

@@ -1,5 +1,3 @@
1
----
2
-
3 1
 - name: Set firewall rules for SSL web traffic
4 2
   ufw: rule=allow port={{ item }} proto=tcp
5 3
   with_items:

roles/sslletsencrypt/files/letsencrypt-gencert → roles/sslletsencrypt/templates/root_letsencrypt_gencert.j2 Bestand weergeven

@@ -1,11 +1,8 @@
1 1
 #!/bin/bash
2 2
 
3
-# Call script like this:
4
-# letsencrypt-gencert foo.com bar.com baz.com
5
-
6 3
 # Build list of domains and subdomains we need a certificate for
7 4
 d=""
8
-for domain in "$@"; do
5
+for domain in {{ virtual_domains | json_query('[*].name') | join(' ') }}; do
9 6
   # domain itself - foo.com
10 7
   # only add if the DNS entry for the domain does actually exist
11 8
   if (getent hosts $domain > /dev/null); then
@@ -17,8 +14,7 @@ for domain in "$@"; do
17 14
   fi
18 15
 
19 16
   # subdomains - www.foo.com mail.foo.com ...
20
-  # TODO includes servername (eddie / stage)!
21
-  for sub in stage www mail autoconfig stats news cloud git matrix status social comments iot wiki jitsi kanboard chat; do
17
+  for sub in {{ subdomains | join(' ') }}; do
22 18
     # only add if the DNS entry for the subdomain does actually exist
23 19
     if (getent hosts $sub.$domain > /dev/null); then
24 20
       if [ -z "$d" ]; then

Laden…
Annuleren
Opslaan