Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The role also optimizes the database server settings to improve performance.

## Requirements

The role currently works with the PostgreSQL server 10, 12, 13, 15 and 16.
The role currently works with the PostgreSQL server 10, 12, 13, 15, 16 and 18.

### Collection requirements

Expand All @@ -23,7 +23,7 @@ ansible-galaxy collection install -vv -r meta/collection-requirements.yml

### postgresql_version

You can set the version of the PostgreSQL server to 10, 12, 13, 15 or 16.
You can set the version of the PostgreSQL server to 10, 12, 13, 15, 16 or 18.

```yaml
postgresql_version: "13"
Expand Down
2 changes: 1 addition & 1 deletion tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

- name: Check if requested version is supported in system (RHEL9)
fail:
msg: RHEL 9 supports only Postgresql 13, 15 and 16
msg: RHEL 9 supports only Postgresql 13, 15, 16 and 18
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: Avoid hardcoding version list in the error message; derive it from the RHEL9 versions variable to keep them in sync.

Because __postgresql_versions_el9 already defines the supported versions (13, 15, 16, 18), this message now duplicates that list. To avoid future drift, generate the message dynamically from __postgresql_versions_el9 (e.g., via join/map) so it always reflects the configured supported versions.

when:
- ansible_facts["os_family"] == "RedHat"
- ansible_facts["distribution_major_version"] == "9"
Expand Down
5 changes: 2 additions & 3 deletions vars/RedHat_10.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# SPDX-License-Identifier: MIT
---
__postgresql_packages: >-
{{ ['@postgresql:' + postgresql_version +
'/server'] if postgresql_version != '16' else
['postgresql-server'] }}
{{ ['postgresql' + postgresql_version +
'-server'] }}
4 changes: 2 additions & 2 deletions vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
# Examples of non-distribution specific (generic) internal variables:
__postgresql_packages: [postgresql-server]
__postgresql_versions_el8: ["10", "12", "13", "15", "16"]
__postgresql_versions_el9: ["13", "15", "16"]
__postgresql_versions_el10: ["16"]
__postgresql_versions_el9: ["13", "15", "16", "18"]
__postgresql_versions_el10: ["16", "18"]

__postgresql_data_dir: /var/lib/pgsql/data

Expand Down
Loading