Created
February 3, 2017 11:08
-
-
Save anonymous/1320069d720f17a5ec2f36ca058c1a80 to your computer and use it in GitHub Desktop.
This file contains 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[:locked] | |
action [:create, :lock] | |
ssh_keys [""] | |
else | |
action [:create, :unlock] | |
ssh_keys user[:ssh_public_keys] | |
end | |
end | |
end | |
attributes.rb | |
default['sshusers']['users'] = | |
[ | |
{ | |
:name => 'user.name', | |
:sudo => true, | |
:ssh_public_keys => ['public_keyxyz'] | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment