Created
April 7, 2014 04:34
-
-
Save initcron/10014871 to your computer and use it in GitHub Desktop.
Encrypted Data Bags
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
search( :users, "*:*" ).each do | user_account | | |
user_id = user_account['id'] | |
user_data = Chef::EncryptedDataBagItem.load("users", user_id) | |
user user_data['id'] do | |
comment user_data['comment'] | |
uid user_data['uid'] | |
gid user_data['gid'] | |
home user_data['home'] | |
shell user_data['shell'] | |
end | |
end | |
include_recipe "users::groups" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment