Deduplicate contents of roles (namely Postgres) #410

Open
opened 2025-10-08 15:06:06 +02:00 by histalek · 0 comments
Owner

We do have quite a lot of roles that need a postgres db and implement the needed tasks themselves. This multiplies the needed effort for migration changes by the number of roles that use postgres.
We probably should pull the whole set of postgres tasks out into a non-standalone role.

Pain points i can think of:

  • supporting multiple major PG_VERSIONs with their respective container configs
    • podman inspect postgres:18.0-alpine | jq .[].Config.Env.[] | grep PGDATA could help with the most recent change AFAICT
  • supporting software that can access unix socket and those that can't
    • probably needs some kind of signaling var
  • How do we pass the needed variables down to the role?
    • inside of the playbook? eg. postgres_variablename: {{ softwarename_postgres_variablename }}?
    • the postgres role should probably not have variable defaults
We do have quite a lot of roles that need a postgres db and implement the needed tasks themselves. This multiplies the needed effort for migration changes by the number of roles that use postgres. We probably should pull the whole set of postgres tasks out into a non-standalone role. Pain points i can think of: * supporting multiple major PG_VERSIONs with their respective container configs * `podman inspect postgres:18.0-alpine | jq .[].Config.Env.[] | grep PGDATA` could help with the most recent change AFAICT * supporting software that can access unix socket and those that can't * probably needs some kind of signaling var * How do we pass the needed variables down to the role? * inside of the playbook? eg. `postgres_variablename: {{ softwarename_postgres_variablename }}`? * the postgres role should probably not have variable defaults
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: SipsOfCode/infrastructure#410
No description provided.