Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I started to use Chef in my infrastructure, but cannot make recipe like this:

-each developer has own public ssh-key.

-in remote server there is an unique user, named ubuntu

I want to use data bags with users, like data_bags/users/jeff.json, data_bags/users/aaron.json, etc.

Create user ubuntu and keys from these users need to upload to ubuntu(authorized_keys) in the remote system, and delete from there if I deleted it from data_bags/users.

Are the standard cookbook users permit this? I'll be grateful if you provide an example or as any help.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

The standard users cookbook manages keys of each user, with no option to look-up keys from other users in the data bag. You can use the "search" API in chef to gather all keys from data bag users and append these to your user of choice. See example in the standard users cookbook.

share|improve this answer
    
Thank you. I've used users cookbook for this. –  astlock Apr 4 '13 at 9:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.