nominatim: run git update in source directory
[chef.git] / cookbooks / nominatim / recipes / base.rb
index 1be84b98e1a23a1bdcf0d40d9e800ff4cfcab906..242ada30d08beee1c67670738f34733893bbe582 100644 (file)
@@ -32,6 +32,7 @@ apache_module "rewrite"
 apache_module "proxy"
 apache_module "proxy_fcgi"
 apache_module "proxy_http"
+apache_module "headers"
 
 home_directory = data_bag_item("accounts", "nominatim")["home"]
 source_directory = "#{home_directory}/nominatim"
@@ -194,6 +195,11 @@ template "#{source_directory}/utils/nominatim-update" do
   user "nominatim"
   group "nominatim"
   mode 0o755
+  variables :bindir => source_directory,
+            :srcdir => source_directory,
+            :logfile => "#{node[:nominatim][:logdir]}/update.log",
+            :branch => node[:nominatim][:revision],
+            :update_stop_file => "#{home_directory}/status/updates_disabled"
 end
 
 template "/etc/init.d/nominatim-update" do
@@ -206,6 +212,8 @@ end
 
 munin_plugin_conf "nominatim" do
   template "munin.erb"
+  variables :db => node[:nominatim][:database][:dbname],
+            :querylog => "#{node[:nominatim][:logdir]}/query.log"
 end
 
 munin_plugin "nominatim_importlag" do
@@ -248,6 +256,7 @@ additional_scripts.each do |fname|
     owner "root"
     group "root"
     mode 0o755
+    variables :db => node[:nominatim][:database][:dbname]
   end
 end