fnichol/chef-user

troubles with data bag

Closed this issue · 4 comments

hello, as it is written in USAGE section i added recipe[user::data_bag] into run list:

knife node show chef-test-client
Node Name: chef-test-client
Environment: _default
FQDN: chef-test-client
IP: 192.168.16.777
Run List: recipe[user::data_bag]
Roles:
Recipes: user::data_bag
Platform: debian 7.1

here is my data bag:
and my data bag:

knife data bag show users user
groups: sudo
home: /home/user
id: user
password: >$6$wkWXnXUk$xjaISNyG3cDGU2X
shell: /bin/bash
uid: 1002

and after executing chef-client on client node, nothing happens, user is not created; what am i doing wrong ?, guys please help me to deal with it

did you ever resolve? having the same problem.

try using my fork (https://github.com/thewebfellas/chef-user/) - i made a change in this area when i was using it, and i think it was for the same reason - i.e. that it wasn't doing anything - give it a try, see if it helps

@chris-at-thewebfellas Thanks a lot, you saved my day

I believe the reason this isn't working is because the users attribute on the node is empty. When using the user::data_bag recipe, you need to set the equivalent on your node:

default['users'] = ['user', 'admin', 'person']

However, this ticket was opened so long ago it may be hard to know. With how long this issue has been opened without an update I'm going to close it. You you are still having problems, please don't hesitate to open a new issue.