Created
December 14, 2009 23:02
-
-
Save rcreasey/256526 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
set_unless[:users] = Mash.new | |
set_unless[:groups] = Mash.new |
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
developers Mash.new | |
developers[:jsmith] = {:password => '$1$1.UoruVN$SbJ5brbBSHJBHP.GL3Li81', :comment => "Joe Smith", :uid => 9204 } | |
developers[:bgray] = {:password => '$1$Hjrkl9/v$5UTUjH7jwzwkuRJ65n9Lo/', :comment => "Bill Gray", :uid => 9320 } | |
set[:users] = developers |
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 'accounts' |
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
developers = Mash.new | |
developers[:holie] = {:password => '$1$cYwnpTlP$41tKhDPAriNTS1XnqsZYo1', :comment => "Harold Oile", :uid => 4554 } | |
developers[:dmartin] = {:password => '$1$A/XPK6ui$jDNphYvk.fsPYnhc/506i/', :comment => "Danielle Martin", :uid => 4885 } | |
set[:users] = developers | |
groups = Mash.new | |
groups[:lamp] = {:gid => 5032, :members => ['holie', 'dmartin']} | |
set[:groups] = groups |
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 'accounts' |
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
package 'ruby-shadow' | |
node[:users].each do |u, config| | |
user u do | |
comment config[:comment] | |
uid config[:uid] | |
home "/home/#{u}" | |
shell "/bin/bash" | |
password config[:password] | |
supports :manage_home => false | |
action [:create] | |
end | |
end | |
node[:groups].each do |g, config| | |
group g do | |
gid config[:gid] | |
members config[:members] | |
append true | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment