Hi,
Am trying to interface with LDAP on Linux and creating a new user. if uid doesn’t exist, then it should ideally create one. However, am getting below error.
My ansible playbbok is as below:
-
name: LDAP user check
hosts: LOCAL
tasks: -
name: check ldap entry
ldap_entry:
dn: cn=admin,dc=example,dc=com
objectClass: -
simpleSecurityObject
-
organizationalRole
-
name: Ensure an LDAP entry exists for uid
ldap_entry:
server_uri: ldaps://directory.example.com:636
bind_dn: cn=admin,dc=example,dc=com
bind_pw: XXXXXX
dn: uid=njain10,ou=people,dc=example,dc=com
objectClass: -
account
attributes:
uid: njain10
ERROR: