package "postgresql-#{postgresql_version}-postgis-#{postgis_version}"
+node[:nominatim][:dbadmins].each do |user|
+ postgresql_user user do
+ cluster node[:nominatim][:dbcluster]
+ superuser true
+ only_if { node[:nominatim][:state] != "slave" }
+ end
+end
+
postgresql_user "nominatim" do
cluster node[:nominatim][:dbcluster]
superuser true
:tokenizer => node[:nominatim][:config][:tokenizer]
end
-#%w[wikimedia-importance.sql.gz gb_postcodes.csv.gz us_postcodes.csv.gz].each do |fname|
-# remote_file "#{project_directory}/#{fname}" do
-# action :create
-# source "https://www.nominatim.org/data/#{fname}"
-# owner "nominatim"
-# group "nominatim"
-# mode "644"
-# end
-#end
+%w[wikimedia-importance.sql.gz gb_postcodes.csv.gz us_postcodes.csv.gz].each do |fname|
+ remote_file "#{project_directory}/#{fname}" do
+ action :create
+ source "https://www.nominatim.org/data/#{fname}"
+ owner "nominatim"
+ group "nominatim"
+ mode "644"
+ end
+end
# Webserver + frontend
nginx_site "nominatim" do
template "nginx.erb"
- directory build_directory
+ directory project_directory
variables :pools => node[:nominatim][:fpm_pools],
:frontends => frontends,
:confdir => "#{basedir}/etc",