Class: Ansible::Ruby::Modules::User
- Inherits:
-
Base
- Object
- Ansible::Ruby::Models::Base
- Base
- Ansible::Ruby::Modules::User
- Defined in:
- lib/ansible/ruby/modules/generated/core/system/user.rb
Instance Method Summary collapse
-
#append ⇒ :yes, ...
If C(yes), will only add groups, not set them to just the list in I(groups).
-
#comment ⇒ String?
Optionally sets the description (aka I(GECOS)) of user account.
-
#createhome ⇒ :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.
-
#expires ⇒ String?
An expiry time for the user in epoch, it will be ignored on platforms that do not support this.
-
#force ⇒ :yes, ...
When used with C(state=absent), behavior is as with C(userdel –force).
-
#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>, ...
Puts the user in this comma-delimited list of groups.
-
#home ⇒ Object?
Optionally set the user’s home directory.
-
#login_class ⇒ Object?
Optionally sets the user’s login class for FreeBSD, OpenBSD and NetBSD systems.
-
#move_home ⇒ :yes, ...
If set to C(yes) when used with C(home=), attempt to move the user’s home directory to the specified directory if it isn’t there already.
-
#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.
-
#remove ⇒ :yes, ...
When used with C(state=absent), behavior is as with C(userdel –remove).
-
#seuser ⇒ Object?
Optionally sets the seuser type (user_u) on selinux enabled systems.
-
#shell ⇒ String?
Optionally set the user’s shell.
-
#skeleton ⇒ Object?
Optionally set a home skeleton directory.
-
#ssh_key_bits ⇒ Integer?
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 ⇒ :present, ...
Whether the account should exist or not, taking action if the state is different from what is stated.
-
#system ⇒ :yes, ...
When creating an account, setting this to C(yes) makes the user a system account.
-
#uid ⇒ String?
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, #initialize, #to_h, validates
Constructor Details
This class inherits a constructor from Ansible::Ruby::Models::Base
Instance Method Details
#append ⇒ :yes, ...
Returns If C(yes), will only add groups, not set them to just the list in I(groups).
37 |
# File 'lib/ansible/ruby/modules/generated/core/system/user.rb', line 37 attribute :append |
#comment ⇒ String?
Returns Optionally sets the description (aka I(GECOS)) of user account.
14 |
# File 'lib/ansible/ruby/modules/generated/core/system/user.rb', line 14 attribute :comment |
#createhome ⇒ :yes, ...
Returns 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.
58 |
# File 'lib/ansible/ruby/modules/generated/core/system/user.rb', line 58 attribute :createhome |
#expires ⇒ String?
Returns An expiry time for the user in epoch, it will be ignored on platforms that do not support this. Currently supported on Linux and FreeBSD.
108 |
# File 'lib/ansible/ruby/modules/generated/core/system/user.rb', line 108 attribute :expires |
#force ⇒ :yes, ...
Returns When used with C(state=absent), behavior is as with C(userdel –force).
70 |
# File 'lib/ansible/ruby/modules/generated/core/system/user.rb', line 70 attribute :force |
#generate_ssh_key ⇒ :yes, ...
Returns Whether to generate a SSH key for the user in question. This will B(not) overwrite an existing SSH key.
81 |
# File 'lib/ansible/ruby/modules/generated/core/system/user.rb', line 81 attribute :generate_ssh_key |
#group ⇒ String?
Returns Optionally sets the user’s primary group (takes a group name).
29 |
# File 'lib/ansible/ruby/modules/generated/core/system/user.rb', line 29 attribute :group |
#groups ⇒ Array<String>, ...
Returns Puts the user in this comma-delimited list of groups. When set to the empty string (‘groups=’), the user is removed from all groups except the primary group.
33 |
# File 'lib/ansible/ruby/modules/generated/core/system/user.rb', line 33 attribute :groups |
#home ⇒ Object?
Returns Optionally set the user’s home directory.
45 |
# File 'lib/ansible/ruby/modules/generated/core/system/user.rb', line 45 attribute :home |
#login_class ⇒ Object?
Returns Optionally sets the user’s login class for FreeBSD, OpenBSD and NetBSD systems.
74 |
# File 'lib/ansible/ruby/modules/generated/core/system/user.rb', line 74 attribute :login_class |
#move_home ⇒ :yes, ...
Returns If set to C(yes) when used with C(home=), attempt to move the user’s home directory to the specified directory if it isn’t there already.
62 |
# File 'lib/ansible/ruby/modules/generated/core/system/user.rb', line 62 attribute :move_home |
#name ⇒ String
Returns Name of the user to create, remove or modify.
10 |
# File 'lib/ansible/ruby/modules/generated/core/system/user.rb', line 10 attribute :name |
#non_unique ⇒ :yes, ...
Returns Optionally when used with the -u option, this option allows to change the user ID to a non-unique value.
22 |
# File 'lib/ansible/ruby/modules/generated/core/system/user.rb', line 22 attribute :non_unique |
#password ⇒ Object?
Returns Optionally set the user’s password to this crypted value. See the user example in the github examples directory for what this looks like in a playbook. See U(docs.ansible.com/ansible/faq.html#how-do-i-generate-crypted-passwords-for-the-user-module) for details on various ways to generate these password values. Note on Darwin system, this value has to be cleartext. Beware of security issues.
51 |
# File 'lib/ansible/ruby/modules/generated/core/system/user.rb', line 51 attribute :password |
#remove ⇒ :yes, ...
Returns When used with C(state=absent), behavior is as with C(userdel –remove).
77 |
# File 'lib/ansible/ruby/modules/generated/core/system/user.rb', line 77 attribute :remove |
#seuser ⇒ Object?
Returns Optionally sets the seuser type (user_u) on selinux enabled systems.
26 |
# File 'lib/ansible/ruby/modules/generated/core/system/user.rb', line 26 attribute :seuser |
#shell ⇒ String?
Returns Optionally set the user’s shell.
41 |
# File 'lib/ansible/ruby/modules/generated/core/system/user.rb', line 41 attribute :shell |
#skeleton ⇒ Object?
Returns Optionally set a home skeleton directory. Requires createhome option!.
48 |
# File 'lib/ansible/ruby/modules/generated/core/system/user.rb', line 48 attribute :skeleton |
#ssh_key_bits ⇒ Integer?
Returns Optionally specify number of bits in SSH key to create.
85 |
# File 'lib/ansible/ruby/modules/generated/core/system/user.rb', line 85 attribute :ssh_key_bits |
#ssh_key_comment ⇒ String?
Returns Optionally define the comment for the SSH key.
97 |
# File 'lib/ansible/ruby/modules/generated/core/system/user.rb', line 97 attribute :ssh_key_comment |
#ssh_key_file ⇒ String?
Returns Optionally specify the SSH key filename. If this is a relative filename then it will be relative to the user’s home directory.
93 |
# File 'lib/ansible/ruby/modules/generated/core/system/user.rb', line 93 attribute :ssh_key_file |
#ssh_key_passphrase ⇒ Object?
Returns Set a passphrase for the SSH key. If no passphrase is provided, the SSH key will default to having no passphrase.
101 |
# File 'lib/ansible/ruby/modules/generated/core/system/user.rb', line 101 attribute :ssh_key_passphrase |
#ssh_key_type ⇒ String?
Returns Optionally specify the type of SSH key to generate. Available SSH key types will depend on implementation present on target host.
89 |
# File 'lib/ansible/ruby/modules/generated/core/system/user.rb', line 89 attribute :ssh_key_type |
#state ⇒ :present, ...
Returns Whether the account should exist or not, taking action if the state is different from what is stated.
54 |
# File 'lib/ansible/ruby/modules/generated/core/system/user.rb', line 54 attribute :state |
#system ⇒ :yes, ...
Returns When creating an account, setting this to C(yes) makes the user a system account. This setting cannot be changed on existing users.
66 |
# File 'lib/ansible/ruby/modules/generated/core/system/user.rb', line 66 attribute :system |
#uid ⇒ String?
Returns Optionally sets the I(UID) of the user.
18 |
# File 'lib/ansible/ruby/modules/generated/core/system/user.rb', line 18 attribute :uid |
#update_password ⇒ :always, ...
Returns C(always) will update passwords if they differ. C(on_create) will only set the password for newly created users.
104 |
# File 'lib/ansible/ruby/modules/generated/core/system/user.rb', line 104 attribute :update_password |