Make all config values configurable

And use a standard scheme for variable/key naming
This commit is contained in:
2025-06-01 19:57:04 +04:00
parent 8df7c00a14
commit 5f661d7304
5 changed files with 65 additions and 56 deletions

View File

@@ -59,7 +59,7 @@ user node["strfry"]["user"] do
shell "/bin/bash"
end
directory node["strfry"]["db_path"] do
directory node["strfry"]["config"]["db"] do
owner node["strfry"]["user"]
group node["strfry"]["group"]
mode "0755"
@@ -70,15 +70,7 @@ template "/etc/strfry.conf" do
mode "0644"
owner node["strfry"]["user"]
group node["strfry"]["group"]
variables config: {
db_path: node["strfry"]["db_path"],
bind: node["strfry"]["bind_ip"],
real_ip_header: node["strfry"]["real_ip_header"],
port: node["strfry"]["port"],
nofiles: node["strfry"]["nofiles"],
info: node["strfry"]["info"],
policy_path: node["strfry"]["policy_path"]
}
variables config: node["strfry"]["config"]
notifies :restart, "service[strfry]", :delayed
end