puppet: Install the same version of postgres-client as the server.

We require a `pg_dump` whose version matches the version of the server
we are configured against (see 3a8b4b0205).  Installing the latest
`postgresql-client` does not guarantee that we have such a binary
present.
This commit is contained in:
Alex Vandiver
2024-03-20 16:22:11 -04:00
committed by Tim Abbott
parent 6ad777c86f
commit 23504308fb
3 changed files with 11 additions and 5 deletions

View File

@@ -48,6 +48,14 @@ PostgreSQL documentation):
overhead. I want to be sure that I connect to a server I trust,
and that it's the one I specify.
Set the remote server's PostgreSQL version in `/etc/zulip/zulip.conf`:
```ini
[postgresql]
# Set this to match the version running on your remote PostgreSQL server
version = 16
```
Then you should specify the password of the user zulip for the
database in /etc/zulip/zulip-secrets.conf:

View File

@@ -49,7 +49,7 @@ class kandra::prometheus::postgresql {
include zulip::postgresql_client
exec { 'create prometheus postgres user':
require => Package['postgresql-client'],
require => Class['zulip::postgresql_client'],
command => '/usr/bin/createuser -g pg_monitor prometheus',
unless => 'test -f /usr/bin/psql && /usr/bin/psql -tAc "select usename from pg_user" | /bin/grep -xq prometheus',
user => 'postgres',

View File

@@ -1,8 +1,6 @@
class zulip::postgresql_client {
# This may get us a more recent client than the database server is
# configured to be, ($zulip::postgresql_common::version), but
# they're compatible.
package { 'postgresql-client':
include zulip::postgresql_common
package { "postgresql-client-${zulip::postgresql_common::version}":
ensure => installed,
}
}