basedir = data_bag_item("accounts", "nominatim")["home"]
email_errors = data_bag_item("accounts", "lonvia")["email"]
basedir = data_bag_item("accounts", "nominatim")["home"]
email_errors = data_bag_item("accounts", "lonvia")["email"]
variables :base_url => node[:nominatim][:state] == "off" ? node[:fqdn] : "nominatim.openstreetmap.org",
:dbname => node[:nominatim][:dbname],
:flatnode_file => node[:nominatim][:flatnode_file],
variables :base_url => node[:nominatim][:state] == "off" ? node[:fqdn] : "nominatim.openstreetmap.org",
:dbname => node[:nominatim][:dbname],
:flatnode_file => node[:nominatim][:flatnode_file],
- cron_d "nominatim-update-maintenance-trigger" do
- minute "18"
- hour "1"
+ systemd_service "nominatim-update-maintenance-trigger" do
+ description "Trigger maintenance tasks for Nominatim DB"
+ exec_start "touch #{basedir}/status/update_maintenance"
- command "touch #{basedir}/status/update_maintenance"
- mailto email_errors
+ end
+
+ systemd_timer "nominatim-update-maintenance-trigger" do
+ action :create
+ description "Schedule maintenance tasks for Nominatim DB"
+ on_calendar "*-*-* 02:03:00 UTC"
+ end
+
+ service "nominatim-update-maintenance-trigger" do
+ action [:enable]
:logfile => "#{node[:nominatim][:logdir]}/update.log",
:branch => node[:nominatim][:revision],
:update_stop_file => "#{basedir}/status/updates_disabled",
:logfile => "#{node[:nominatim][:logdir]}/update.log",
:branch => node[:nominatim][:revision],
:update_stop_file => "#{basedir}/status/updates_disabled",
- :update_maintenance_trigger => "#{basedir}/status/update_maintenance"
+ :update_maintenance_trigger => "#{basedir}/status/update_maintenance",
+ :qabindir => qa_bin_directory,
+ :qadatadir => qa_data_directory