X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/207dca167b6211116a0af448aff9907f3e3ab4bd..5a1789389a423c29a13868410a841d35569b483d:/cookbooks/timescaledb/recipes/default.rb diff --git a/cookbooks/timescaledb/recipes/default.rb b/cookbooks/timescaledb/recipes/default.rb index 7b2defdca..05085d948 100644 --- a/cookbooks/timescaledb/recipes/default.rb +++ b/cookbooks/timescaledb/recipes/default.rb @@ -17,11 +17,21 @@ # limitations under the License. # -include_recipe "apt" +include_recipe "apt::timescaledb" -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"