]> git.openstreetmap.org Git - chef.git/commitdiff
Make the location of the replication state directory configurable
authorTom Hughes <tom@compton.nu>
Fri, 17 May 2024 15:56:39 +0000 (16:56 +0100)
committerTom Hughes <tom@compton.nu>
Fri, 17 May 2024 15:56:39 +0000 (16:56 +0100)
cookbooks/tile/attributes/default.rb
cookbooks/tile/recipes/default.rb

index 776e274b08e11c7757833af9a347088a52e72f04..cc5803d001257346ba7bf85ca08da530ce4ab84d 100644 (file)
@@ -8,6 +8,7 @@ default[:tile][:database][:tag_transform_script] = nil
 
 default[:tile][:mapnik] = "3.1"
 
+default[:tile][:replication][:directory] = "/var/lib/replicate"
 default[:tile][:replication][:url] = "https://osm-planet-eu-central-1.s3.dualstack.eu-central-1.amazonaws.com/planet/replication/minute"
 
 default[:tile][:data] = {}
index 0c9da1339385d5476eca1a746ce95d2fb92ac0a5..a05cd0fd9dcf2e5b6cc7479a1caa8211a69da452 100644 (file)
@@ -514,12 +514,19 @@ package %w[
   pyosmium
 ]
 
-directory "/var/lib/replicate" do
+directory node[:tile][:replication][:directory] do
   owner "tile"
   group "tile"
   mode "755"
 end
 
+link "/var/lib/replicate" do
+  to node[:tile][:replication][:directory]
+  owner "tile"
+  group "tile"
+  not_if { node[:tile][:replication][:directory] == "/var/lib/replicate" }
+end
+
 template "/usr/local/bin/expire-tiles" do
   source "expire-tiles.erb"
   owner "root"