Sha256: 6ff572fb47af4d6f8b4c2e9edb8d23c20310a9333c1c56cbb5ba6dcdac4044f4
Contents?: true
Size: 1.51 KB
Versions: 20
Compression:
Stored size: 1.51 KB
Contents
=begin rdoc == User The user resource ensures there is a user created on the nodes == Usage has_user(:name => '...') do # More options. # This block is optional end == Options * <tt>name</tt> Name of the service to be running * <tt>comment</tt> Comment about the user * <tt>uid</tt> uid of the user * <tt>gid</tt> gid of the user * <tt>home</tt> Home directory of the user * <tt>shell</tt> Shell type of the user * <tt>password</tt> The hashed password == Examples has_user "fred" do home "/home/fred" end =end module PoolParty module Resources class User < Resource default_options( :action => nil, :comment => nil, :uid => nil, :gid => nil, :home => nil, :shell => nil, :password => nil, :supports => {:manage_home => false} ) def print_to_chef str = 'user "<%= name %>" do action <%= print_variable(action ? action : (exists ? :create : :remove)) %> ' str << " comment <%= print_variable(comment) %>\n" if comment str << " uid <%= print_variable(uid) %>\n" if uid str << " gid <%= print_variable(gid) %>\n" if gid str << " home <%= print_variable(home) %>\n" if home str << " shell <%= print_variable(shell) %>\n" if shell str << " password <%= print_variable(password) %>\n" if password str << " supports <%= print_variable(supports) %>\n" if supports str << "end" end end end end
Version data entries
20 entries across 20 versions & 3 rubygems