From 7f45655d90198b8d708f81a29460b6831a6c95ad Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Fri, 29 Jul 2022 17:57:43 +0100 Subject: [PATCH] Direct web site analytics to matomo.openstreetmap.org --- cookbooks/web/recipes/rails.rb | 8 ++++---- cookbooks/web/resources/rails_port.rb | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cookbooks/web/recipes/rails.rb b/cookbooks/web/recipes/rails.rb index 672da6bad..c60655f9e 100644 --- a/cookbooks/web/recipes/rails.rb +++ b/cookbooks/web/recipes/rails.rb @@ -52,7 +52,7 @@ end rails_directory = "#{node[:web][:base_directory]}/rails" -piwik = data_bag_item("web", "piwik") +matomo = data_bag_item("web", "matomo") storage = { "avatars" => { @@ -120,9 +120,9 @@ rails_port "www.openstreetmap.org" do id_application web_passwords["id_application"] oauth_key web_passwords["oauth_key"] oauth_application web_passwords["oauth_application"] - piwik_configuration "location" => piwik[:location], - "site" => piwik[:site], - "goals" => piwik[:goals].to_hash + matomo_configuration "location" => matomo[:location], + "site" => matomo[:site], + "goals" => matomo[:goals].to_hash google_auth_id "651529786092-6c5ahcu0tpp95emiec8uibg11asmk34t.apps.googleusercontent.com" google_auth_secret web_passwords["google_auth_secret"] google_openid_realm "https://www.openstreetmap.org" diff --git a/cookbooks/web/resources/rails_port.rb b/cookbooks/web/resources/rails_port.rb index 961bbc3a4..3fd031dd8 100644 --- a/cookbooks/web/resources/rails_port.rb +++ b/cookbooks/web/resources/rails_port.rb @@ -70,7 +70,7 @@ property :thunderforest_key, String property :totp_key, String property :csp_enforce, [true, false], :default => false property :csp_report_url, String -property :piwik_configuration, Hash +property :matomo_configuration, Hash property :storage_service, String, :default => "local" property :storage_url, String property :trace_use_job_queue, [true, false], :default => false @@ -377,12 +377,12 @@ action :create do content YAML.dump(storage_configuration) end - if new_resource.piwik_configuration + if new_resource.matomo_configuration file "#{rails_directory}/config/piwik.yml" do owner new_resource.user group new_resource.group mode "664" - content YAML.dump(new_resource.piwik_configuration) + content YAML.dump(new_resource.matomo_configuration) end else file "#{rails_directory}/config/piwik.yml" do -- 2.43.2