This plugin becomes optional in chef 15 so make sure it is
enabled, and cope during the first pass on a new node when
it is not enabled yet.
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
ohai.plugin_path << "<%= node[:ohai][:plugin_dir] %>"
+# Enable some optional ohai plugins
+
+ohai.optional_plugins = %w[Passwd]
+
# Load supporting code for report handlers
require "/etc/chef/report"