chef-user
chef-user copied to clipboard
default databag recipe error
I have a users data_bag created and when following instructions to add users in recipes it works great but when I try to run the user::data_bag recipe I am getting the following error:
NameError
Cannot find a resource for user_account on centos version 6.6
Cookbook Trace:
/var/chef/cache/cookbooks/chef-user/recipes/data_bag.rb:38:in block in from_file' /var/chef/cache/cookbooks/chef-user/recipes/data_bag.rb:34:ineach'
/var/chef/cache/cookbooks/chef-user/recipes/data_bag.rb:34:in `from_file'
Relevant File Content:
/var/chef/cache/cookbooks/chef-user/recipes/data_bag.rb:
31: user_array = data_bag(bag) if user_array.nil? || user_array.empty? 32: 33: # only manage the subset of users defined 34: Array(user_array).each do |i| 35: u = data_bag_item(bag, i.gsub(/[.]/, '-')) 36: username = u['username'] || u['id'] 37: 38>> user_account username do 39: %w{comment uid gid home shell password system_user manage_home create_group 40: ssh_keys ssh_keygen non_unique}.each do |attr| 41: send(attr, u[attr]) if u[attr] 42: end 43: action Array(u['action']).map { |a| a.to_sym } if u['action'] 44: end 45: 46: unless u['groups'].nil? || u['action'] == 'remove' 47: u['groups'].each do |groupname|
@digitalhero86 what version of chef and user cookbook you are using?
Chef version 11.8 cookbook version 4.2
@digitalhero86 I've just started to help out on this cookbook, and am starting to do some cleanup. I know your issue has been sitting unresolved for quite awhile.
Are you still running in to problems, or can we close your issue?