Created
July 5, 2012 14:01
-
-
Save myusuf3/3053835 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
# | |
# Cookbook Name:: sourcemetrics | |
# Recipe:: default | |
# | |
# Copyright 2012, swixhq.com | |
# | |
# All rights reserved - Do Not Redistribute | |
# | |
node[:users].each_pair do |username, info| | |
group username do | |
gid info[:id] | |
end | |
user username do | |
comment info[:full_name] | |
uid info[:id] | |
gid info[:id] | |
shell "/bin/bash" | |
supports :manage_home => true | |
home "/home/#{username}" | |
end | |
directory "/home/#{username}/.ssh" do | |
owner username | |
group username | |
mode 0700 | |
end | |
file "/home/#{username}/.ssh/authorized_keys" do | |
owner username | |
group username | |
mode 0600 | |
content info[:key] | |
end | |
end | |
node[:groups].each_pair do |name, info| | |
group name do | |
gid info[:gid] | |
members info[:members] | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment