feat(postgres): add split_postgres_connections filter and average pool fact

Compute POSTGRES_ALLOWED_AVG_CONNECTIONS once and propagate to app roles (gitlab, mastodon, listmonk, matrix, pretix, mobilizon, openproject, discourse). Fix docker-compose postgres command (-c flags split). Add unit tests. Minor env/locale tweaks and includes.

Conversation: https://chatgpt.com/share/68b48e72-cc28-800f-9c21-270cbc17d82a
This commit is contained in:
2025-08-31 20:04:14 +02:00
parent b3dfb8bf22
commit 5f66c1a622
18 changed files with 249 additions and 34 deletions

View File

@@ -1,3 +1,7 @@
- name: Compute average allowed connections per Postgres app (once)
set_fact:
POSTGRES_ALLOWED_AVG_CONNECTIONS: "{{ (POSTGRES_MAX_CONNECTIONS | split_postgres_connections(playbook_dir ~ '/roles')) | int }}"
run_once: true
- name: Include dependency 'sys-svc-docker'
include_role: