Skip to content

Instantly share code, notes, and snippets.

@webframp
Created June 21, 2012 23:52
Show Gist options
  • Save webframp/2969310 to your computer and use it in GitHub Desktop.
Save webframp/2969310 to your computer and use it in GitHub Desktop.
user_keys = ""
search(:users, 'groups:sysadmin') do |u|
user_keys << u['ssh_keys']
end
file '/var/www/.ssh/authorized_keys' do
action :create
owner node[:nginx][:user]
mode 0400
content user_keys.to_s
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment