]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/tile/recipes/default.rb
Make sure the correct gem is used to install ruby packages
[chef.git] / cookbooks / tile / recipes / default.rb
index f2bfd6a7b0929b39b148217a99cd12cbeabae83b..40039b3148d7f351abad41a36fd4e73f575739b3 100644 (file)
@@ -25,6 +25,7 @@ include_recipe "nodejs"
 include_recipe "postgresql"
 include_recipe "prometheus"
 include_recipe "python"
+include_recipe "ruby"
 include_recipe "tools"
 
 blocks = data_bag_item("tile", "blocks")
@@ -163,12 +164,18 @@ python_package "pyotp" do
   python_version "3"
 end
 
-package %w[
+unifont = if node[:lsb][:release].to_f < 22.04
+            "ttf-unifont"
+          else
+            "fonts-unifont"
+          end
+
+package %W[
   fonts-noto-cjk
   fonts-noto-hinted
   fonts-noto-unhinted
   fonts-hanazono
-  ttf-unifont
+  #{unifont}
 ]
 
 ["NotoSansArabicUI-Regular.ttf", "NotoSansArabicUI-Bold.ttf"].each do |font|
@@ -502,15 +509,22 @@ end
 
 package %w[
   osm2pgsql
-  ruby
   osmium-tool
   pyosmium
   python3-pyproj
 ]
 
-gem_package "apachelogregex"
-gem_package "file-tail"
-gem_package "lru_redux"
+gem_package "apachelogregex" do
+  gem_binary node[:ruby][:gem]
+end
+
+gem_package "file-tail" do
+  gem_binary node[:ruby][:gem]
+end
+
+gem_package "lru_redux" do
+  gem_binary node[:ruby][:gem]
+end
 
 remote_directory "/usr/local/bin" do
   source "bin"
@@ -695,6 +709,8 @@ munin_plugin "renderd_zoom_time"
 
 munin_plugin "replication_delay"
 
+package "ruby-webrick"
+
 prometheus_exporter "modtile" do
   port 9494
 end