X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/18e12b0e123fc3e5f344682f884feabc12da0f5a..b0e841d7ff50e5c5bea3a3417737c272b09dcd86:/cookbooks/accounts/recipes/default.rb diff --git a/cookbooks/accounts/recipes/default.rb b/cookbooks/accounts/recipes/default.rb index ada3b08f8..250ca9e41 100644 --- a/cookbooks/accounts/recipes/default.rb +++ b/cookbooks/accounts/recipes/default.rb @@ -1,8 +1,8 @@ # -# Cookbook Name:: accounts +# Cookbook:: accounts # Recipe:: default # -# Copyright 2010, OpenStreetMap Foundation +# Copyright:: 2010, OpenStreetMap Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -39,9 +39,15 @@ search(:accounts, "*:*").each do |account| user_shell = details[:shell] || account["shell"] || node[:accounts][:shell] end + available_users = if node[:etc] + node[:etc][:passwd].keys + else + [] + end + group name.to_s do gid account["uid"].to_i - members group_members & node[:etc][:passwd].keys + members group_members & available_users end user name.to_s do