Class: Ansible::Ruby::Modules::Win_domain_user
- Inherits:
-
Base
- Object
- Ansible::Ruby::Models::Base
- Base
- Ansible::Ruby::Modules::Win_domain_user
- Defined in:
- lib/ansible/ruby/modules/generated/windows/win_domain_user.rb
Overview
Manages Windows Active Directory user accounts.
Instance Method Summary collapse
-
#account_locked ⇒ :no?
C(no) will unlock the user account if locked.
-
#attributes ⇒ Hash?
A dict of custom LDAP attributes to set on the user.,This can be used to set custom attributes that are not exposed as module parameters, e.g.
-
#city ⇒ String?
Configures the user’s city.
-
#company ⇒ String?
Configures the user’s company name.
-
#country ⇒ String?
Configures the user’s country code.,Note that this is a two-character ISO 3166 code.
-
#description ⇒ Object?
Description of the user.
-
#domain_password ⇒ String?
The password for I(username).
-
#domain_server ⇒ String?
Specifies the Active Directory Domain Services instance to connect to.,Can be in the form of an FQDN or NetBIOS name.,If not specified then the value is based on the domain of the computer running PowerShell.
-
#domain_username ⇒ String?
The username to use when interacting with AD.,If this is not set then the user Ansible used to log in with will be used instead when using CredSSP or Kerberos with credential delegation.
-
#email ⇒ Object?
Configures the user’s email address.,This is a record in AD and does not do anything to configure any email servers or systems.
-
#enabled ⇒ :yes, ...
C(yes) will enable the user account.,C(no) will disable the account.
-
#firstname ⇒ String?
Configures the user’s first name (given name).
-
#groups ⇒ Array<String>, ...
Adds or removes the user from this list of groups, depending on the value of I(groups_action).
-
#groups_action ⇒ :add, ...
If C(add), the user is added to each group in I(groups) where not already a member.,If C(remove), the user is removed from each group in I(groups).,If C(replace), the user is added as a member of each group in I(groups) and removed from any other groups.
-
#name ⇒ String
Name of the user to create, remove or modify.
-
#password ⇒ String?
Optionally set the user’s password to this (plain text) value.
-
#password_expired ⇒ Symbol?
C(yes) will require the user to change their password at next login.,C(no) will clear the expired password flag.,This is mutually exclusive with I(password_never_expires).
-
#password_never_expires ⇒ Symbol?
C(yes) will set the password to never expire.,C(no) will allow the password to expire.,This is mutually exclusive with I(password_expired).
-
#path ⇒ Array<String>, ...
Container or OU for the new user; if you do not specify this, the user will be placed in the default container for users in the domain.,Setting the path is only available when a new user is created; if you specify a path on an existing user, the user’s path will not be updated - you must delete (e.g., state=absent) the user and then re-add the user with the appropriate path.
-
#postal_code ⇒ Integer?
Configures the user’s postal code / zip code.
-
#state ⇒ :absent, ...
When C(present), creates or updates the user account.
-
#state_province ⇒ String?
Configures the user’s state or province.
-
#street ⇒ String?
Configures the user’s street address.
-
#surname ⇒ String?
Configures the user’s last name (surname).
-
#update_password ⇒ :always, ...
C(always) will update passwords if they differ.,C(on_create) will only set the password for newly created users.,Note that C(always) will always report an Ansible status of ‘changed’ because we cannot determine whether the new password differs from the old password.
-
#upn ⇒ Object?
Configures the User Principal Name (UPN) for the account.,This is not required, but is best practice to configure for modern versions of Active Directory.,The format is C(<username>@<domain>).
-
#user_cannot_change_password ⇒ Symbol?
C(yes) will prevent the user from changing their password.,C(no) will allow the user to change their password.
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
#account_locked ⇒ :no?
Returns C(no) will unlock the user account if locked. Note that there is not a way to lock an account as an administrator. Accounts are locked due to user actions; as an admin, you may only unlock a locked account. If you wish to administratively disable an account, set I(enabled) to C(no).
24 |
# File 'lib/ansible/ruby/modules/generated/windows/win_domain_user.rb', line 24 attribute :account_locked |
#attributes ⇒ Hash?
Returns A dict of custom LDAP attributes to set on the user.,This can be used to set custom attributes that are not exposed as module parameters, e.g. C(telephoneNumber).,See the examples on how to format this parameter.
101 |
# File 'lib/ansible/ruby/modules/generated/windows/win_domain_user.rb', line 101 attribute :attributes |
#city ⇒ String?
Returns Configures the user’s city.
81 |
# File 'lib/ansible/ruby/modules/generated/windows/win_domain_user.rb', line 81 attribute :city |
#company ⇒ String?
Returns Configures the user’s company name.
67 |
# File 'lib/ansible/ruby/modules/generated/windows/win_domain_user.rb', line 67 attribute :company |
#country ⇒ String?
Returns Configures the user’s country code.,Note that this is a two-character ISO 3166 code.
93 |
# File 'lib/ansible/ruby/modules/generated/windows/win_domain_user.rb', line 93 attribute :country |
#description ⇒ Object?
Returns Description of the user.
28 |
# File 'lib/ansible/ruby/modules/generated/windows/win_domain_user.rb', line 28 attribute :description |
#domain_password ⇒ String?
Returns The password for I(username).
109 |
# File 'lib/ansible/ruby/modules/generated/windows/win_domain_user.rb', line 109 attribute :domain_password |
#domain_server ⇒ String?
Returns Specifies the Active Directory Domain Services instance to connect to.,Can be in the form of an FQDN or NetBIOS name.,If not specified then the value is based on the domain of the computer running PowerShell.
113 |
# File 'lib/ansible/ruby/modules/generated/windows/win_domain_user.rb', line 113 attribute :domain_server |
#domain_username ⇒ String?
Returns The username to use when interacting with AD.,If this is not set then the user Ansible used to log in with will be used instead when using CredSSP or Kerberos with credential delegation.
105 |
# File 'lib/ansible/ruby/modules/generated/windows/win_domain_user.rb', line 105 attribute :domain_username |
#email ⇒ Object?
Returns Configures the user’s email address.,This is a record in AD and does not do anything to configure any email servers or systems.
74 |
# File 'lib/ansible/ruby/modules/generated/windows/win_domain_user.rb', line 74 attribute :email |
#enabled ⇒ :yes, ...
Returns C(yes) will enable the user account.,C(no) will disable the account.
20 |
# File 'lib/ansible/ruby/modules/generated/windows/win_domain_user.rb', line 20 attribute :enabled |
#firstname ⇒ String?
Returns Configures the user’s first name (given name).
59 |
# File 'lib/ansible/ruby/modules/generated/windows/win_domain_user.rb', line 59 attribute :firstname |
#groups ⇒ Array<String>, ...
Returns Adds or removes the user from this list of groups, depending on the value of I(groups_action). To remove all but the Principal Group, set C(groups=<principal group name>) and I(groups_action=replace). Note that users cannot be removed from their principal group (for example, “Domain Users”).
31 |
# File 'lib/ansible/ruby/modules/generated/windows/win_domain_user.rb', line 31 attribute :groups |
#groups_action ⇒ :add, ...
Returns If C(add), the user is added to each group in I(groups) where not already a member.,If C(remove), the user is removed from each group in I(groups).,If C(replace), the user is added as a member of each group in I(groups) and removed from any other groups.
35 |
# File 'lib/ansible/ruby/modules/generated/windows/win_domain_user.rb', line 35 attribute :groups_action |
#name ⇒ String
Returns Name of the user to create, remove or modify.
12 |
# File 'lib/ansible/ruby/modules/generated/windows/win_domain_user.rb', line 12 attribute :name |
#password ⇒ String?
Returns Optionally set the user’s password to this (plain text) value. In order to enable an account - I(enabled) - a password must already be configured on the account, or you must provide a password here.
39 |
# File 'lib/ansible/ruby/modules/generated/windows/win_domain_user.rb', line 39 attribute :password |
#password_expired ⇒ Symbol?
Returns C(yes) will require the user to change their password at next login.,C(no) will clear the expired password flag.,This is mutually exclusive with I(password_never_expires).
47 |
# File 'lib/ansible/ruby/modules/generated/windows/win_domain_user.rb', line 47 attribute :password_expired |
#password_never_expires ⇒ Symbol?
Returns C(yes) will set the password to never expire.,C(no) will allow the password to expire.,This is mutually exclusive with I(password_expired).
51 |
# File 'lib/ansible/ruby/modules/generated/windows/win_domain_user.rb', line 51 attribute :password_never_expires |
#path ⇒ Array<String>, ...
Returns Container or OU for the new user; if you do not specify this, the user will be placed in the default container for users in the domain.,Setting the path is only available when a new user is created; if you specify a path on an existing user, the user’s path will not be updated - you must delete (e.g., state=absent) the user and then re-add the user with the appropriate path.
97 |
# File 'lib/ansible/ruby/modules/generated/windows/win_domain_user.rb', line 97 attribute :path |
#postal_code ⇒ Integer?
Returns Configures the user’s postal code / zip code.
89 |
# File 'lib/ansible/ruby/modules/generated/windows/win_domain_user.rb', line 89 attribute :postal_code |
#state ⇒ :absent, ...
Returns When C(present), creates or updates the user account. When C(absent), removes the user account if it exists. When C(query), retrieves the user account details without making any changes.
16 |
# File 'lib/ansible/ruby/modules/generated/windows/win_domain_user.rb', line 16 attribute :state |
#state_province ⇒ String?
Returns Configures the user’s state or province.
85 |
# File 'lib/ansible/ruby/modules/generated/windows/win_domain_user.rb', line 85 attribute :state_province |
#street ⇒ String?
Returns Configures the user’s street address.
77 |
# File 'lib/ansible/ruby/modules/generated/windows/win_domain_user.rb', line 77 attribute :street |
#surname ⇒ String?
Returns Configures the user’s last name (surname).
63 |
# File 'lib/ansible/ruby/modules/generated/windows/win_domain_user.rb', line 63 attribute :surname |
#update_password ⇒ :always, ...
Returns C(always) will update passwords if they differ.,C(on_create) will only set the password for newly created users.,Note that C(always) will always report an Ansible status of ‘changed’ because we cannot determine whether the new password differs from the old password.
43 |
# File 'lib/ansible/ruby/modules/generated/windows/win_domain_user.rb', line 43 attribute :update_password |
#upn ⇒ Object?
Returns Configures the User Principal Name (UPN) for the account.,This is not required, but is best practice to configure for modern versions of Active Directory.,The format is C(<username>@<domain>).
71 |
# File 'lib/ansible/ruby/modules/generated/windows/win_domain_user.rb', line 71 attribute :upn |
#user_cannot_change_password ⇒ Symbol?
Returns C(yes) will prevent the user from changing their password.,C(no) will allow the user to change their password.
55 |
# File 'lib/ansible/ruby/modules/generated/windows/win_domain_user.rb', line 55 attribute :user_cannot_change_password |