Skip to content

Commit 39e9e5f

Browse files
committed
fix: supposedly main contains all releases for libpq5
1 parent e2c34cf commit 39e9e5f

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

ansible/tasks/setup-postgrest.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,23 @@
88

99
- name: PostgREST - add Postgres PPA
1010
apt_repository:
11-
repo: "deb http://apt.postgresql.org/pub/repos/apt/ focal-pgdg {{ postgresql_major }}"
11+
repo: "deb http://apt.postgresql.org/pub/repos/apt/ focal-pgdg main"
1212
state: present
13+
filename: postgresql-pgdg
1314

14-
- name: PostgREST - update apt cache
15-
apt:
16-
update_cache: yes
17-
18-
# libpq is a C library that enables user programs to communicate with
19-
# the PostgreSQL database server.
20-
- name: PostgREST - system dependencies
15+
- name: PostgREST - install system dependencies
2116
apt:
2217
pkg:
23-
- "libpq5=15.*"
18+
- "libpq5>=15"
2419
- libnuma-dev
20+
update_cache: yes
21+
state: present
22+
23+
- name: PostgREST - verify libpq5 version
24+
shell: dpkg -l libpq5 | grep '^ii' | awk '{print $3}' | grep -E '^15'
25+
register: libpq5_version
26+
failed_when: libpq5_version.rc != 0
27+
changed_when: false
2528

2629
- name: PostgREST - remove Postgres PPA gpg key
2730
apt_key:
@@ -88,7 +91,6 @@
8891
#! /usr/bin/env bash
8992
set -euo pipefail
9093
set -x
91-
9294
cd "$(dirname "$0")"
9395
cat $@ > merged.conf
9496
dest: /etc/postgrest/merge.sh

0 commit comments

Comments
 (0)