Skip to content

Commit

Permalink
Enable support for Postgresql 16
Browse files Browse the repository at this point in the history
feat: enable using postgresql 16 via this role
  • Loading branch information
fila43 committed Dec 6, 2023
1 parent 487565e commit 05d3828
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
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, and 15.
The role currently works with the PostgreSQL server 10, 12, 13, 15 and 16.

### Collection requirements

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

### postgresql_verison

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

```yaml
postgresql_version: "13"
Expand Down
4 changes: 2 additions & 2 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@

- name: Check if requested version is supported in the system (RHEL8)
fail:
msg: RHEL 8 supports only Postgresql 10, 12, 13 and 15
msg: RHEL 8 supports only Postgresql 10, 12, 13, 15 and 16
when:
- ansible_facts["os_family"] == "RedHat"
- ansible_facts["distribution_major_version"] == "8"
- postgresql_version | string not in __postgresql_versions_el8

- name: Check if requested version is supported in system (RHEL9)
fail:
msg: RHEL 9 supports only Postgresql 13 and 15
msg: RHEL 9 supports only Postgresql 13, 15 and 16
when:
- ansible_facts["os_family"] == "RedHat"
- ansible_facts["distribution_major_version"] == "9"
Expand Down
4 changes: 2 additions & 2 deletions vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

# Examples of non-distribution specific (generic) internal variables:
__postgresql_packages: [postgresql-server]
__postgresql_versions_el8: ["10", "12", "13", "15"]
__postgresql_versions_el9: ["13", "15"]
__postgresql_versions_el8: ["10", "12", "13", "15", "16"]
__postgresql_versions_el9: ["13", "15", "16"]

__postgresql_data_dir: /var/lib/pgsql/data

Expand Down

0 comments on commit 05d3828

Please sign in to comment.