From eeb3f3259affd3f23712f8bce4f4208b64f4f4e8 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Mon, 2 Mar 2026 08:38:23 +0000 Subject: [PATCH] Configure gpstile user directly using chef resources --- cookbooks/gps-tile/attributes/default.rb | 1 - cookbooks/gps-tile/metadata.rb | 1 - cookbooks/gps-tile/recipes/default.rb | 14 +++++++++++++- roles/gps-tile.rb | 8 -------- test/data_bags/accounts/gpstile.json | 6 ------ 5 files changed, 13 insertions(+), 17 deletions(-) delete mode 100644 cookbooks/gps-tile/attributes/default.rb delete mode 100644 test/data_bags/accounts/gpstile.json diff --git a/cookbooks/gps-tile/attributes/default.rb b/cookbooks/gps-tile/attributes/default.rb deleted file mode 100644 index 61ab02a8b..000000000 --- a/cookbooks/gps-tile/attributes/default.rb +++ /dev/null @@ -1 +0,0 @@ -default[:accounts][:users][:gpstile][:status] = :role diff --git a/cookbooks/gps-tile/metadata.rb b/cookbooks/gps-tile/metadata.rb index c23644f44..7908ce30d 100644 --- a/cookbooks/gps-tile/metadata.rb +++ b/cookbooks/gps-tile/metadata.rb @@ -6,7 +6,6 @@ description "Configures a GPS tile server" version "1.0.0" supports "ubuntu" -depends "accounts" depends "apache" depends "git" depends "memcached" diff --git a/cookbooks/gps-tile/recipes/default.rb b/cookbooks/gps-tile/recipes/default.rb index 5fa394481..26060aff1 100644 --- a/cookbooks/gps-tile/recipes/default.rb +++ b/cookbooks/gps-tile/recipes/default.rb @@ -17,7 +17,6 @@ # limitations under the License. # -include_recipe "accounts" include_recipe "apache" include_recipe "git" include_recipe "memcached" @@ -35,6 +34,19 @@ package %w[ libcache-memcached-perl ] +group "gpstile" do + gid 519 +end + +user "gpstile" do + uid 519 + gid 519 + comment "gps-tile.openstreetmap.org" + home "/srv/gps-tile.openstreetmap.org" + shell "/usr/sbin/nologin" + manage_home false +end + directory "/srv/gps-tile.openstreetmap.org" do owner "gpstile" group "gpstile" diff --git a/roles/gps-tile.rb b/roles/gps-tile.rb index e6a0e5ec2..7e03c724e 100644 --- a/roles/gps-tile.rb +++ b/roles/gps-tile.rb @@ -2,14 +2,6 @@ name "gps-tile" description "Role applied to all GPS tile servers" default_attributes( - :accounts => { - :users => { - :enf => { :status => :administrator }, - :gpstile => { - :members => [:enf, :tomh] - } - } - }, :apache => { :mpm => "event", :event => { diff --git a/test/data_bags/accounts/gpstile.json b/test/data_bags/accounts/gpstile.json deleted file mode 100644 index 3a242c4ed..000000000 --- a/test/data_bags/accounts/gpstile.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "id": "gpstile", - "uid": "519", - "comment": "gps-tile.openstreetmap.org", - "home": "/srv/gps-tile.openstreetmap.org" -} -- 2.39.5