Class: Ansible::Ruby::Modules::User
- Inherits:
-
Base
- Object
- Ansible::Ruby::Models::Base
- Base
- Ansible::Ruby::Modules::User
- Defined in:
- lib/ansible/ruby/modules/generated/system/user.rb
Overview
Manage user accounts and user attributes. For Windows targets, use the M(win_user) module instead.
Instance Method Summary collapse
-
#append ⇒ :yes, ...
If C(yes), add the user to the groups specified in C(groups).,If C(no), user will only be added to the groups specified in C(groups), removing them from all other groups.
-
#comment ⇒ String?
Optionally sets the description (aka I(GECOS)) of user account.
-
#create_home ⇒ :yes, ...
Unless set to C(no), a home directory will be made for the user when the account is created or if the home directory does not exist.,Changed from C(createhome) to C(create_home) in version 2.5.
-
#expires ⇒ Integer?
An expiry time for the user in epoch, it will be ignored on platforms that do not support this.
-
#force ⇒ :yes, ...
This only affects C(state=absent), it forces removal of the user and associated directories on supported platforms.
-
#generate_ssh_key ⇒ :yes, ...
Whether to generate a SSH key for the user in question.
-
#group ⇒ String?
Optionally sets the user’s primary group (takes a group name).
-
#groups ⇒ Array<String>, ...
List of groups user will be added to.
-
#hidden ⇒ Symbol?
MacOS only, optionally hide the user from the login window and system preferences.,The default will be ‘True’ if the I(system) option is used.
-
#home ⇒ Object?
Optionally set the user’s home directory.
-
#local ⇒ :yes, ...
Forces the use of “local” command alternatives on platforms that implement it.
-
#login_class ⇒ Object?
Optionally sets the user’s login class, a feature of most BSD OSs.
-
#move_home ⇒ :yes, ...
If set to C(yes) when used with C(home=), attempt to move the user’s old home directory to the specified directory if it isn’t there already and the old home exists.
-
#name ⇒ String
Name of the user to create, remove or modify.
-
#non_unique ⇒ :yes, ...
Optionally when used with the -u option, this option allows to change the user ID to a non-unique value.
-
#password ⇒ Object?
Optionally set the user’s password to this crypted value.,On macOS systems, this value has to be cleartext.
-
#password_lock ⇒ Symbol?
Lock the password (usermod -L, pw lock, usermod -C).
-
#remove ⇒ :yes, ...
This only affects C(state=absent), it attempts to remove directories associated with the user.
-
#seuser ⇒ Object?
Optionally sets the seuser type (user_u) on selinux enabled systems.
-
#shell ⇒ String?
Optionally set the user’s shell.,On macOS, before version 2.5, the default shell for non-system users was /usr/bin/false.
-
#skeleton ⇒ Object?
Optionally set a home skeleton directory.
-
#ssh_key_bits ⇒ String?
Optionally specify number of bits in SSH key to create.
-
#ssh_key_comment ⇒ String?
Optionally define the comment for the SSH key.
-
#ssh_key_file ⇒ String?
Optionally specify the SSH key filename.
-
#ssh_key_passphrase ⇒ Object?
Set a passphrase for the SSH key.
-
#ssh_key_type ⇒ String?
Optionally specify the type of SSH key to generate.
-
#state ⇒ :absent, ...
Whether the account should exist or not, taking action if the state is different from what is stated.
-
#system ⇒ :yes, ...
When creating an account C(state=present), setting this to C(yes) makes the user a system account.
-
#uid ⇒ Integer?
Optionally sets the I(UID) of the user.
-
#update_password ⇒ :always, ...
C(always) will update passwords if they differ.
Methods inherited from Base
Methods inherited from Ansible::Ruby::Models::Base
attr_option, attr_options, attribute, fix_inclusion, #initialize, remove_existing_validations, #to_h, validates
Constructor Details
This class inherits a constructor from Ansible::Ruby::Models::Base
Instance Method Details
#append ⇒ :yes, ...
44 |
# File 'lib/ansible/ruby/modules/generated/system/user.rb', line 44 attribute :append |
#comment ⇒ String?
21 |
# File 'lib/ansible/ruby/modules/generated/system/user.rb', line 21 attribute :comment |
#create_home ⇒ :yes, ...
65 |
# File 'lib/ansible/ruby/modules/generated/system/user.rb', line 65 attribute :create_home |
#expires ⇒ Integer?
115 |
# File 'lib/ansible/ruby/modules/generated/system/user.rb', line 115 attribute :expires |
#force ⇒ :yes, ...
77 |
# File 'lib/ansible/ruby/modules/generated/system/user.rb', line 77 attribute :force |
#generate_ssh_key ⇒ :yes, ...
88 |
# File 'lib/ansible/ruby/modules/generated/system/user.rb', line 88 attribute :generate_ssh_key |
#group ⇒ String?
36 |
# File 'lib/ansible/ruby/modules/generated/system/user.rb', line 36 attribute :group |
#groups ⇒ Array<String>, ...
40 |
# File 'lib/ansible/ruby/modules/generated/system/user.rb', line 40 attribute :groups |
#hidden ⇒ Symbol?
25 |
# File 'lib/ansible/ruby/modules/generated/system/user.rb', line 25 attribute :hidden |
#home ⇒ Object?
52 |
# File 'lib/ansible/ruby/modules/generated/system/user.rb', line 52 attribute :home |
#local ⇒ :yes, ...
123 |
# File 'lib/ansible/ruby/modules/generated/system/user.rb', line 123 attribute :local |
#login_class ⇒ Object?
85 |
# File 'lib/ansible/ruby/modules/generated/system/user.rb', line 85 attribute :login_class |
#move_home ⇒ :yes, ...
69 |
# File 'lib/ansible/ruby/modules/generated/system/user.rb', line 69 attribute :move_home |
#name ⇒ String
13 |
# File 'lib/ansible/ruby/modules/generated/system/user.rb', line 13 attribute :name |
#non_unique ⇒ :yes, ...
29 |
# File 'lib/ansible/ruby/modules/generated/system/user.rb', line 29 attribute :non_unique |
#password ⇒ Object?
58 |
# File 'lib/ansible/ruby/modules/generated/system/user.rb', line 58 attribute :password |
#password_lock ⇒ Symbol?
119 |
# File 'lib/ansible/ruby/modules/generated/system/user.rb', line 119 attribute :password_lock |
#remove ⇒ :yes, ...
81 |
# File 'lib/ansible/ruby/modules/generated/system/user.rb', line 81 attribute :remove |
#seuser ⇒ Object?
33 |
# File 'lib/ansible/ruby/modules/generated/system/user.rb', line 33 attribute :seuser |
#shell ⇒ String?
48 |
# File 'lib/ansible/ruby/modules/generated/system/user.rb', line 48 attribute :shell |
#skeleton ⇒ Object?
55 |
# File 'lib/ansible/ruby/modules/generated/system/user.rb', line 55 attribute :skeleton |
#ssh_key_bits ⇒ String?
92 |
# File 'lib/ansible/ruby/modules/generated/system/user.rb', line 92 attribute :ssh_key_bits |
#ssh_key_comment ⇒ String?
104 |
# File 'lib/ansible/ruby/modules/generated/system/user.rb', line 104 attribute :ssh_key_comment |
#ssh_key_file ⇒ String?
100 |
# File 'lib/ansible/ruby/modules/generated/system/user.rb', line 100 attribute :ssh_key_file |
#ssh_key_passphrase ⇒ Object?
108 |
# File 'lib/ansible/ruby/modules/generated/system/user.rb', line 108 attribute :ssh_key_passphrase |
#ssh_key_type ⇒ String?
96 |
# File 'lib/ansible/ruby/modules/generated/system/user.rb', line 96 attribute :ssh_key_type |
#state ⇒ :absent, ...
61 |
# File 'lib/ansible/ruby/modules/generated/system/user.rb', line 61 attribute :state |
#system ⇒ :yes, ...
73 |
# File 'lib/ansible/ruby/modules/generated/system/user.rb', line 73 attribute :system |
#uid ⇒ Integer?
17 |
# File 'lib/ansible/ruby/modules/generated/system/user.rb', line 17 attribute :uid |
#update_password ⇒ :always, ...
111 |
# File 'lib/ansible/ruby/modules/generated/system/user.rb', line 111 attribute :update_password |