ERROR! 'with_ldap' is not valid attribute for a Task

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

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

I try to use module from :
https://github.com/quinot/ansible-plugin-lookup_ldap

BR
Greg

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