From: Tom Hughes Date: Sun, 14 Jul 2019 18:23:16 +0000 (+0100) Subject: Always confgure a local storage service X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/f7a188f47e729ecb0a53012ce4b238a6904a3358?hp=c5c505d5746539d0b3925b5009a393a5f00cff18 Always confgure a local storage service --- diff --git a/cookbooks/web/resources/rails_port.rb b/cookbooks/web/resources/rails_port.rb index 7eac0df88..189c01bbf 100644 --- a/cookbooks/web/resources/rails_port.rb +++ b/cookbooks/web/resources/rails_port.rb @@ -68,7 +68,7 @@ property :csp_report_url, String property :piwik_configuration, Hash property :trace_use_job_queue, [TrueClass, FalseClass], :default => false property :diary_feed_delay, Integer -property :storage_configuration, Hash +property :storage_configuration, Hash, :default => {} property :storage_service, String, :default => "local" property :storage_url, String @@ -350,12 +350,12 @@ action :create do only_if { ::File.exist?("#{rails_directory}/config/settings.yml") } end - storage_configuration = new_resource.storage_configuration || { + storage_configuration = new_resource.storage_configuration.merge( "local" => { "service" => "Disk", "root" => "#{rails_directory}/storage" } - } + ) file "#{rails_directory}/config/storage.yml" do owner new_resource.user