# ERROR! 'with\_ldap' is not valid attribute for a Task

**URL:** <https://forum.ansible.com/t/error-with-ldap-is-not-valid-attribute-for-a-task/25040>\
**Category:** Ansible Project\
**Created:** [July 21, 2017, 7:08am UTC](https://forum.ansible.com/t/error-with-ldap-is-not-valid-attribute-for-a-task/25040 "2017-07-21T07:08:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Grzegorz\_Sz](https://avatars.discourse-cdn.com/v4/letter/g/71e660/32.png) [@Grzegorz\_Sz](https://forum.ansible.com/u/Grzegorz_Sz)\
**Post date:** [July 21, 2017, 7:08am UTC](https://forum.ansible.com/t/error-with-ldap-is-not-valid-attribute-for-a-task/25040/1 "2017-07-21T07:08:50Z")

</div>

Hi,

I use ‘with\_ldap’ role from lookup\_module. It seems that my playbook doesn’t see it. There is an error:

ERROR! ‘with\_ldap’ is not valid attribute for a Task

Can anybody help me, please ?

My task:

- name: List group members  
debug:  
msg: “group member {{ item }}”  
with\_ldap:
- context: group\_members
- ldapgroup

Thanks !  
BR  
Greg

---

<div class="post-metadata">

**Author:** ![Pshem\_Kowalczyk](https://avatars.discourse-cdn.com/v4/letter/p/e480ec/32.png) [@Pshem\_Kowalczyk](https://forum.ansible.com/u/Pshem_Kowalczyk)\
**Post date:** [July 21, 2017, 7:43am UTC](https://forum.ansible.com/t/error-with-ldap-is-not-valid-attribute-for-a-task/25040/2 "2017-07-21T07:43:09Z")

</div>

Hi,

I’m not sure which module you’re referring to, but in your playbook you use ‘debug’ module. Also the ‘with\_ldap’ section is not indented correctly - if it’s a parameter to a module it has to be indented more then the name of the module you’re using.

kind regards  
Pshem

---

<div class="post-metadata">

**Author:** ![Grzegorz\_Sz](https://avatars.discourse-cdn.com/v4/letter/g/71e660/32.png) [@Grzegorz\_Sz](https://forum.ansible.com/u/Grzegorz_Sz)\
**Post date:** [July 21, 2017, 12:10pm UTC](https://forum.ansible.com/t/error-with-ldap-is-not-valid-attribute-for-a-task/25040/3 "2017-07-21T12:10:04Z")

</div>

I try to use module from :  
[https://github.com/quinot/ansible-plugin-lookup\_ldap](https://github.com/quinot/ansible-plugin-lookup_ldap)

BR  
Greg

---

<div class="post-metadata">

**Author:** ![Pshem\_Kowalczyk](https://avatars.discourse-cdn.com/v4/letter/p/e480ec/32.png) [@Pshem\_Kowalczyk](https://forum.ansible.com/u/Pshem_Kowalczyk)\
**Post date:** [July 22, 2017, 3:50am UTC](https://forum.ansible.com/t/error-with-ldap-is-not-valid-attribute-for-a-task/25040/4 "2017-07-22T03:50:11Z")

</div>

Since those look like plugins (and not modules) - copy the files from filter\_plugins and lookup\_plugins to the directories in your setup (if you don’t have those dirs create them at the same level as your playbook).

kind regards  
Pshem
