]> git.openstreetmap.org Git - chef.git/commitdiff
Enable osmdbt based replication
authorTom Hughes <tom@compton.nu>
Sun, 8 Nov 2020 12:13:15 +0000 (12:13 +0000)
committerTom Hughes <tom@compton.nu>
Sun, 8 Nov 2020 12:13:15 +0000 (12:13 +0000)
cookbooks/planet/recipes/replication.rb

index 85a3c08d38ef79a2fac62d633654696087ef8578..51f0e69a216baa5684c78cb237c6fbb692413232 100644 (file)
@@ -216,6 +216,12 @@ systemd_service "replication-minutely" do
   no_new_privileges true
 end
 
+systemd_timer "replication-minutely" do
+  description "Minutely replication"
+  on_boot_sec 60
+  on_unit_active_sec 60
+end
+
 template "/etc/replication/changesets.conf" do
   source "changesets.conf.erb"
   user "root"
@@ -303,10 +309,8 @@ if node[:planet][:replication] == "enabled"
     mailto "zerebubuth@gmail.com"
   end
 
-  systemd_timer "replication-minutely" do
-    description "Minutely replication"
-    on_boot_sec 60
-    on_unit_active_sec 60
+  service "replication-minutely.timer" do
+    action [:enable, :start]
   end
 
   cron_d "replication-minutely" do
@@ -344,6 +348,10 @@ else
     action :delete
   end
 
+  service "replication-minutely.timer" do
+    action [:stop, :disable]
+  end
+
   cron_d "replication-minutely" do
     action :delete
   end