Created
February 3, 2017 11:37
-
-
Save anonymous/3496d12abd3f4b03d7182853a394600c to your computer and use it in GitHub Desktop.
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
include_recipe 'aws' | |
include_recipe 'user' | |
node.default['sshusers']['users'].each do |user| | |
user_account user[:name] do | |
ssh_keygen false | |
if user[:lock] == 'true' | |
action [:create, :lock] | |
ssh_keys [""] | |
else | |
action [:create, :unlock] | |
ssh_keys user[:ssh_public_keys] | |
end | |
end | |
end | |
[ | |
{ | |
:name => 'username', | |
:sudo => true, | |
:ssh_public_keys => ['public_key'] | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment