i try to create users on remote system by chef/knife, but something goes wrong... here is my steps:
- installing "user" cookbook
knife cookbook site install user
- creating data bag for it
knife data bag create users
- creating a json file with options
cat data_bags/users/fatal.json
{
"id": "fatal",
"uid": "1002",
"home": "/home/fatal",
"groups": "sudo",
"shell": "/bin/bash",
"password": "$6$wkWXnXUk$xjaISNyG3cDGU2XYBAf."
}
- exporting it in my data bag
knife data bag from file users data_bags/users/fatal.json
- adding recipe "user" to my remote node
knife node chef-test-client show
Node Name: chef-test-client
Environment: _default
FQDN: chef-test-client
IP: 192.168.16.777
Run List: recipe[group], recipe[user]
Roles:
Recipes: group, user
Platform: debian 7.1
Tags:
- uploading it on knife server
knife cookbook upload user
- synchronizing on my remote node
chef-client
Starting Chef Client, version 11.8.0
resolving cookbooks for run list: ["group::data_bag", "user::data_bag"]
Synchronizing Cookbooks:
- user
- group
Compiling Cookbooks...
Converging 0 resources
Chef Client finished, 0 resources updated
so nothing happens, user is not created; what am i doing wrong ?, guys please help me to deal with it
UPDATE:
in USAGE section on http://fnichol.github.io/chef-user/
To use recipe[user::data_bag], include it in your run_list and have a data bag called >"users"
so i changed my Run List settings to:
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], recipe[group::data_bag]
Roles:
Recipes: user::data_bag, group::data_bag
Platform: debian 7.1
and my data bag:
knife data bag show users fatal
groups: sudo
home: /home/fatal
id: fatal
password: >$6$wkWXnXUk$xjaISNyG3cDGU2X
shell: /bin/bash
uid: 1002
and nothing happens again :(