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:
----------

TASK [Ensure an LDAP entry exists for uid] 
*****************************************************************************************************************************
An exception occurred during task execution. To see the full traceback, use 
-vvv. The error was: NO_SUCH_OBJECT: {'matched': u'dc=example,dc=com', 
'desc': u'No such object'}
fatal: [192.168.XXX.XXX]: FAILED! => {"changed": false, "details": 
"{'matched': u'dc=example,dc=com', 'desc': u'No such object'}", "msg": 
"Entry action failed."}


Appreciate anyone's help here.

Regards,
Nikhil

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/97e07c4f-c8a9-4f3b-b854-cc101d33126f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to