From 7200f29b34e2a219161d24d7c9c71b95acf0bc03 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sun, 1 Mar 2026 22:56:36 +0000 Subject: [PATCH] Configure otrs user directly using chef resources --- cookbooks/otrs/attributes/default.rb | 3 --- cookbooks/otrs/recipes/default.rb | 19 +++++++++++++++++++ test/data_bags/accounts/otrs.json | 7 ------- 3 files changed, 19 insertions(+), 10 deletions(-) delete mode 100644 test/data_bags/accounts/otrs.json diff --git a/cookbooks/otrs/attributes/default.rb b/cookbooks/otrs/attributes/default.rb index cb21e5ff8..4426442e5 100644 --- a/cookbooks/otrs/attributes/default.rb +++ b/cookbooks/otrs/attributes/default.rb @@ -7,6 +7,3 @@ default[:otrs][:database_password] = "otrs" default[:otrs][:site] = "otrs" default[:postgresql][:versions] |= ["16"] - -default[:accounts][:users][:otrs][:status] = :role -default[:accounts][:groups][:"www-data"][:members] = [:otrs] diff --git a/cookbooks/otrs/recipes/default.rb b/cookbooks/otrs/recipes/default.rb index 1b3e5810b..e8be687a6 100644 --- a/cookbooks/otrs/recipes/default.rb +++ b/cookbooks/otrs/recipes/default.rb @@ -25,6 +25,25 @@ include_recipe "tools" passwords = data_bag_item("otrs", "passwords") +group "otrs" do + gid 513 +end + +user "otrs" do + uid 513 + gid 513 + comment "otrs.openstreetmap.org" + home "/usr/share/otrs" + shell "/usr/sbin/nologin" + manage_home false +end + +group "www-data" do + action :modify + members %w[otrs] + append true +end + apache_module "perl" do package "libapache2-mod-perl2" end diff --git a/test/data_bags/accounts/otrs.json b/test/data_bags/accounts/otrs.json deleted file mode 100644 index e1354ef76..000000000 --- a/test/data_bags/accounts/otrs.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "id": "otrs", - "uid": "513", - "comment": "otrs.openstreetmap.org", - "home": "/opt/otrs", - "manage_home": false -} -- 2.39.5