Skip to content

Commit 993c2e6

Browse files
committed
Conditionaly include postgresql::server::contrib
We need the contrib packages only with older versions of PostgreSQL. While here include this class when it is needed instead of using a resource to avoid conflicts when another module wants to do this.
1 parent 2dc6973 commit 993c2e6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

manifests/database/postgresql.pp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@
6060
if $manage_database {
6161

6262
# get the pg contrib to use pg_trgm extension
63-
class { '::postgresql::server::contrib': }
63+
if (versioncmp($postgres_version, '10') < 0) {
64+
include postgresql::server::contrib
65+
}
6466

6567
postgresql::server::extension { 'pg_trgm':
6668
database => $database_name,

0 commit comments

Comments
 (0)