]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/timescaledb/recipes/default.rb
Drop argon2 test site
[chef.git] / cookbooks / timescaledb / recipes / default.rb
index 7b2defdcacbdc826e46dbe6cbafbc936e23960b9..a9878595a429a556b38f35679c2c0e84fed366ef 100644 (file)
 
 include_recipe "apt"
 
-package %w[
+database_version = node[:timescaledb][:database_version]
+
+package %W[
   timescaledb-tools
-  timescaledb-2-postgresql-12
+  timescaledb-2-postgresql-#{database_version}
 ]
 
+node.default_unless[:postgresql][:versions] = []
+node.default[:postgresql][:versions] |= [database_version]
+node.default[:postgresql][:monitor_tables] = false
+node.default_unless[:postgresql][:settings][database_version][:shared_preload_libraries] = []
+node.default[:postgresql][:settings][database_version][:shared_preload_libraries] |= ["timescaledb"]
+node.default_unless[:postgresql][:settings][database_version][:customized_options] = {}
+node.default[:postgresql][:settings][database_version][:customized_options]["timescaledb.max_background_workers"] = node[:timescaledb][:max_background_workers]
+
 include_recipe "postgresql"