community.general.ldap_passwd (0.1.1) — module

Set passwords in LDAP.

Authors: Keller Fuchs (@KellerFuchs)

preview | supported by community

Install collection

Install with ansible-galaxy collection install community.general:==0.1.1


Add to requirements.yml

  collections:
    - name: community.general
      version: 0.1.1

Description

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 M(ldap_entry).


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Set a password for the admin user
  ldap_passwd:
    dn: cn=admin,dc=example,dc=com
    passwd: "{{ vault_secret }}"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Setting passwords in bulk
  ldap_passwd:
    dn: "{{ item.key }}"
    passwd: "{{ item.value }}"
  with_dict:
    alice: alice123123
    bob:   "|30b!"
    admin: "{{ vault_secret }}"

Inputs

    
dn:
    description:
    - The DN of the entry to add or remove.
    required: true
    type: str

passwd:
    description:
    - The (plaintext) password to be set for I(dn).
    required: true

bind_dn:
    description:
    - A DN to bind with. If this is omitted, we'll try a SASL bind with the EXTERNAL mechanism.
    - If this is blank, we'll use an anonymous bind.
    type: str

bind_pw:
    description:
    - The password to use with I(bind_dn).
    type: str

start_tls:
    default: false
    description:
    - If true, we'll use the START_TLS LDAP extension.
    type: bool

server_uri:
    default: ldapi:///
    description:
    - A URI to the LDAP server.
    - The default value lets the underlying LDAP client library look for a UNIX domain
      socket in its default location.
    type: str

validate_certs:
    default: true
    description:
    - If set to C(no), SSL certificates will not be validated.
    - This should only be used on sites using self-signed certificates.
    type: bool

Outputs

modlist:
  description: list of modified parameters
  returned: success
  sample: '[[2, "olcRootDN", ["cn=root,dc=example,dc=com"]]]'
  type: list