ldap_passwd – Set passwords in LDAP¶
New in version 2.6.
Synopsis¶
Set a password for an LDAP entry. This module only asserts that a given password is valid for a given entry. To assert the existence of an entry, see ldap_entry.
Parameters¶
Notes¶
Note
The default authentication settings will attempt to use a SASL EXTERNAL bind over a UNIX domain socket. This works well with the default Ubuntu install for example, which includes a cn=peercred,cn=external,cn=auth ACL rule allowing root to modify the server configuration. If you need to use a simple bind to access your server, pass the credentials in bind_dn and bind_pw.
Examples¶
- name: Set a password for the admin user
ldap_passwd:
dn: cn=admin,dc=example,dc=com
passwd: "{{ vault_secret }}"
- name: Setting passwords in bulk
ldap_passwd:
dn: "{{ item.key }}"
passwd: "{{ item.value }}"
with_dict:
alice: alice123123
bob: "|30b!"
admin: "{{ vault_secret }}"
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description |
---|---|---|
modlist
list
|
success |
list of modified parameters
Sample:
[[2, "olcRootDN", ["cn=root,dc=example,dc=com"]]]
|
Status¶
This module is not guaranteed to have a backwards compatible interface. [preview]
This module is maintained by the Ansible Community. [community]
Authors¶
Keller Fuchs (@KellerFuchs)
Hint
If you notice any issues in this documentation, you can edit this document to improve it.