X-Git-Url: https://git.openstreetmap.org/chef.git/blobdiff_plain/9fe74c9525ca375f485ef8c6f8b10bb08d875e3b..5dd8aa5513322ace530f7c242ed32918da6c86f1:/cookbooks/nominatim/recipes/default.rb diff --git a/cookbooks/nominatim/recipes/default.rb b/cookbooks/nominatim/recipes/default.rb index eb30570ca..b10c92327 100644 --- a/cookbooks/nominatim/recipes/default.rb +++ b/cookbooks/nominatim/recipes/default.rb @@ -52,7 +52,10 @@ end include_recipe "postgresql" +postgresql_version = node[:nominatim][:dbcluster].split("/").first + package "postgis" +package "postgresql-#{postgresql_version}-postgis-2.3" node[:nominatim][:dbadmins].each do |user| postgresql_user user do @@ -174,6 +177,7 @@ git source_directory do enable_submodules true user "nominatim" group "nominatim" + not_if { node[:nominatim][:state] != "slave" && File.exist?("#{source_directory}/README.md") } notifies :run, "execute[compile_nominatim]", :immediately end @@ -271,7 +275,7 @@ template "/etc/init.d/nominatim-update" do variables :source_directory => source_directory end -%w(backup-nominatim vacuum-db-nominatim).each do |fname| +%w[backup-nominatim vacuum-db-nominatim].each do |fname| template "/usr/local/bin/#{fname}" do source "#{fname}.erb" owner "root" @@ -312,13 +316,13 @@ package "php-fpm" package "php-pgsql" package "php-pear" package "php-db" +package "php-intl" apache_module "rewrite" apache_module "proxy" apache_module "proxy_fcgi" apache_module "proxy_http" apache_module "headers" -apache_module "reqtimeout" service "php7.0-fpm" do action [:enable, :start]