Skip to content

Instantly share code, notes, and snippets.

@salgo
Created April 2, 2015 09:11
Show Gist options
  • Save salgo/02000916073be8e755ea to your computer and use it in GitHub Desktop.
Save salgo/02000916073be8e755ea to your computer and use it in GitHub Desktop.
execute 'create-ssh-key-' + account_id do
user account_id
cwd user_home
environment(
'HOME' => user_home,
'USER' => account_id
)
command 'ssh-keygen -t rsa -N "" -f ~/.ssh/id_rsa'
not_if { ::File.exist?(File.join(user_home, '.ssh', 'id_rsa')) }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment