X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/7f45655d90198b8d708f81a29460b6831a6c95ad..8e966b7cab9aaca8f56ebc92f371f8db0c5303cc:/cookbooks/web/resources/rails_port.rb diff --git a/cookbooks/web/resources/rails_port.rb b/cookbooks/web/resources/rails_port.rb index 3fd031dd8..14a9c0bfb 100644 --- a/cookbooks/web/resources/rails_port.rb +++ b/cookbooks/web/resources/rails_port.rb @@ -55,6 +55,7 @@ property :oauth_key, String property :oauth_application, String property :nominatim_url, String property :overpass_url, String +property :overpass_credentials, [true, false], :default => false property :google_auth_id, String property :google_auth_secret, String property :google_openid_realm, String @@ -306,6 +307,7 @@ action :create do "oauth_application", "nominatim_url", "overpass_url", + "overpass_credentials", "google_auth_id", "google_auth_secret", "google_openid_realm", @@ -355,6 +357,10 @@ action :create do settings["gpx_image_dir"] = "#{new_resource.gpx_dir}/images" end + if new_resource.matomo_configuration + settings["matomo"] = new_resource.matomo_configuration.to_h + end + file "#{rails_directory}/config/settings.local.yml" do owner new_resource.user group new_resource.group @@ -377,17 +383,8 @@ action :create do content YAML.dump(storage_configuration) end - 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.matomo_configuration) - end - else - file "#{rails_directory}/config/piwik.yml" do - action :delete - end + file "#{rails_directory}/config/piwik.yml" do + action :delete end bundle_install "#{rails_directory}" do @@ -448,7 +445,6 @@ action :create do subscribes :run, "file[create:#{rails_directory}/config/application.yml]" subscribes :run, "file[#{rails_directory}/config/settings.local.yml]" subscribes :run, "file[#{rails_directory}/config/storage.yml]" - subscribes :run, "file[#{rails_directory}/config/piwik.yml]" subscribes :run, "bundle_exec[#{rails_directory}/package.json]" subscribes :run, "bundle_exec[#{rails_directory}/app/assets/javascripts/i18n]" only_if { new_resource.build_assets } @@ -467,7 +463,6 @@ action :create do subscribes :restart, "file[create:#{rails_directory}/config/application.yml]" subscribes :restart, "file[#{rails_directory}/config/settings.local.yml]" subscribes :restart, "file[#{rails_directory}/config/storage.yml]" - subscribes :restart, "file[#{rails_directory}/config/piwik.yml]" subscribes :restart, "bundle_installl[#{rails_directory}]" subscribes :restart, "bundle_exec[#{rails_directory}/db/migrate]" subscribes :restart, "bundle_exec[#{rails_directory}/package.json]"