# Passing ldapServers to ldap\_client\_create

**URL:** <https://forum.ansible.com/t/passing-ldapservers-to-ldap-client-create/35124>\
**Category:** Ansible Project\
**Created:** [May 6, 2021, 2:34pm UTC](https://forum.ansible.com/t/passing-ldapservers-to-ldap-client-create/35124 "2021-05-06T14:34:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gene\_DiCesare](https://avatars.discourse-cdn.com/v4/letter/g/f19dbf/32.png) [@Gene\_DiCesare](https://forum.ansible.com/u/Gene_DiCesare)\
**Post date:** [May 6, 2021, 2:34pm UTC](https://forum.ansible.com/t/passing-ldapservers-to-ldap-client-create/35124/1 "2021-05-06T14:34:29Z")

</div>

Hi,

I am having issues using the SDK module ldap\_client\_create via the zapit module. In particular, trying to pass a list of LDAP servers seems to experience two issue which I can not figure out…

First, the SDK Doc I have shows the parameter should be a string type:

ldap\_client\_create  
Input Name: ldap\_servers  
Type: string optional  
Description: List of LDAP Servers to use for this configuration.

I’ve tried numerous ways to pass the data, but the current status is as follows:

…  
vars:  
ldapservers:

- [ldapserver1.xyz.com](http://ldapserver1.xyz.com)
- [ldapserver2.xyz.com](http://ldapserver2.xyz.com)
- [ldapserver3.xyz.com](http://ldapserver3.xyz.com)  
…
- name: LDAP Client Creation  
na\_ontap\_zapit:  
\<\<: \*login  
vserver: vserver-name  
zapi:  
ldap-client-create:  
ldap-client-config: vserver-name-cc  
ldap-servers: “{{ ldapservers }}”  
…  
register: output
- debug: var=output

I get the following error:

fatal: [localhost]: FAILED! =\> {“changed”: false, “errno”: “13115”, “msg”: “ZAPI failure: check errno and reason.”, “reason”: “Unexpected array element: [ldapserver1.xyz.com](http://ldapserver1.xyz.com); Unexpected array element: [ldapserver2.xyz.com](http://ldapserver2.xyz.com); Unexpected array element: [ldapserver3.xyz.com](http://ldapserver3.xyz.com)”, “response”: {}, “status”: “failed”}

I also found if I pass an IP address anyplace in the list of names, I get a different message:

An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ValueError: Invalid tag name ‘111.222.333.444’  
fatal: [localhost]: FAILED! =\> {“changed”: false, “module\_stderr”: "Traceback (most recent call last)  
…

Does anyone have insight into how to properly pass this information?

Thanks.
