No description
Find a file
semantic-release-bot f750c30982 chore(release): 1.6.0 [skip ci]
# [1.6.0](https://github.com/de-it-krachten/ansible-role-postgresql_docker/compare/v1.5.0...v1.6.0) (2026-03-15)

### Features

* Added support for Fedora 43 ([d4ea77f](d4ea77fa3e))
* Drop support for Debian 10 (Buster) ([20f86cf](20f86cf18c))
* Drop support for Fedora 41 ([47f5e14](47f5e1498b))
* Drop support for openSUSE Leap 15 ([92c5c4a](92c5c4a387))
* Drop support for SUSE Linux Enterprise 15 ([f4f56c2](f4f56c2736))
2026-03-15 11:40:14 +00:00
.github/workflows Update CI 2026-03-14 19:53:15 +01:00
defaults fix: Rename postgres -> postgresql 2022-11-09 15:46:56 +01:00
handlers feat: Update supported platforms & CI 2024-12-29 16:02:07 +01:00
meta Update CI 2026-03-14 19:53:15 +01:00
molecule/default Update supported platforms & CI 2026-03-14 19:53:15 +01:00
tasks feat: Update supported platforms & CI 2024-12-29 16:02:07 +01:00
templates fix: Rename postgres -> postgresql 2022-11-09 15:46:56 +01:00
.ansible-lint Add README 2022-11-03 22:01:45 +01:00
.cicd Update CI 2026-03-06 23:01:49 +01:00
.cicd.overwrite Update CI 2026-03-14 19:53:15 +01:00
.collections feat: Add support for Ubuntu 24.04 LTS + Fedora 40 2024-05-31 23:37:05 +02:00
.gitignore feat: Update supported platforms & CI 2024-12-29 16:02:07 +01:00
.releaserc.yml Update CI 2025-09-03 22:20:48 +02:00
.roles Initial commit 2022-11-03 21:53:43 +01:00
.yamllint feat: Update supported platforms & CI 2024-12-29 16:02:07 +01:00
CHANGELOG.md chore(release): 1.6.0 [skip ci] 2026-03-15 11:40:14 +00:00
README.md Update CI 2026-03-14 19:53:15 +01:00

CI

ansible-role-postgresql_docker

Setup PostgreSQL database in Docker

Dependencies

Roles

None

Collections

  • community.docker

Platforms

Supported platforms

  • Red Hat Enterprise Linux 81
  • Red Hat Enterprise Linux 91
  • Red Hat Enterprise Linux 101
  • RockyLinux 81
  • RockyLinux 91
  • RockyLinux 101
  • OracleLinux 81
  • OracleLinux 91
  • OracleLinux 101
  • AlmaLinux 81
  • AlmaLinux 91
  • AlmaLinux 101
  • Debian 11 (Bullseye)1
  • Debian 12 (Bookworm)1
  • Debian 13 (Trixie)1
  • Ubuntu 18.04 LTS1
  • Ubuntu 20.04 LTS1
  • Ubuntu 22.04 LTS1
  • Ubuntu 24.04 LTS1
  • Fedora 421
  • Fedora 431
  • Alpine 31
  • Docker dind (CI only)

Note: 1 : no automated testing is performed on these platforms

Role Variables

defaults/main.yml


# Database name & credentials
# postgresql_database: db1
# postgresql_username: user1
# postgresql_password: password1

# External port
postgresql_port: 5432

# Postgres version
postgresql_version: 12

# Postgres docker image
postgresql_image: postgres:{{ postgresql_version }}

# Name of the postgres container
postgresql_container_name: postgres

# Name of the postgres container
postgresql_hostname: postgres

# Directory with compose file
postgresql_compose_dir: /export/docker/postgres/compose

# Directory with data files
postgresql_data_dir: /export/docker/postgres/data

Example Playbook

molecule/default/converge.yml


- name: sample playbook for role 'postgresql_docker'
  hosts: all
  become: 'yes'
  vars:
    molecule_driver: '{{ lookup(''env'', ''MOLECULE_DRIVER_NAME'') }}'
    postgresql_database: db1
    postgresql_username: user1
    postgresql_password: password1
  tasks:
    - name: Include role 'postgresql_docker'
      ansible.builtin.include_role:
        name: postgresql_docker