From 200af9412a47eeaacf455cc39a20d170e37160b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A2u=20Cao?= Date: Sat, 18 Apr 2026 16:34:02 +0400 Subject: [PATCH] Configure landing page and admin dashboard --- attributes/default.rb | 5 +++++ recipes/default.rb | 7 ++++++- templates/default/config.yml.erb | 11 +++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/attributes/default.rb b/attributes/default.rb index af8e1f5..35c471a 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -16,3 +16,8 @@ node.default['blossom']['list']['enabled'] = true node.default['blossom']['list']['require_auth'] = true node.default['blossom']['list']['allow_list_others'] = false node.default['blossom']['delete']['require_auth'] = true +node.default['blossom']['landing']['enabled'] = true +node.default['blossom']['landing']['title'] = 'Blossom Server' +node.default['blossom']['dashboard']['enabled'] = false +node.default['blossom']['dashboard']['username'] = 'admin' +node.default['blossom']['dashboard']['password'] = nil diff --git a/recipes/default.rb b/recipes/default.rb index 576989c..79ff4d6 100644 --- a/recipes/default.rb +++ b/recipes/default.rb @@ -63,7 +63,12 @@ template "#{node['blossom']['install_dir']}/config.yml" do list_enabled: node['blossom']['list']['enabled'], list_require_auth: node['blossom']['list']['require_auth'], list_allow_others: node['blossom']['list']['allow_list_others'], - delete_require_auth: node['blossom']['delete']['require_auth'] + delete_require_auth: node['blossom']['delete']['require_auth'], + landing_enabled: node['blossom']['landing']['enabled'], + landing_title: node['blossom']['landing']['title'], + dashboard_enabled: node['blossom']['dashboard']['enabled'], + dashboard_username: node['blossom']['dashboard']['username'], + dashboard_password: node['blossom']['dashboard']['password'] ) notifies :restart, 'service[blossom]', :delayed end diff --git a/templates/default/config.yml.erb b/templates/default/config.yml.erb index 64f2284..c3595a2 100644 --- a/templates/default/config.yml.erb +++ b/templates/default/config.yml.erb @@ -49,3 +49,14 @@ list: delete: requireAuth: <%= @delete_require_auth %> + +landing: + enabled: <%= @landing_enabled %> + title: "<%= @landing_title %>" + +<% if @dashboard_enabled %> +dashboard: + enabled: true + username: "<%= @dashboard_username %>" + password: "<%= @dashboard_password %>" +<% end %>