Skip to content

Commit d944281

Browse files
authored
Add RHEL GPG key with PGDG prefix (allows installing PostgreSQL >= 11)
According to https://download.postgresql.org/pub/repos/yum/keys/README.txt, there are two types of keys for RHEL: `RPM-GPG-KEY-PGDG*` and `PGDG-RPM-GPG-KEY*`. > This directory contains keys used for signing the PostgreSQL RPMs on RHEL (and its derivatives) and Fedora. > The keys which have the PGDG prefix are used to sign PostgreSQL 11 and above RPMs. > > Archived versions (v10 and below) use the RPM-GPG-KEY prefix. The role is already adding the first kind of key to the system, but not the second. Therefore, installing newer PostgreSQL versions is not possible at the moment. This commit adds the second type of key so that newer PostgreSQL versions can be installed too.
1 parent 53bf360 commit d944281

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tasks/redhat.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,16 @@
1313
register: __postgresql_repo_pkg_installed_result
1414
ignore_errors: true
1515

16-
- name: Install repository key
16+
- name: Install repository key (PostgreSQL v10 and below)
1717
rpm_key:
1818
key: https://download.postgresql.org/pub/repos/yum/keys/RPM-GPG-KEY-PGDG
1919
state: present
2020

21+
- name: Install repository key (PostgreSQL v11 and above)
22+
rpm_key:
23+
key: https://download.postgresql.org/pub/repos/yum/keys/PGDG-RPM-GPG-KEY-RHEL
24+
state: present
25+
2126
- name: Install pgdg repository package (RedHat)
2227
yum:
2328
name: >-

0 commit comments

Comments
 (0)