Skip to content

Commit 333273d

Browse files
committed
Add pg_trgm extension to pe-puppetdb database
Without the pg_trgm extension the puppetdb service complains that it cannot make some indexes that are supposed to improve performance. This commit resolves that.
1 parent 6fe4d87 commit 333273d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

manifests/init.pp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@
3232
password => postgresql_password('pe-puppetdb', $puppetdb_db_password ),
3333
}
3434

35+
$pg_trgm_cmd = 'CREATE EXTENSION pg_trgm;'
36+
postgresql_psql { $pg_trgm_cmd:
37+
db => 'pe-puppetdb',
38+
unless => "select * from pg_extension where extname='pg_trgm'",
39+
require => Postgresql::Server::Db['pe-puppetdb'],
40+
}
41+
3542
postgresql::server::role { 'console':
3643
password_hash => postgresql_password('console', $console_db_password ),
3744
}

0 commit comments

Comments
 (0)