From 3efa11992d54662e84c0ae1650c45508a61554f2 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Mon, 2 Mar 2026 22:42:27 +0000 Subject: [PATCH] Configure imagery user directly using chef resources --- cookbooks/imagery/attributes/default.rb | 1 - cookbooks/imagery/metadata.rb | 1 - cookbooks/imagery/recipes/default.rb | 17 +++++++++++++++-- roles/imagery.rb | 5 +++-- 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/cookbooks/imagery/attributes/default.rb b/cookbooks/imagery/attributes/default.rb index 1dc162ac3..e3afab834 100644 --- a/cookbooks/imagery/attributes/default.rb +++ b/cookbooks/imagery/attributes/default.rb @@ -1,2 +1 @@ -default[:accounts][:users][:imagery][:status] = :role default[:nginx][:cache][:proxy][:enable] = true diff --git a/cookbooks/imagery/metadata.rb b/cookbooks/imagery/metadata.rb index 85dbc657c..234cdd332 100644 --- a/cookbooks/imagery/metadata.rb +++ b/cookbooks/imagery/metadata.rb @@ -6,7 +6,6 @@ description "Installs and configures imagery" version "1.0.0" supports "ubuntu" -depends "accounts" depends "git" depends "nginx" depends "podman" diff --git a/cookbooks/imagery/recipes/default.rb b/cookbooks/imagery/recipes/default.rb index edc860965..9a5152504 100644 --- a/cookbooks/imagery/recipes/default.rb +++ b/cookbooks/imagery/recipes/default.rb @@ -17,9 +17,22 @@ # limitations under the License. # -include_recipe "accounts" -include_recipe "nginx" include_recipe "git" +include_recipe "nginx" + +group "imagery" do + gid 523 + append true +end + +user "imagery" do + uid 523 + gid 523 + comment "Imagery" + home "/srv/imagery" + shell "/usr/sbin/nologin" + manage_home false +end # Imagery gdal and proj requirements package %w[ diff --git a/roles/imagery.rb b/roles/imagery.rb index 384f8cad3..024878d08 100644 --- a/roles/imagery.rb +++ b/roles/imagery.rb @@ -7,9 +7,10 @@ default_attributes( :dmlu => { :status => :user }, :htonl => { :status => :user }, :ignisf => { :status => :user }, - :stereo => { :status => :administrator }, + :stereo => { :status => :administrator } + }, + :groups => { :imagery => { - :status => :role, :members => [:grant, :tomh, :dmlu, :htonl, :stereo, :ignisf] } } -- 2.47.3