X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/207dca167b6211116a0af448aff9907f3e3ab4bd..92214b24d9b39b5eeadbd90665b19d3e01924daf:/cookbooks/timescaledb/recipes/default.rb diff --git a/cookbooks/timescaledb/recipes/default.rb b/cookbooks/timescaledb/recipes/default.rb index 7b2defdca..a9878595a 100644 --- a/cookbooks/timescaledb/recipes/default.rb +++ b/cookbooks/timescaledb/recipes/default.rb @@ -19,9 +19,19 @@ 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"