X-Git-Url: https://git.openstreetmap.org/chef.git/blobdiff_plain/c9d8619094fe8690974cf4cb8cbc7a316e0d52f6..ee9c58254ff188cc9a8d13e1d32e421be0b265f7:/cookbooks/taginfo/recipes/default.rb diff --git a/cookbooks/taginfo/recipes/default.rb b/cookbooks/taginfo/recipes/default.rb index ec62ae45a..35166f1d0 100644 --- a/cookbooks/taginfo/recipes/default.rb +++ b/cookbooks/taginfo/recipes/default.rb @@ -80,14 +80,14 @@ template "/etc/sudoers.d/taginfo" do end node[:taginfo][:sites].each do |site| - name = site[:name] - directory = site[:directory] || "/srv/#{name}" + site_name = site[:name] + directory = site[:directory] || "/srv/#{site_name}" description = site[:description] about = site[:about] icon = site[:icon] contact = site[:contact] - directory "/var/log/taginfo/#{name}" do + directory "/var/log/taginfo/#{site_name}" do owner "taginfo" group "taginfo" mode 0o755 @@ -102,7 +102,7 @@ node[:taginfo][:sites].each do |site| git "#{directory}/libosmium" do action :sync repository "git://github.com/osmcode/libosmium.git" - revision "v2.8.0" + revision "v2.10.3" user "taginfo" group "taginfo" end @@ -110,14 +110,14 @@ node[:taginfo][:sites].each do |site| git "#{directory}/osmium-tool" do action :sync repository "git://github.com/osmcode/osmium-tool.git" - revision "v1.3.1" + revision "v1.4.1" user "taginfo" group "taginfo" end git "#{directory}/taginfo" do action :sync - repository "git://github.com/joto/taginfo.git" + repository "git://github.com/taginfo/taginfo.git" revision "osmorg-taginfo-live" user "taginfo" group "taginfo" @@ -126,13 +126,13 @@ node[:taginfo][:sites].each do |site| settings = Chef::DelayedEvaluator.new do settings = JSON.parse(IO.read("#{directory}/taginfo/taginfo-config-example.json")) - settings["instance"]["url"] = "http://#{name}/" + settings["instance"]["url"] = "http://#{site_name}/" settings["instance"]["description"] = description settings["instance"]["about"] = about settings["instance"]["icon"] = "/img/logo/#{icon}.png" settings["instance"]["contact"] = contact settings["instance"]["access_control_allow_origin"] = "" - settings["logging"]["directory"] = "/var/log/taginfo/#{name}" + settings["logging"]["directory"] = "/var/log/taginfo/#{site_name}" settings["opensearch"]["shortname"] = "Taginfo" settings["opensearch"]["contact"] = "webmaster@openstreetmap.org" settings["sources"]["download"] = "" @@ -231,10 +231,16 @@ node[:taginfo][:sites].each do |site| owner "taginfo" group "taginfo" mode 0o755 - variables :name => name, :directory => directory + variables :name => site_name, :directory => directory end - apache_site name do + ssl_certificate site_name do + domains site_name + fallback_certificate "openstreetmap" + notifies :reload, "service[apache2]" + end + + apache_site site_name do template "apache.erb" directory "#{directory}/taginfo/web/public" end