Hi there.

I strongly suggest first try to create the user by hand, to discard errors 
such as wrong domain and so on.

Cheers.


On Wednesday, April 3, 2019 at 10:16:13 AM UTC+2, Nikhil wrote:
>
> 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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/29180d30-dbf6-41a7-a310-03c6c8058691%40googlegroups.com.

Reply via email to