puppet: If needed, ensure wal-g is installed before we start PostgreSQL.

PostgreSQL will need to use wal-g to pull needed WAL files.  We do not
express this as a direct dependency because it is possible to have
wal-g without PostgreSQL, as well as PostgreSQL without wal-g.
This commit is contained in:
Alex Vandiver
2024-04-17 19:51:49 +00:00
committed by Tim Abbott
parent 166c233b2a
commit 4be2abc55b

View File

@@ -66,8 +66,15 @@ class zulip::profile::postgresql {
}
}
$backups_s3_bucket = zulipsecret('secrets', 's3_backups_bucket', '')
$backups_directory = zulipconf('postgresql', 'backups_directory', '')
if $backups_s3_bucket != '' or $backups_directory != '' {
$require = [File['/usr/local/bin/env-wal-g'], Package[$zulip::postgresql_base::postgresql]]
} else {
$require = [Package[$zulip::postgresql_base::postgresql]]
}
exec { $zulip::postgresql_base::postgresql_restart:
require => Package[$zulip::postgresql_base::postgresql],
require => $require,
refreshonly => true,
subscribe => [ File[$postgresql_conf_file] ],
}