class Chef::Resource::User
Use the user resource to add users, update existing users, remove users, and to lock/unlock user passwords.
Public Class Methods
new(name, run_context = nil)
click to toggle source
Calls superclass method
Chef::Resource.new
# File lib/chef/resource/user.rb, line 33 def initialize(name, run_context = nil) super @username = name @comment = nil @uid = nil @gid = nil @home = nil @shell = nil @password = nil @system = false @manage_home = false @force = false @non_unique = false @iterations = 27855 @salt = nil end
Public Instance Methods
comment(arg = nil)
click to toggle source
# File lib/chef/resource/user.rb, line 58 def comment(arg = nil) set_or_return( :comment, arg, :kind_of => [ String ] ) end
force(arg = nil)
click to toggle source
# File lib/chef/resource/user.rb, line 142 def force(arg = nil) set_or_return( :force, arg, :kind_of => [ TrueClass, FalseClass ] ) end
gid(arg = Chef::NOT_PASSED)
click to toggle source
# File lib/chef/resource/user.rb, line 75 def gid(arg = Chef::NOT_PASSED) set_or_return( :gid, arg, :kind_of => [ String, Integer, NilClass ], :coerce => proc { |x| x || nil } ) end
Also aliased as: group
home(arg = nil)
click to toggle source
# File lib/chef/resource/user.rb, line 86 def home(arg = nil) set_or_return( :home, arg, :kind_of => [ String ] ) end
iterations(arg = nil)
click to toggle source
# File lib/chef/resource/user.rb, line 118 def iterations(arg = nil) set_or_return( :iterations, arg, :kind_of => [ Integer ] ) end
manage_home(arg = nil)
click to toggle source
# File lib/chef/resource/user.rb, line 134 def manage_home(arg = nil) set_or_return( :manage_home, arg, :kind_of => [ TrueClass, FalseClass ] ) end
non_unique(arg = nil)
click to toggle source
# File lib/chef/resource/user.rb, line 150 def non_unique(arg = nil) set_or_return( :non_unique, arg, :kind_of => [ TrueClass, FalseClass ] ) end
password(arg = nil)
click to toggle source
# File lib/chef/resource/user.rb, line 102 def password(arg = nil) set_or_return( :password, arg, :kind_of => [ String ] ) end
salt(arg = nil)
click to toggle source
# File lib/chef/resource/user.rb, line 110 def salt(arg = nil) set_or_return( :salt, arg, :kind_of => [ String ] ) end
shell(arg = nil)
click to toggle source
# File lib/chef/resource/user.rb, line 94 def shell(arg = nil) set_or_return( :shell, arg, :kind_of => [ String ] ) end
system(arg = nil)
click to toggle source
# File lib/chef/resource/user.rb, line 126 def system(arg = nil) set_or_return( :system, arg, :kind_of => [ TrueClass, FalseClass ] ) end
uid(arg = Chef::NOT_PASSED)
click to toggle source
# File lib/chef/resource/user.rb, line 66 def uid(arg = Chef::NOT_PASSED) set_or_return( :uid, arg, :kind_of => [ String, Integer, NilClass ], :coerce => proc { |x| x || nil } ) end
username(arg = nil)
click to toggle source
# File lib/chef/resource/user.rb, line 50 def username(arg = nil) set_or_return( :username, arg, :kind_of => [ String ] ) end