Postgresql Role
Deploy PostgreSQL as a Podman quadlet.
Variables
| Variable | Type | Options | Default | Description |
|---|---|---|---|---|
podman_user | string | --- | {{ ansible_user }} | system user for rootless podman operations |
postgresql_network_enabled | bool | true, false | true | create and manage the podman network |
postgresql_network_name | string | --- | postgresql-internal | podman network name |
postgresql_bind_ip | string | --- | 127.0.0.1 | host IP to bind exposed ports to |
postgresql_port_map_enabled | bool | true, false | false | expose container ports on the host |
postgresql_port_map | list of string | --- | ["5432:5432"] | host:container port mappings |
postgresql_version | string | --- | 18.6-alpine | container image version |
postgresql_autoupdate | bool | true, false | true | enable podman auto-update for PostgreSQL |
postgresql_backup_autoupdate | bool | true, false | true | enable podman auto-update for the backup container |
postgresql_log_destination | string | --- | stderr | PostgreSQL log destination |
postgresql_log_statement | string | none, ddl, mod, all | none | SQL statement logging level |
postgresql_log_min_duration_statement | integer | --- | 1000 | log statements running at least this many milliseconds |
postgresql_log_connections | bool | true, false | true | log successful connection attempts |
postgresql_log_disconnections | bool | true, false | true | log session disconnections |
postgresql_log_checkpoints | bool | true, false | true | log checkpoint activity |
postgresql_log_lock_waits | bool | true, false | true | log waits exceeding deadlock timeout |
postgresql_log_line_prefix | string | --- | %m [%p] db=%d,user=%u,app=%a,client=%h | context prefix for each PostgreSQL log line |
postgresql_admin_database | string | --- | postgres | administrator database created by the PostgreSQL image |
postgresql_admin_user | string | --- | postgres | administrator user created by the PostgreSQL image |
postgresql_admin_password | string | --- | "" | password for the PostgreSQL administrator user |
postgresql_users | list of dict | --- | [] | users to provision; each entry has name and password |
postgresql_databases | list of dict | --- | [] | secondary databases to provision and include in backups; each entry has name and owner |
postgresql_backup_schedule_times | string | --- | 03:00 | time of day to run backup (HH:MM format) |
postgresql_backup_retention_days | integer | --- | 7 | number of days to keep backups |
postgresql_backup_compression | integer | --- | 6 | gzip compression level (1-9) |
postgresql_extra_files | list of dict | --- | [] | arbitrary file entries with src (controller path) or source (target path), dest, optional mount, mode, and template |
postgresql_extra_dirs | list of dict | --- | [] | arbitrary directory entries with src (controller directory) or source (target path), dest, optional mount and mode |
postgresql_entrypoint | string | --- | "" | optional PostgreSQL container entrypoint override |
postgresql_backup_entrypoint | string | --- | "" | optional PostgreSQL backup container entrypoint override |
postgresql_proxy_enabled | bool | true, false | false | enable HTTP proxy for image pulls |
postgresql_proxy_http | string | --- | "" | HTTP proxy URL |
postgresql_proxy_https | string | --- | "" | HTTPS proxy URL |
postgresql_proxy_no_proxy | string | --- | "" | comma-separated list of proxy exclusions |
postgresql_proxy_env | list of string | --- | [] | generated proxy environment entries |
postgresql_network_driver | string | --- | bridge | podman network driver |
postgresql_environment_vars | dict | --- | {"POSTGRES_DB":"{{ postgresql_admin_database }}","POSTGRES_USER":"{{ postgresql_admin_user }}","POSTGRES_PASSWORD":"{{ postgresql_admin_password }}"} | extra environment variables for the container |