I use users cookbook.
I declare a role with appropriate run_list
“run_list”: [
“recipe[users]”,
“recipe[users::sysadmins]”,
Add this role to node, prior to run chef-client of course.
Creating data bag users/sysadmin:
{
“id”: “sysadmin”,
“groups”: [ “root”, “sysadmin” ],
“action”: “create”,
“password”: “”,
“shell”: “/bin/bash”,
“comment”: “Server Admin”,
“nagios”: {
“email”: "sysadmin@example.com"
}
Run chef-client on node, and user “sysadmin” & group “sysadmin” doesn’t
created.
Why ?
Add recipe users, and users cookbook is enough for user’s auto creation,
when using opscode/users cookbook ?
–
Best regards,
CVision Lab System Administrator
Vladmir Skubriev
Mike
2
Vladimir,
Is the data bag item valid json? From what you've pasted, it doesn't look
like it has a final closing }.
And has the data bag been uploaded to Chef Server?
-M
On Mon, Dec 9, 2013 at 7:53 AM, Vladimir Skubriev
skubriev@cvisionlab.comwrote:
I use users cookbook.
I declare a role with appropriate run_list
"run_list": [
"recipe[users]",
"recipe[users::sysadmins]",
Add this role to node, prior to run chef-client of course.
Creating data bag users/sysadmin:
{
"id": "sysadmin",
"groups": [ "root", "sysadmin" ],
"action": "create",
"password": "",
"shell": "/bin/bash",
"comment": "Server Admin",
"nagios": {
"email": "sysadmin@example.com"
}
Run chef-client on node, and user "sysadmin" & group "sysadmin" doesn't
created.
Why ?
Add recipe users, and users cookbook is enough for user's auto creation,
when using opscode/users cookbook ?
--
Best regards,
CVision Lab System Administrator
Vladmir Skubriev
09.12.2013 18:10, Mike пишет:
Vladimir,
Is the data bag item valid json? From what you've pasted, it doesn't
look like it has a final closing }.
And has the data bag been uploaded to Chef Server?
-M
Thank you for suggest.
I use a valid data bag(full version copy from vim):
{
"name": "data_bag_item_users_sysadmin",
"json_class": "Chef::DataBagItem",
"chef_type": "data_bag_item",
"data_bag": "users",
"raw_data": {
"groups": [
"root",
"sysadmin"
],
"id": "sysadmin",
"comment": "Server Admin",
"password": "",
"nagios": {
"email": "sysadmin@example.com"
},
"action": "create",
"shell": "/bin/bash"
}
}
Additionaly! This databag can be viewed from web ui of chef-server.
--
Best regards,
CVision Lab System Administrator
Vladmir Skubriev
09.12.2013 18:10, Mike пишет:
Vladimir,
Is the data bag item valid json? From what you've pasted, it doesn't
look like it has a final closing }.
And has the data bag been uploaded to Chef Server?
-M
There is a problem with a run_list and environment.
CLOSED.
Thank you
--
Best regards,
CVision Lab System Administrator
Vladmir Skubriev